Re: [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <ehabkost@xxxxxxxxxx>
> ---
>  target-i386/cpu-qom.h | 3 +++
>  target-i386/cpu.c     | 9 ++++++---
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

> +++ 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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]