WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [PATCH] softtsc (was RE: [Xen-devel] Guest TSC and Xen (Intel and AM

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, "Zhang, Li" <li.zhang@xxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] softtsc (was RE: [Xen-devel] Guest TSC and Xen (Intel and AMD feedback please))
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 10 Jul 2008 10:18:57 +0100
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Delivery-date: Thu, 10 Jul 2008 02:19:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080709153251828.00000003744@djm-pc>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcjboIivPTuddHlLSIGPaPhte5VM5wASModQADA1FBAAMHiVIAAjyGRgAKf/8qAAAXmfcAABT0gwAABianAAB1i/gAAAqGFQAAV3jZAAHxjV8AAr0sqQABkkb9U=
Thread-topic: [PATCH] softtsc (was RE: [Xen-devel] Guest TSC and Xen (Intel and AMD feedback please))
User-agent: Microsoft-Entourage/11.4.0.080122
On 9/7/08 22:32, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> The attached patch adds a new Xen boot option "softtsc" that
> causes all hvm domains to trap and emulate all rdtsc instructions
> and fetch Xen system time instead of the hardware tsc.  As
> a result, the processor will appear to be running at 1000.xyz MHz
> (where xyz indicates some fraction that seems to vary slightly
> across different boots).  I've also added a line of output to
> "xm debug-key t" to report softsc and tsc-related CPU features.
> 
> (Keir, though 3.3 functionality freeze is past, this is more of a
> diagnostic aid and defaults off, so I don't know if you would
> consider it for 3.3.)

Yes, I will take it, but have the following comments.
 1. Why do you define new boolean 'constant_tsc'? Can you just use
test_bit(X86_FEATURE_CONSTANT_TSC)?
 2. Your change in common/keyhandler.c breaks ia64. :-)
 3. Your change to arch/x86/time.c looks unnecessary.
 4. Should you catch SVM's RDTSCP vmexit as well as RDTSC?

 -- Keir




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel