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

Re: [Xen-devel] How to get a few MSR values from userspace?


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rzvncj@xxxxxxxxx>
  • Date: Fri, 21 Dec 2012 15:26:11 +0200
  • Delivery-date: Fri, 21 Dec 2012 13:25:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hello, thanks for the reply!

I'm not sure I understand what you are trying to achieve (nor am I
convinced I know how to help you, but if I don't understand the question
suffiiciently, I certainly can't advice you on what you can/should do or
can't/shouldn't do), but what MSR's are we talking about - the guest
MSR's or the host MSR's?

Sorry if I've not been clear. I want to access the MSRs of a Xen HVM guest, from a userspace application running in dom0, with the help of libxc.

Libxc already allows me to inspect the values of several registers, including a handful of MSRs, if I call:

xc_domain_hvm_getcontext_partial(xch, domain_id, HVM_SAVE_CODE(CPU),
                                 instance, &hw_ctxt, sizeof hw_ctxt);

and then examine, for example, hw_ctxt.msr_lstar.

What I'd like is to be able to check hw_ctxt.msr_mc0_ctl, for example, after the xc_domain_hvm_getcontext_partial().

Normally, reading MSR's in usermode is not allowed on bare-metal, so not
sure why you expect this to work in the guest (or Dom0) on top of Xen.
But maybe you don't actually mean userspace as opposed to "kernel mode"?

I mean accessing a domU's MSRs from dom0 userspace.

Thanks,
Razvan Cojocaru

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


 


Rackspace

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