On 02/29/2016 08:41 AM, Jan Beulich wrote:
On 28.02.16 at 13:54, <haozhong.zh...@intel.com> wrote:
This patch adds a field tsc_scaling_ratio in struct hvm_domain to record
the per-domain TSC scaling ratio, and sets it in tsc_set_info().
Before setting the per-domain TSC scaling ratio, we check its validity
in tsc_set_info(). If an invalid ratio is given, we will leave the
default value in tsc_scaling_ratio (i.e. ratio = 1) and setup guest TSC
as if no TSC scaling is used:
* For TSC_MODE_FAULT,
s/TSC_MODE_FAULT/TSC_MODE_DEFAULT/
-boris
- if a user-specified TSC frequency is given, we will set the guest
TSC frequency to it; otherwise, we set it to the host TSC frequency.
- if guest TSC frequency does not equal to host TSC frequency, we will
emulate guest TSC (i.e. d->arch.vtsc is set to 1). In both cases,
guest TSC runs in the guest TSC frequency.
* For TSC_MODE_PVRDTSCP,
- we set the guest TSC frequency to the host TSC frequency.
- guest rdtsc is executed natively in the host TSC frequency as
before.
- if rdtscp is not available to guest, it will be emulated; otherwise,
it will be executed natively. In both cases, guest rdtscp gets TSC
in the host TSC frequency as before.
Signed-off-by: Haozhong Zhang <haozhong.zh...@intel.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel