[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filte
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field |
Date: |
Fri, 03 May 2013 09:03:43 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/22/2013 01:00 PM, Eduardo Habkost wrote:
> This field will contain the feature bits that were filtered out because
> of missing host support.
Yes, libvirt would definitely like to know that.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> target-i386/cpu-qom.h | 3 +++
> target-i386/cpu.c | 9 ++++++---
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
> +++ b/target-i386/cpu.c
> @@ -1642,9 +1642,12 @@ static void filter_features_for_kvm(X86CPU *cpu)
>
> for (w = 0; w < FEATURE_WORDS; w++) {
> FeatureWordInfo *wi = &feature_word_info[w];
> - env->features[w] &= kvm_arch_get_supported_cpuid(s, wi->cpuid_eax,
> - wi->cpuid_ecx,
> - wi->cpuid_reg);
> + uint32_t host_feat = kvm_arch_get_supported_cpuid(s, wi->cpuid_eax,
> + wi->cpuid_ecx,
> + wi->cpuid_reg);
Alignment is still "interesting", but still no impact to the patch review.
> + uint32_t requested_features = env->features[w];
> + env->features[w] &= host_feat;
> + cpu->filtered_features[w] = requested_features & ~env->features[w];
> }
> }
> #endif
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field,
Eric Blake <=