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/
Home Products Support Community News


Re: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR

To: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>, Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 11 Dec 2009 09:22:16 +0000
Cc: "Dugger, Donald D" <donald.d.dugger@xxxxxxxxx>
Delivery-date: Fri, 11 Dec 2009 01:22:40 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <EB8593BCECAB3D40A8248BE0B6400A3817EA6AA6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: Acp6BeJvxG9k2P+BT9C40QciKaIcFwAMn9NMAAFKvBAAAXhTdQ==
Thread-topic: [Xen-devel] RE: Saving/Restoring IA32_TSC_AUX MSR
User-agent: Microsoft-Entourage/
On 11/12/2009 08:43, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx> wrote:

>> The question has to be: what win do we get for faithful
>> virtualisation of RDTSCP in a virtualised environment? Supporting CPU
>> instructions just because they're there is not a useful effort.
> As I know, RDTSCP can used to implment fast vgetcpu in newer Linux kernel.
> Current node and cpu info is saved in the MSR, and applications or libraries
> can get this info at ring3 through this instruction. If enable this
> instruction for vmx non-root mode,  it should benefit these kernels I think.

Sounds reasonable. Obviously this will be incompatible with pvrdtscp, but
the latter is off by default so this isn't a too serious problem I think.
Pvrdtscp will simply trump ordinary RDTSCP emulation when it is enabled.

You can put your meddling with TSC_AUX MSR in the context-switch path,
regradless of whether pvrdtscp's stays in __update_vcpu_system_time().

In short: have at it.

 -- Keir

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>