aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2010-06-22 01:49:21 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:47:10 -0400
commit6c3f6041172b78d5532c6bf3680d304e92ec2e66 (patch)
tree3a1f358ea1cc29df958a6b3d535114987650e101 /arch
parent7ac77099ce88a0c31b75acd0ec5ef3da4415a6d8 (diff)
KVM: x86: Enable AVX for guest
Enable Intel(R) Advanced Vector Extension(AVX) for guest. The detection of AVX feature includes OSXSAVE bit testing. When OSXSAVE bit is not set, even if AVX is supported, the AVX instruction would result in UD as well. So we're safe to expose AVX bits to guest directly. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 68be38e233f..d39d6b25d3e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1963,13 +1963,13 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1963 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW); 1963 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW);
1964 /* cpuid 1.ecx */ 1964 /* cpuid 1.ecx */
1965 const u32 kvm_supported_word4_x86_features = 1965 const u32 kvm_supported_word4_x86_features =
1966 F(XMM3) | 0 /* Reserved, DTES64, MONITOR */ | 1966 F(XMM3) | F(PCLMULQDQ) | 0 /* DTES64, MONITOR */ |
1967 0 /* DS-CPL, VMX, SMX, EST */ | 1967 0 /* DS-CPL, VMX, SMX, EST */ |
1968 0 /* TM2 */ | F(SSSE3) | 0 /* CNXT-ID */ | 0 /* Reserved */ | 1968 0 /* TM2 */ | F(SSSE3) | 0 /* CNXT-ID */ | 0 /* Reserved */ |
1969 0 /* Reserved */ | F(CX16) | 0 /* xTPR Update, PDCM */ | 1969 0 /* Reserved */ | F(CX16) | 0 /* xTPR Update, PDCM */ |
1970 0 /* Reserved, DCA */ | F(XMM4_1) | 1970 0 /* Reserved, DCA */ | F(XMM4_1) |
1971 F(XMM4_2) | F(X2APIC) | F(MOVBE) | F(POPCNT) | 1971 F(XMM4_2) | F(X2APIC) | F(MOVBE) | F(POPCNT) |
1972 0 /* Reserved, AES */ | F(XSAVE) | 0 /* OSXSAVE */; 1972 0 /* Reserved, AES */ | F(XSAVE) | 0 /* OSXSAVE */ | F(AVX);
1973 /* cpuid 0x80000001.ecx */ 1973 /* cpuid 0x80000001.ecx */
1974 const u32 kvm_supported_word6_x86_features = 1974 const u32 kvm_supported_word6_x86_features =
1975 F(LAHF_LM) | F(CMP_LEGACY) | F(SVM) | 0 /* ExtApicSpace */ | 1975 F(LAHF_LM) | F(CMP_LEGACY) | F(SVM) | 0 /* ExtApicSpace */ |