aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-12-18 03:48:47 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:35:40 -0500
commit4e47c7a6d714cf352b719db92a924b6ec487acc5 (patch)
treeb968765b85124e0b59f415bf8e4d499ef953236e /arch/x86/kvm/x86.c
parent0e85188049afacdfce9c026144142264981bbabb (diff)
KVM: VMX: Add instruction rdtscp support for guest
Before enabling, execution of "rdtscp" in guest would result in #UD. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e5ac21f992f0..8798504ace11 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1646,6 +1646,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1646#else 1646#else
1647 unsigned f_lm = 0; 1647 unsigned f_lm = 0;
1648#endif 1648#endif
1649 unsigned f_rdtscp = kvm_x86_ops->rdtscp_supported() ? F(RDTSCP) : 0;
1649 1650
1650 /* cpuid 1.edx */ 1651 /* cpuid 1.edx */
1651 const u32 kvm_supported_word0_x86_features = 1652 const u32 kvm_supported_word0_x86_features =
@@ -1665,7 +1666,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1665 F(MTRR) | F(PGE) | F(MCA) | F(CMOV) | 1666 F(MTRR) | F(PGE) | F(MCA) | F(CMOV) |
1666 F(PAT) | F(PSE36) | 0 /* Reserved */ | 1667 F(PAT) | F(PSE36) | 0 /* Reserved */ |
1667 f_nx | 0 /* Reserved */ | F(MMXEXT) | F(MMX) | 1668 f_nx | 0 /* Reserved */ | F(MMXEXT) | F(MMX) |
1668 F(FXSR) | F(FXSR_OPT) | f_gbpages | 0 /* RDTSCP */ | 1669 F(FXSR) | F(FXSR_OPT) | f_gbpages | f_rdtscp |
1669 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW); 1670 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW);
1670 /* cpuid 1.ecx */ 1671 /* cpuid 1.ecx */
1671 const u32 kvm_supported_word4_x86_features = 1672 const u32 kvm_supported_word4_x86_features =