From: Razvan Cojocaru <rzvncj@gmail.com>
To: xen-devel@lists.xen.org
Subject: Re: How to get a few MSR values from userspace?
Date: Fri, 21 Dec 2012 15:26:11 +0200 [thread overview]
Message-ID: <50D46373.10802@gmail.com> (raw)
In-Reply-To: <50D4611C.6030206@citrix.com>
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
next prev parent reply other threads:[~2012-12-21 13:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 12:45 How to get a few MSR values from userspace? Razvan Cojocaru
2012-12-21 13:16 ` Mats Petersson
2012-12-21 13:26 ` Razvan Cojocaru [this message]
2012-12-21 13:53 ` Jan Beulich
2012-12-21 14:08 ` Razvan Cojocaru
2012-12-21 14:39 ` Mats Petersson
2012-12-21 16:01 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D46373.10802@gmail.com \
--to=rzvncj@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.