From patchwork Thu Oct 4 20:49:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1548111 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 71DC9DFFCF for ; Thu, 4 Oct 2012 20:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757397Ab2JDUsV (ORCPT ); Thu, 4 Oct 2012 16:48:21 -0400 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 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q94KmDtB016190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Oct 2012 16:48:13 -0400 Received: from blackpad.lan.raisama.net (vpn1-7-183.gru2.redhat.com [10.97.7.183]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q94KmCAi028280; Thu, 4 Oct 2012 16:48:13 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 4F546203636; Thu, 4 Oct 2012 17:49:13 -0300 (BRT) From: Eduardo Habkost To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, Igor Mammedov , Avi Kivity , Gleb Natapov , Marcelo Tosatti , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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> In-Reply-To: <1349383747-19383-1-git-send-email-ehabkost@redhat.com> References: <1349383747-19383-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 &=