All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Eads, Joshua Michael (S&T-Student)" <jmer43@mst.edu>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: HVM context
Date: Sat, 10 Oct 2009 07:27:37 +0100	[thread overview]
Message-ID: <C6F5E7E9.171BB%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <BA45F53E48458E4D9E2DEBDF164A7E8C02EA2A@MST-VMAIL6.srv.mst.edu>

On 09/10/2009 22:47, "Eads, Joshua Michael (S&T-Student)" <jmer43@mst.edu>
wrote:

> I have an HVM guest and I am trying to have a usermode program in Dom0 query
> the context (CPU registers, specifically) of the guest.
> 
> I first tried using xc_domain_getcontext() in xenctrl.h but I haven't figured
> out what data structure ctxt_buf is that it returns.  Next, I have tried using
> xc_vcpu_getcontext() in xenctrl.h but so far it always returns -1 for failure.
> For xc_vcpu_getcontext, I am passing in a vcpu number of 1 (I only have a
> single virtual CPU domU running) along with an unallocated
> vcpu_guest_context_t pointer.
> 
> Is this the right direction to pull guest registers, or is there another
> method I need to use to get the HVM guest context?

For an HVM guest you can use xc_domain_hvm_getcontext() or
xc_domain_hvm_getcontext_partial(). You then have to pick apart the bag of
bytes you get back. The save format is documented to some extent in
xen/include/public/arch-x86/hvm/save.h

 -- Keir

  reply	other threads:[~2009-10-10  6:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 21:47 (no subject) Eads, Joshua Michael (S&T-Student)
2009-10-10  6:27 ` Keir Fraser [this message]
2009-10-10 14:34   ` HVM context Dan Magenheimer
2009-10-15  2:55   ` NAHieu
2009-10-15  6:47     ` Keir Fraser

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=C6F5E7E9.171BB%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=jmer43@mst.edu \
    --cc=xen-devel@lists.xensource.com \
    /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.