From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 13/13] tools/libxl: Add 'vtsc_khz' option to set guest TSC rate Date: Tue, 29 Sep 2015 11:24:36 +0100 Message-ID: <560A66E4.2010205@citrix.com> References: <1443424438-13404-1-git-send-email-haozhong.zhang@intel.com> <1443424438-13404-14-git-send-email-haozhong.zhang@intel.com> <1443521054.16718.29.camel@citrix.com> <20150929101339.GC3789@hzzhang-OptiPlex-9020.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150929101339.GC3789@hzzhang-OptiPlex-9020.sh.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org, Ian Jackson , Stefano Stabellini , Wei Liu , Keir Fraser , Jan Beulich , Boris Ostrovsky , Suravee Suthikulpanit , Aravind Gopalakrishnan , Jun Nakajima , Kevin Tian List-Id: xen-devel@lists.xenproject.org On 29/09/15 11:13, Haozhong Zhang wrote: > On Tue, Sep 29, 2015 at 11:04:14AM +0100, Ian Campbell wrote: >> On Mon, 2015-09-28 at 15:13 +0800, Haozhong Zhang wrote: >>> This patch adds an option 'vtsc_khz' to allow users to set vcpu's TSC >>> rate in KHz. In the case that tsc_mode = 'default', the default value of >>> 'vtsc_khz' option is the host TSC rate which is used when 'vtsc_khz' >>> option is set to 0 or does not appear in the configuration. In all other >>> cases of tsc_mode, 'vtsc_khz' option is just ignored. >>> >>> Another purpose of adding this option is to keep vcpu's TSC rate across >>> guest reboot. In existing code, a new domain is created from the >>> configuration of the previous domain which was just rebooted. vcpu's TSC >>> rate is not stored in the configuration and the host TSC rate is the >>> used as vcpu's TSC rate. This works fine unless the previous domain was >>> migrated from another host machine with a different host TSC rate than >>> the current one. >> I understand why this is necessary over a migration, but why is it >> important to be able to retain the TSC rate across a reboot? What is the >> usecase there? >> > No usecase so far. Is 'making a virtual machine more like a physical > machine' reasonable here? (I suppose a physical machine retains TSC > rate across reboot) There are situations such as altering firmware settings which can cause the TSC rate to differ across reboot. I don't see any reason to try and maintain it across VM reboots. ~Andrew