aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.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/svm.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/svm.c')
-rw-r--r--arch/x86/kvm/svm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 41777e6d9761..7f4e225feebf 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2914,6 +2914,11 @@ static bool svm_gb_page_enable(void)
2914 return true; 2914 return true;
2915} 2915}
2916 2916
2917static bool svm_rdtscp_supported(void)
2918{
2919 return false;
2920}
2921
2917static struct kvm_x86_ops svm_x86_ops = { 2922static struct kvm_x86_ops svm_x86_ops = {
2918 .cpu_has_kvm_support = has_svm, 2923 .cpu_has_kvm_support = has_svm,
2919 .disabled_by_bios = is_disabled, 2924 .disabled_by_bios = is_disabled,
@@ -2982,6 +2987,8 @@ static struct kvm_x86_ops svm_x86_ops = {
2982 .gb_page_enable = svm_gb_page_enable, 2987 .gb_page_enable = svm_gb_page_enable,
2983 2988
2984 .cpuid_update = svm_cpuid_update, 2989 .cpuid_update = svm_cpuid_update,
2990
2991 .rdtscp_supported = svm_rdtscp_supported,
2985}; 2992};
2986 2993
2987static int __init svm_init(void) 2994static int __init svm_init(void)