[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 1/5] x86/hvm: Setup TSC scaling ratio



On 02/29/2016 08:41 AM, Jan Beulich wrote:
On 28.02.16 at 13:54, <haozhong.zhang@xxxxxxxxx> 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.zhang@xxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.