|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] SVM: enables TSC scaling ratio support for SVM
Future AMD CPUs support TSC scaling. It allows guests to have a
different TSC frequency from host system using this formula: guest_tsc =
host_tsc * tsc_ratio + vmcb_offset. The tsc_ratio is a 64bit MSR
contains a fixed-point number in 8.32 format (8 bits for integer part
and 32bits for fractional part). For instance 0x00000003_80000000 means
tsc_ratio=3.5.
This patch enables TSC scaling ratio for SVM. With it, guest VMs don't
need take #VMEXIT to calculate a translated TSC value when it is running
under TSC emulation mode. This can SUBSTANTIALLY reduce the rdtsc overhead.
Signed-off-by: Wei Huang <wei.huang2@xxxxxxx>
arch/x86/hvm/svm/svm.c | 32 +++++++++++++++++++++++++++++++-
arch/x86/hvm/svm/vmcb.c | 4 +++-
include/asm-x86/hvm/svm/svm.h | 8 ++++++++
include/asm-x86/msr-index.h | 3 +++
4 files changed, 45 insertions(+), 2 deletions(-)
xen_tsc_ratio.txt
Description: xen_tsc_ratio.txt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] SVM: enables TSC scaling ratio support for SVM,
Wei Huang <=
|
|
|
|
|