]> xenbits.xensource.com Git - people/iwj/xen.git/commit
x86: Implement TSC adjust feature for HVM guest
authorLiu, Jinsong <jinsong.liu@intel.com>
Wed, 26 Sep 2012 10:12:42 +0000 (12:12 +0200)
committerLiu, Jinsong <jinsong.liu@intel.com>
Wed, 26 Sep 2012 10:12:42 +0000 (12:12 +0200)
commit6e0336351ed95e2f72e396b3e1d055a8f5663542
tree7a8e9ed2328d9d3169bd3d9580d0085b4d6def5e
parentbe3e4ed45e1bb0ec9aa2dfcd5450eec6ccc56dac
x86: Implement TSC adjust feature for HVM guest

IA32_TSC_ADJUST MSR is maintained separately for each logical
processor. A logical processor maintains and uses the IA32_TSC_ADJUST
MSR as follows:
1). On RESET, the value of the IA32_TSC_ADJUST MSR is 0;
2). If an execution of WRMSR to the IA32_TIME_STAMP_COUNTER MSR adds
    (or subtracts) value X from the TSC, the logical processor also
    adds (or subtracts) value X from the IA32_TSC_ADJUST MSR;
3). If an execution of WRMSR to the IA32_TSC_ADJUST MSR adds (or
    subtracts) value X from that MSR, the logical processor also adds
    (or subtracts) value X from the TSC.

This patch provides tsc adjust support for hvm guest, with it guest OS
would be happy when sync tsc.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/include/asm-x86/hvm/vcpu.h
xen/include/asm-x86/msr-index.h