[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] rdmsr general protection error

  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Big Strong <fangtuo90@xxxxxxxxx>
  • Date: Tue, 3 May 2016 23:01:32 +0800
  • Delivery-date: Tue, 03 May 2016 15:01:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

I want to test if my processor support VMFUNC which is described as:

The IA32_VMX_VMFUNC MSR exists only on processors that support the 1-setting of the “activate secondary controls” VM-execution control (only if bit 63 of the IA32_VMX_PROCBASED_CTLS MSR is 1) and the 1-setting of the “enable VM functions” secondary processor-based VM-execution control (only if bit 45 of the IA32_VMX_PROCBASED_CTLS2 MSR is 1).

So in order to do that, I need to use rdmsr as follows:

 __asm__ __volatile__("rdmsr" : "=a" (eax), "=d" (edx) : "c" (0x482)); 
 __asm__ __volatile__("rdmsr" : "=a" (eax), "=d" (edx) : "c" (0x48B)); 

But both the rdmsr instruction would cause a #GP, even when I run it from the native linux as a root user and without xen running.

So is there a way to use the rdmsr in dom0?
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.