[libvirt] [Qemu-devel] [PATCH qom-cpu 8/9] target-i386: Introduce X86CPU.filtered_features field
Eric Blake
eblake at redhat.com
Fri May 3 15:03:43 UTC 2013
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 at redhat.com>
> ---
> target-i386/cpu-qom.h | 3 +++
> target-i386/cpu.c | 9 ++++++---
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
Reviewed-by: Eric Blake <eblake at redhat.com>
> +++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130503/a39b30be/attachment-0001.sig>
More information about the libvir-list
mailing list