xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel@lists.xen.org,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v4 00/10] Add VMX TSC scaling support
Date: Mon, 1 Feb 2016 13:50:11 +0800	[thread overview]
Message-ID: <20160201055011.GB25211@hz-desktop.sh.intel.com> (raw)
In-Reply-To: <1453067939-9121-1-git-send-email-haozhong.zhang@intel.com>

Hi Jan,

On 01/18/16 05:58, Haozhong Zhang wrote:
> This patchset adds support for VMX TSC scaling feature which is
> available on Intel Skylake Server CPU. The specification of VMX TSC
> scaling can be found at
> http://www.intel.com/content/www/us/en/processors/timestamp-counter-scaling-virtualization-white-paper.html
> 
> VMX TSC scaling allows guest TSC which is read by guest rdtsc(p)
> instructions increases in a rate that is customized by the hypervisor
> and can be different than the host TSC frequency. Basically, VMX TSC
> scaling adds a 64-bit field called TSC multiplier in VMCS so that, if
> VMX TSC scaling is enabled, TSC read by guest rdtsc(p) instructions
> will be calculated by the following formula:
> 
>   guest EDX:EAX = (Host TSC * TSC multiplier) >> 48 + VMX TSC Offset
> 
> where, Host TSC = Host MSR_IA32_TSC + Host MSR_IA32_TSC_ADJUST.
> 
> If the destination host supports VMX TSC scaling, this patchset allows
> guest programs in a HVM container in the default TSC mode or PVRDTSCP
> (native_paravirt) TSC mode to observe the same TSC frequency across
> the migration.
> 
> Changes in v4:
>  * v3 patch 1&2 have been committed so they are not included in v4.
>  * v3 patch 11 "x86/hvm: Detect TSC scaling through hvm_funcs" is merged
>    early into v4 patch 4 "x86/hvm: Collect information of TSC scaling ratio".
>  * v4 patch 1 - 8 correspond to v3 patch 3 - 10.
>    v4 patch 9 - 10 correspond to v3 patch 12 - 13.
>  * Other changes are logged in each patch respectively.
> 
> Changes in v3:
>  * v2 patch 1&2 have been merged so they do not appear in v3.
>  * Patch 1 - 6 correspond to v2 patch 3 - 8. Patch 7 is new.
>    Patch 8 - 13 correspond to v2 patch 9 - 14.
>  * Other changes are logged in each patch respectively.
> 
> Changes in v2:
>  * Remove unnecessary v1 patch 1&13.
>  * Add and move all bug-fix patches to the beginning of this series.
>    (Patch 1 - 6)
>  * Update changes in tsc_set_info() and tsc_get_info() to make both
>    functions consistent with each other. (Patch 2 - 4)
>  * Move a part of scaling logic out of [vmx|svm]_set_tsc_offset().
>    (Patch 7)
>  * Remove redundant hvm_funcs.tsc_scaling_ratio_rsvd. (Patch 8)
>  * Reimplement functions that calculate TSC ratio and scale TSC.
>    (Patch 9&10)
>  * Merge setting VMX TSC multiplier into patch 13.
>  * Move initialing tsc_scaling_ratio in VMX ahead to
>    vmx_vcpu_initialise() so as to make construct_vmcs() naturally
>    use this field instead of a constant. (Patch 13)
>  * Update documents related to tsc_mode.
>  * Other code cleanup and style fixes.
> 
> Haozhong Zhang (10):
>   x86/hvm: Scale host TSC when setting/getting guest TSC
>   x86/time.c: Scale host TSC in pvclock properly
>   svm: Remove redundant TSC scaling in svm_set_tsc_offset()
>   x86/hvm: Collect information of TSC scaling ratio
>   x86: Add functions for 64-bit integer arithmetic
>   x86/hvm: Setup TSC scaling ratio
>   x86/hvm: Replace architecture TSC scaling by a common function
>   x86/hvm: Move saving/loading vcpu's TSC to common code
>   vmx: Add VMX RDTSC(P) scaling support
>   docs: Add descriptions of TSC scaling in xl.cfg and tscmode.txt
> 
>  docs/man/xl.cfg.pod.5              | 14 +++++++-
>  docs/misc/tscmode.txt              | 21 ++++++++++++
>  xen/arch/x86/hvm/hvm.c             | 69 ++++++++++++++++++++++++++++++++------
>  xen/arch/x86/hvm/svm/svm.c         | 36 +++++++++-----------
>  xen/arch/x86/hvm/vmx/vmcs.c        | 12 +++++--
>  xen/arch/x86/hvm/vmx/vmx.c         | 25 +++++++++++---
>  xen/arch/x86/time.c                | 38 ++++++++++++++++-----
>  xen/include/asm-x86/hvm/hvm.h      | 20 +++++++++++
>  xen/include/asm-x86/hvm/svm/svm.h  |  3 --
>  xen/include/asm-x86/hvm/vcpu.h     |  2 ++
>  xen/include/asm-x86/hvm/vmx/vmcs.h |  7 ++++
>  xen/include/asm-x86/math64.h       | 47 ++++++++++++++++++++++++++
>  12 files changed, 242 insertions(+), 52 deletions(-)
>  create mode 100644 xen/include/asm-x86/math64.h
> 
> -- 
> 2.7.0
> 

I notice that the first three of this patch series have been
committed. Any comments on other ones?

Thanks,
Haozhong

  parent reply	other threads:[~2016-02-01  5:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 21:58 [PATCH v4 00/10] Add VMX TSC scaling support Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 01/10] x86/hvm: Scale host TSC when setting/getting guest TSC Haozhong Zhang
2016-01-18 13:39   ` Jan Beulich
2016-01-19  0:17     ` Haozhong Zhang
2016-01-19 14:27     ` Boris Ostrovsky
2016-01-17 21:58 ` [PATCH v4 02/10] x86/time.c: Scale host TSC in pvclock properly Haozhong Zhang
2016-01-18 13:42   ` Jan Beulich
2016-01-19  0:29     ` Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 03/10] svm: Remove redundant TSC scaling in svm_set_tsc_offset() Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 04/10] x86/hvm: Collect information of TSC scaling ratio Haozhong Zhang
2016-01-18 10:45   ` Egger, Christoph
2016-01-19  3:19     ` Haozhong Zhang
2016-02-05 11:41   ` Jan Beulich
2016-02-16  7:59     ` Zhang, Haozhong
2016-01-17 21:58 ` [PATCH v4 05/10] x86: Add functions for 64-bit integer arithmetic Haozhong Zhang
2016-02-05 13:36   ` Jan Beulich
2016-02-16  9:02     ` Zhang, Haozhong
2016-02-16  9:39       ` Jan Beulich
2016-02-16  9:57         ` Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 06/10] x86/hvm: Setup TSC scaling ratio Haozhong Zhang
2016-02-05 13:54   ` Jan Beulich
2016-02-16  9:44     ` Zhang, Haozhong
2016-02-16 10:12       ` Jan Beulich
2016-01-17 21:58 ` [PATCH v4 07/10] x86/hvm: Replace architecture TSC scaling by a common function Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 08/10] x86/hvm: Move saving/loading vcpu's TSC to common code Haozhong Zhang
2016-01-17 21:58 ` [PATCH v4 09/10] vmx: Add VMX RDTSC(P) scaling support Haozhong Zhang
2016-01-19  2:55   ` [RESEND PATCH " Haozhong Zhang
2016-02-05 14:06     ` Jan Beulich
2016-02-16  7:59       ` Zhang, Haozhong
2016-01-17 21:58 ` [PATCH v4 10/10] docs: Add descriptions of TSC scaling in xl.cfg and tscmode.txt Haozhong Zhang
2016-02-01  5:50 ` Haozhong Zhang [this message]
2016-02-01  7:54   ` [PATCH v4 00/10] Add VMX TSC scaling support Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160201055011.GB25211@hz-desktop.sh.intel.com \
    --to=haozhong.zhang@intel.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).