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


[Xen-devel] rdtscp on HVM domains

To: "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] rdtscp on HVM domains
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Wed, 2 Dec 2009 11:32:24 -0800 (PST)
Cc: Mark Langsdorf <mark.langsdorf@xxxxxxx>, "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Delivery-date: Wed, 02 Dec 2009 11:33:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
I've just discovered that the rdtscp instruction
doesn't work at all in a VMX (Intel HVM) domain,
even on a Nehalem physical machine that supports
the rdtscp instruction in hardware.  (I don't
have an AMD machine handy to test... reading the
code it appears to me it won't work there either,
but I'm not positive.)

Since Xen doesn't expose the rdtscp bit in cpuid,
this may make sense, but the pvrdtscp algorithm
asks Xen directly whether the physical machine
supports rdtscp and then uses the rdtscp instruction
if Xen answers yes.   Ideally, we'd like to allow
these enterprise apps to work (fast and correctly)
both on PV and HVM.

So questions for VMX/SVM experts:
1) Is it possible for VMX (and SVM) to allow rdtscp
   to execute natively on machines that support it
   without exposing the rdtscp bit in cpuid?
2) Is it possible for VMX (and SVM) to trap and
   emulate rdtscp on machines that DON'T support


Xen-devel mailing list

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