WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] HVM context

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] HVM context
From: NAHieu <nahieu@xxxxxxxxx>
Date: Thu, 15 Oct 2009 11:55:29 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 14 Oct 2009 19:55:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Lwa9JQeivm7Lwvizk8N23gc7CytXpXjJIcoiHalw9pE=; b=T0PBDCq2em0xdgE46BxEx+qdAtIN7mSTqH7qmuq7miCL6dW66Y/Pmyre1ver9iw1LF g4WAyJ3MIrzTV80+xRWxTckV1nfh1JrHB2vqj5UlJ18RnvORtVvJLfLEuFL8Hvngv360 3lSGoZ9AWW5jAyw1QiO71RYPdUXEATSIpkx3U=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=pA2LwKpG5kjoaqMd9Ujw3l3yY2Q1x/ssJAko5OKJwkSCTcPZmannyYdHvwd84VnhPB rHrxPHhkI0LfxS2ypdjA4K2adKiw247C+1riT97EdCmWJSsXUlsFUCMjZxR6E0hh1gQ/ pj938ASFmX8lyN04NIcyRhe8iBCrYbhAM5wb0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6F5E7E9.171BB%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BA45F53E48458E4D9E2DEBDF164A7E8C02EA2A@xxxxxxxxxxxxxxxxxxxxxx> <C6F5E7E9.171BB%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, Oct 10, 2009 at 3:27 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 09/10/2009 22:47, "Eads, Joshua Michael (S&T-Student)" <jmer43@xxxxxxx>
> 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

So that means xc_vcpu_getcontext() is only valid for PV domains?

Thanks,
H

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>