summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-12-18 16:48:47 +0800
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 12:35:40 -0300
commit4e47c7a6d714cf352b719db92a924b6ec487acc5 (patch)
treeb968765b85124e0b59f415bf8e4d499ef953236e /arch/x86/kvm/svm.c
parent0e85188049afacdfce9c026144142264981bbabb (diff)
downloadlwn-4e47c7a6d714cf352b719db92a924b6ec487acc5.tar.gz
lwn-4e47c7a6d714cf352b719db92a924b6ec487acc5.zip
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)
return true;
}
+static bool svm_rdtscp_supported(void)
+{
+ return false;
+}
+
static struct kvm_x86_ops svm_x86_ops = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -2982,6 +2987,8 @@ static struct kvm_x86_ops svm_x86_ops = {
.gb_page_enable = svm_gb_page_enable,
.cpuid_update = svm_cpuid_update,
+
+ .rdtscp_supported = svm_rdtscp_supported,
};
static int __init svm_init(void)