From: "Jan Beulich" Subject: Re: xen pv and cpuid Date: Tue, 27 Oct 2009 09:37:22 +0000 Message-ID: <4AE6CD62020000780001BF67@vpn.id2.novell.com> References: <53cc3e0c-6b3a-44fd-a4f4-c336296daaac@default> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <53cc3e0c-6b3a-44fd-a4f4-c336296daaac@default> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org There's one other mechanism in use here - masking CPUID feature bits through special vendor MSRs. See the handling of the command line options cpuid_mask_{edx,ecx} in xen/arch/x86/cpu/. But this is a global mask (i.e. also affecting what Xen itself sees), and isn't available on = all CPU models... Jan >>> Dan Magenheimer 26.10.09 18:44 >>> 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 = userland 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 gather that PV OS's somehow get their cpuid instructions = replaced with an invalid op so that kernel-land cpuid's do indeed get = trapped? Then looking at the Intel SDM I don't see any way to force cpuid = at any privilege level to trap (except in an HVM)? (If this is all correct, then I am sadly back to needing userland = hypercalls :-( Thanks, Dan