[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/9] Linux kernel infrastructure for Xen Share access

Rusty Russell wrote:

The entire hypercall interface is arch-wrapped, which is probably
overkill, but I wasn't entirely sure of the needs of non-x86
architectures.  Some of this should almost certainly be in common code.

diff -r 6d476981e3a5 -r 07a00d96357d 

+struct xen_share *create_share(share_ref_t share_ref, unsigned pages)


+       err = direct_kernel_remap_pfn_range((unsigned long)vma->addr,
+                                           share_ref, pages * PAGE_SIZE,
+                                           prot, DOMID_SELF);

Using share_ref as the 2nd parameter to remap_pfn_range it becomes clear that share_ref is really a page frame number. This is also made clear in xen/arch/x86/share.c.

My question is: is it useful to abstract the share reference when it is always going to be a page number? Is there any architecture where it wouldn't be feasible to refer to a share by page number?

Really this is just a readability issue.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.