From: Andre Przywara Subject: [PATCH 3/4] x86: Fix allowed CPUID bits for KVM guests Date: Fri, 3 Sep 2010 11:27:48 +0200 Message-ID: <1283506069-1096-4-git-send-email-andre.przywara@amd.com> References: <1283506069-1096-1-git-send-email-andre.przywara@amd.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Andre Przywara To: Return-path: Received: from va3ehsobe006.messaging.microsoft.com ([216.32.180.16]:16637 "EHLO VA3EHSOBE009.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756563Ab0ICJ1R (ORCPT ); Fri, 3 Sep 2010 05:27:17 -0400 Received: from mail164-va3 (localhost.localdomain [127.0.0.1]) by mail164-va3-R.bigfish.com (Postfix) with ESMTP id 31F1A1A000DF for ; Fri, 3 Sep 2010 09:27:16 +0000 (UTC) Received: from VA3EHSMHS024.bigfish.com (unknown [10.7.14.252]) by mail164-va3.bigfish.com (Postfix) with ESMTP id CF84F1B804F for ; Fri, 3 Sep 2010 09:27:04 +0000 (UTC) Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o839SX64004874 for ; Fri, 3 Sep 2010 04:28:56 -0500 Received: from sausexhtp02.amd.com (sausexhtp02.amd.com [163.181.3.152]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 259FCC8602 for ; Fri, 3 Sep 2010 04:26:10 -0500 (CDT) In-Reply-To: <1283506069-1096-1-git-send-email-andre.przywara@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: The AMD extension to AVX (FMA4, XOP) work on the same YMM register set as AVX, so they are safe for guests to use, as long as AVX itself is allowed. Signed-off-by: Andre Przywara --- arch/x86/kvm/x86.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3a09c62..eb89e7b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1996,8 +1996,8 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, const u32 kvm_supported_word6_x86_features = F(LAHF_LM) | F(CMP_LEGACY) | F(SVM) | 0 /* ExtApicSpace */ | F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) | - F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(SSE5) | - 0 /* SKINIT */ | 0 /* WDT */; + F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(XOP) | + 0 /* SKINIT, WDT, LWP */ | F(FMA4) | F(TBM); /* all calls to cpuid_count() should be made on the same cpu */ get_cpu(); -- 1.6.4