diff options
author | Sheng Yang <sheng@linux.intel.com> | 2009-12-18 03:48:47 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:40 -0500 |
commit | 4e47c7a6d714cf352b719db92a924b6ec487acc5 (patch) | |
tree | b968765b85124e0b59f415bf8e4d499ef953236e /arch/x86/kvm/svm.c | |
parent | 0e85188049afacdfce9c026144142264981bbabb (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.c | 7 |
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 | ||
2917 | static bool svm_rdtscp_supported(void) | ||
2918 | { | ||
2919 | return false; | ||
2920 | } | ||
2921 | |||
2917 | static struct kvm_x86_ops svm_x86_ops = { | 2922 | static 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 | ||
2987 | static int __init svm_init(void) | 2994 | static int __init svm_init(void) |