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

[Xen-devel] pointers in hcalls

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] pointers in hcalls
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 07 Feb 2006 13:58:05 +1100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 07 Feb 2006 03:09:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This is a followup to our conversation at the Xen summit about userspace
passing virtual addresses to the hypervisor.

We talked about an API where data structures would be allocated from a
special area of memory. This API became rather hairy, which we can talk
about. However, it seems to me that the simplest way to handle this is
to disallow pointers entirely, instead embedding the structures in the
higher-level structure. I've had a look through this, and I actually
don't think that would be too bad.

When performing this conversion, we could initially exempt the
arch-specific hcalls. For consistency I think we'd want to do them all,
but that's not necessary for correctness. Also, constraining these
expanded structures to a single page would be best.

So I had a look through most (all?) of the hcalls in
xen/include/public/*.h to see which would pose problems. I don't see any
show-stoppers:
- some hcalls, such as dom0_setvcpucontext and dom0_getvcpucontext,
would be trivial to convert.
- I haven't looked at the ACM hcalls in detail, but I think they would
be trivial as well.
- xc_readconsolering() would need to copy up to a page of data into the
caller's buffer.
- it would introduce a hard restriction on the size of the extent array
in the memory operations (though it's worth noting that the balloon
driver already limits this to PAGE_SIZE).
- dom0_perfccontrol and dom0_getdomaininfolist would gain restrictions
similar to the memory ops.

Thoughts?

-- 
Hollis Blanchard
IBM Linux Technology Center


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

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