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] hypercall_xlat_continuation()

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] hypercall_xlat_continuation()
From: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Date: Thu, 28 May 2009 20:01:08 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Thu, 28 May 2009 20:01:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A1DF87A.5050008@xxxxxxxxxx>
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>
Organization: Oracle Corp
References: <C63D8BDE.BAC5%keir.fraser@xxxxxxxxxxxxx> <1243118659.26568.37.camel@xxxxxxxxxxxxxxxxxxxxx> <4A1DF87A.5050008@xxxxxxxxxx>
Reply-to: mukesh.rathor@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090320)


Mukesh Rathor wrote:


Ian Campbell wrote:
On Sat, 2009-05-23 at 06:17 -0400, Keir Fraser wrote:
On 22/05/2009 22:58, "Mukesh Rathor" <mukesh.rathor@xxxxxxxxxx> wrote:

Ok. Even if I can't make it clearer, at least I'll add few lines of comments
explaining what's going on, after (and if) I figure it out.

Jan,

It seems assumption is made that a 64bit dom0 will not have a 32bit app making
hypercall?

BUG_ON(*reg != (unsigned int)*reg);  <====
You know that all the 'xlat' stuff in Xen is for 32-bit guests running on
64-bit hypervisor, right? 64-bit dom0 would never execute this logic.

It's worth noting though that I don't believe a 32 bit dom0 toolstack on
a 64 bit kernel on a 64 bit hypervisor will work. In particular the
privcmd "make a hypercall" ioctl doesn't do any compat translation so 32
bit xend and friends can't make hypercalls that way and I think the
MMAPBATCH privcmd doesn't work either.

I'm sure there are other cases too (blktap user<->kernel ring layout
maybe?).

Ian.

Thanks Ian for good explanation of hypercall_xlat_continuation().

yeah, I'm just exploring that right now. There is MMAPBATCH_32, btw, in
dom0 that looks like was implemented by PPC folks. Also, MMAP_32.
I was able to start PV guest without network. Not sure if that was
because of compatibility or some other issue. I'm just looking at MMAP
stuff right now, think I finally figured out the chain of calls from
libxc to hyp to dom0 ... ia32_sys_call_table to compat_sys_ioctl to
handler to do_ioctl32_pointer .. whew!!

Thanks,
Mukesh


yeah, looks like privcmd_ioctl_32() only fixes the wrapper struct. The
PFN array still is 32bit pfn's, and privcmd_ioctl() expects 64bits. So,
in a dilemma now, not sure if I should fix it up in privcmd_ioctl_32()
or change privcmd_ioctl() which will take some time to reverse engineer.
Not sure how many things I'll discover, if it's too many, it may
not be worth it in the end.

Thanks,
Mukesh



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