xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* rdmsr general protection error
@ 2016-05-03 15:01 Big Strong
  2016-05-03 15:53 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Big Strong @ 2016-05-03 15:01 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 901 bytes --]

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:

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

//IA32_VMX_PROCBASED_CTLS 2

 __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?

[-- Attachment #1.2: Type: text/html, Size: 1917 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rdmsr general protection error
  2016-05-03 15:01 rdmsr general protection error Big Strong
@ 2016-05-03 15:53 ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-03 15:53 UTC (permalink / raw)
  To: Big Strong; +Cc: xen-devel

On Tue, May 03, 2016 at 11:01:32PM +0800, Big Strong wrote:
> 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:
> 
> //IA32_VMX_PROCBASED_CTLS
> >  __asm__ __volatile__("rdmsr" : "=a" (eax), "=d" (edx) : "c" (0x482));
> 
> //IA32_VMX_PROCBASED_CTLS 2
> 
>  __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?

Did you try using the /sysfs MSR entries?

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-03 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 15:01 rdmsr general protection error Big Strong
2016-05-03 15:53 ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).