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] getting a 32-bit mfn from a 32-on-64 HVM guest

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xen-Devel (xen-devel@xxxxxxxxxxxxxxxxxxx)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] getting a 32-bit mfn from a 32-on-64 HVM guest
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Sun, 20 Jun 2010 18:50:32 -0700 (PDT)
Cc:
Delivery-date: Sun, 20 Jun 2010 18:51:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C84414D9.1806B%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: <ab0e05c1-08c2-403d-92af-4528c6dbd982@default C84414D9.1806B%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> From: Keir Fraser [mailto:keir.fraser@xxxxxxxxxxxxx]
> Sent: Sunday, June 20, 2010 11:56 AM
> To: Dan Magenheimer; Xen-Devel (xen-devel@xxxxxxxxxxxxxxxxxxx)
> Subject: Re: [Xen-devel] getting a 32-bit mfn from a 32-on-64 HVM guest
> 
> On 20/06/2010 18:45, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
> wrote:
> 
> > What is the "proper" way to ensure that the cmfn
> > is properly truncated for a 32-bit HVM guest
> > without truncating it for a 64-bit guest?  I
> > have used is_pv_32on64_vcpu()... is there an equivalent
> > for HVM? Or do I need to do something entirely different?
> 
> See the x86_64 version of arch/x86/hvm/hvm.c:hvm_do_hypercall() which
> uses
> hvm_guest_x86_mode() to get the 'bitness' of the HVM-guest caller. You
> should do the same, probably. Or even have a compat shim around your
> hypercall same as others which have differences between 32- and 64-bit
> struct layouts, and have the dispatch tables in hvm.c (HVM callers) and
> entry.S (PV callers) dispatch to the correct entry point for the
> bitness of
> the caller.

Thanks!  The code was already in place for PV (see
tmh_get_tmemop_from_client() in include/xen/tmem_xen.h),
so I just had to add the case for HVM 32-on-64 and
it works!  A little more cleanup and I'll submit the patch.

Dan

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

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