From: Dan Magenheimer Subject: xen pv and cpuid Date: Mon, 26 Oct 2009 10:44:51 -0700 (PDT) Message-ID: <53cc3e0c-6b3a-44fd-a4f4-c336296daaac@default> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1929847710==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org --===============1929847710== Content-Type: multipart/alternative; boundary="__12565791131145117abhmt014.oracle.com" --__12565791131145117abhmt014.oracle.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Silly x86 question of the day: Is it true in a PV domain that there is no way (short of binary translation= ) to trap a userland cpuid instruction into Xen? I found the routine pv_cpuid() in arch/x86/traps.c and assumed that userlan= d cpuid's would find their way into that code, but it appears to not be the= case. After adding some printks and reading the code more closely, I gath= er that PV OS's somehow get their cpuid instructions replaced with an inval= id op so that kernel-land cpuid's do indeed get trapped? Then looking at th= e Intel SDM I don't see any way to force cpuid at any privilege level to tr= ap (except in an HVM)? (If this is all correct, then I am sadly back to needing userland hypercall= s :-( Thanks, Dan --__12565791131145117abhmt014.oracle.com Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Silly x= 86 question=20 of the day:
 
Is it t= rue in a PV=20 domain that there is no way (short of binary translation) to trap a=20 userland cpuid instruction into Xen?
 
I found= the routine=20 pv_cpuid() in arch/x86/traps.c and assumed that userland cpuid's would&nb= sp;find=20 their way into that code, but it appears to not be the case.  A= fter=20 adding some printks and reading the code more closely, I gather that PV O= S's=20 somehow get their cpuid instructions replaced with an invalid op so that=20 kernel-land cpuid's do indeed get trapped? Then looking at the Intel= SDM I=20 don't see any way to force cpuid at any privilege level to trap (except i= n an=20 HVM)?
 
(If thi= s is all=20 correct, then I am sadly back to needing userland hypercalls=20 :-(
 
Thanks,
Dan
 
--__12565791131145117abhmt014.oracle.com-- --===============1929847710== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1929847710==--