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

Re: [Xen-devel] Hypercall interface changes for PAE

Keir Fraser wrote:
On 31 May 2005, at 20:02, Gerd Knorr wrote:

That certainly would be the way to go if we want to have
different interfaces for PAE and non-PAE.  I'm not sure it
is a good idea to have different hypercall interfaces for
PAE and non-PAE cases in the first place.

What does this mean for the tools?  Would these also be
either PAE or non-PAE then?

At least some parts of the tools (e.g., libxc) will need re-building for PAE as they know about the structure of pagetables (2-level vs. 3-level and so on). Either that or we need to compile both cases into the library and auto-switch between implementations of some functions at run time. Either way, this problem isn't solved by making the mmu hypercalls 'binary compatible' across pae/non-pae.

But it is greatly simplified, IIUC. If the hypercalls are binary compatible
then you have only one set of hypercall interface functions and types, and
switching between two *implementations* of pagetable-related stuff (only
the things that actually need to be different) is quite straightforward.
If you are trying to auto-switch between two hypervisor interfaces that
use different types, then I can think of several ways of doing that, but
they are all significantly more complicated:

a) use preprocessor hackery to declare the interface headers twice with
   different symbol prefixes,
b) use different hypercalls where needed (i.e. not just the same hypercall
   with different types) for PAE and non-PAE
c) compile libxc twice and switch between the versions using dynamic

If we really do care about compatibility across pae/non-pae, I would do this by making the pte_val a u64 in all cases rather than splitting pfn from flags. Then everyone would just ignore the upper 32 bits on non-pae systems. This would waste no more space than 32-bit pfn + 32-bit flags.

Right, that makes sense.

I'm fairly neutral on this: if we're happy to make definitions of things like pte's and physaddr's be u64 even on non-pae then that may help binary compatibility in future at probably very little cost here and now. OTOH we can't be fully binary compatible without shadow pagetables anyway, because the pagetable structure differs, so is the effort worth it?

Yes, I think so: the code for the tools will end up being much simpler
if PAE and non-PAE are as similar as possible.

David Hopwood <david.nospam.hopwood@xxxxxxxxxxxxxxxx>

Xen-devel mailing list



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