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] [PATCH] Implement rdtscp emulation and rdtscp_aux "suppo

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Implement rdtscp emulation and rdtscp_aux "support"
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 26 Nov 2009 08:15:10 +0000
Delivery-date: Thu, 26 Nov 2009 00:15:34 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <f85e042d-d08b-48e7-b889-292e9107dc1d@default>
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>
References: <f85e042d-d08b-48e7-b889-292e9107dc1d@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> 25.11.09 22:24 >>>
>Xen intentionally does not expose the cpuid rdtscp bit
>to PV OS's or to HVM guests, but PV apps can see this
>bit and, as a result, may choose to use the rdtscp
>instruction.  When a PV guest with such an app is migrated
>to a machine that does not have rdtscp support, the
>app will get killed due to an invalid op.  Fix this
>by emulating the rdtscp instruction.  We also need
>to emulate rdtscp in the case where the machine has
>rdtscp support, but rdtsc emulation is enabled (which
>is unfortunately a different path: a privileged op).

I realize that my comment really applies to your earlier patch introducing
rdtsc emulation, but somehow that aspect slipped my attention back
then: Linux has, as a security option, a mechanism to disable rdtsc for
apps, but your emulation code doesn't honor the guest setting of


Xen-devel mailing list