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