From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4] x86/viridian: Add Partition Reference Time enlightenment Date: Tue, 14 Oct 2014 11:50:36 +0100 Message-ID: <1413283836.10417.36.camel@citrix.com> References: <1413283510-41287-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xdzgf-0001PX-Mg for xen-devel@lists.xenproject.org; Tue, 14 Oct 2014 10:50:41 +0000 In-Reply-To: <1413283510-41287-1-git-send-email-paul.durrant@citrix.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: Paul Durrant Cc: Keir Fraser , Stefano Stabellini , Christoph Egger , Ian Jackson , Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-10-14 at 11:45 +0100, Paul Durrant wrote: > The presence of the partition reference time enlightenment persuades newer > versions of Windows to prefer the TSC as their primary time source. Hence, > if rdtsc is not being emulated and is invariant then many vmexits (for > alternative time sources such as the HPET or reference counter MSR) can > be avoided. > > The implementation is not yet complete as no attempt is made to prevent > emulation of rdtsc if the enlightenment is active and guest and host > TSC frequencies differ. To do that requires invasive changes in the core > x86 time code and hence a lot more testing. > > This patch avoids the issue by disabling the enlightenment if rdtsc is > being emulated, causing Windows to choose another time source. This is > safe, but may cause a big variation in performance of guests migrated > between hosts of differing TSC frequency. Thus the enlightenment is not > enabled in the default set, but may be enabled to improve guest performance > where such migrations are not a concern. > > See section 15.4 of the Microsoft Hypervisor Top Level Functional > Specification v4.0a for details. > > Signed-off-by: Paul Durrant > Cc: Keir Fraser > Cc: Jan Beulich For tools/* Acked-by: Ian Campbell