All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
To: xen-devel@lists.xensource.com
Subject: Re: Hypercall interface changes for PAE
Date: Tue, 31 May 2005 23:25:27 +0100	[thread overview]
Message-ID: <429CE457.5060501@blueyonder.co.uk> (raw)
In-Reply-To: <e9a279cfe1f147b0d1fdb752f0900a32@cl.cam.ac.uk>

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
    linking.

> 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@blueyonder.co.uk>

  parent reply	other threads:[~2005-05-31 22:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30 12:52 network (irq?) problems in unstable Gerd Knorr
2005-05-30 13:36 ` Keir Fraser
2005-05-31 10:18   ` Gerd Knorr
2005-05-31 10:59     ` Keir Fraser
2005-05-31 11:36       ` Gerd Knorr
2005-05-31 18:21         ` Hypercall interface changes for PAE Keir Fraser
2005-05-31 18:26           ` Keir Fraser
2005-05-31 19:02             ` Gerd Knorr
2005-05-31 19:23               ` Keir Fraser
2005-05-31 20:38                 ` Gerd Knorr
2005-05-31 21:18                   ` Keir Fraser
2005-05-31 21:40                     ` Keir Fraser
2005-05-31 22:25                 ` David Hopwood [this message]
2005-05-31 18:32           ` Jonathan S. Shapiro
2005-05-31 18:37             ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2005-05-31 22:42 Ian Pratt
2005-06-01  9:17 ` Gerd Knorr
2005-06-01  9:30 Ian Pratt
2005-06-01 10:04 ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429CE457.5060501@blueyonder.co.uk \
    --to=david.nospam.hopwood@blueyonder.co.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.