aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_cpuid_x86.c
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@amd.com>2011-07-16 09:23:22 +0100
committerChristoph Egger <Christoph.Egger@amd.com>2011-07-16 09:23:22 +0100
commitfd14a1943c43c3c898711fa8f3f1ea9017da87d0 (patch)
tree0171c5383414aae3f29d0cb461103606c38ae382 /tools/libxc/xc_cpuid_x86.c
parent68b5b855954787fedc8b03a2fdb6ebedfe07d366 (diff)
downloadxen-fd14a1943c43c3c898711fa8f3f1ea9017da87d0.tar.gz
xen-fd14a1943c43c3c898711fa8f3f1ea9017da87d0.tar.bz2
xen-fd14a1943c43c3c898711fa8f3f1ea9017da87d0.zip
nestedsvm: Support TSC Rate MSR
Support TSC Rate MSR and enable TSC scaling for nested virtualization. With it, guest VMs don't need take #VMEXIT to calculate a translated TSC value when it is running under TSC emulation mode. I measured native performance of the rdtsc instruction in the l2 guest with xen-on-xen and both host and and l1 guest run under TSC emulation mode. TSC scaling just needs MSR emulation and correct tsc offset calculation to be done and thus can be emulated also on older hardware. In this case rdtsc instruction is intercepted and handled by the host directly and safes the cost of a full VMRUN/VMEXIT emulation cycle. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/libxc/xc_cpuid_x86.c')
-rw-r--r--tools/libxc/xc_cpuid_x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index d41f0b0ece..0796ae91d2 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -157,7 +157,7 @@ static void amd_xc_cpuid_policy(
SVM_FEATURE_DECODEASSISTS);
/* Pass 2: Always enable SVM features which are emulated */
- regs[3] |= SVM_FEATURE_VMCBCLEAN;
+ regs[3] |= SVM_FEATURE_VMCBCLEAN | SVM_FEATURE_TSCRATEMSR;
break;
}