From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Habkost Subject: [PATCH 15/15] i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too Date: Thu, 4 Oct 2012 17:49:07 -0300 Message-ID: <1349383747-19383-16-git-send-email-ehabkost@redhat.com> References: <1349383747-19383-1-git-send-email-ehabkost@redhat.com> Cc: kvm@vger.kernel.org, Igor Mammedov , Avi Kivity , Gleb Natapov , Marcelo Tosatti , =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58728 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757338Ab2JDUsQ (ORCPT ); Thu, 4 Oct 2012 16:48:16 -0400 In-Reply-To: <1349383747-19383-1-git-send-email-ehabkost@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Now that CPUID leaf 7 features can be enabled/disabled on the command-line, we need to filter them properly using GET_SUPPORTED_CPUID, at the same place where other features are filtered out. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 7921b1b..d8cd40a 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1376,6 +1376,8 @@ static void filter_features_for_kvm(X86CPU *cpu) kvm_arch_get_supported_cpuid(s, 0x80000001, 0, R_ECX); env->cpuid_svm_features &= kvm_arch_get_supported_cpuid(s, 0x8000000A, 0, R_EDX); + env->cpuid_7_0_ebx_features &= + kvm_arch_get_supported_cpuid(s, 7, 0, R_EBX); env->cpuid_kvm_features &= kvm_arch_get_supported_cpuid(s, KVM_CPUID_FEATURES, 0, R_EAX); env->cpuid_ext4_features &= -- 1.7.11.4