Bug#759018: [Xen-devel] Bug#759018: [PATCH RFC] Provide prebuilt grub-xen binaries for host (dom0) use

Ian Campbell ijc at hellion.org.uk
Thu Sep 4 14:58:00 UTC 2014


On Thu, 2014-09-04 at 15:38 +0100, Andrew Cooper wrote:
> There is no real technical obstacle to prevent PV domains switching
> width after starting.

All I know is that when this stuff was first invented lots of people
thought quite hard about this and it is trickier than you might think.

> 
> In the past, the toolstack has directly loaded the target running
> kernel, but that behaviour/assumption is no longer correct given these
> chainloading plans.
> 
> As we no longer support 2-level PV guests, allowing a PV domain to
> switch between 3 and 4 levels becomes easier to manage from Xens point
> of view.
> 
> From the top of my head, it would involve relaxing the restriction that
> 3 level PV guests can't pin L4 tables (but still enforce that a 3 level
> PV guest can't load an L4 pagetable), and provide a new hypercall which
> takes a desired with, new cr3 (referring to a pinned pagetable of the
> appropriate new width) and a new eip to jump to.

and rewrite/remap the p2m and m2p tables on the fly. and arrange somehow
that all the memory used by the guest is actually visible in the m2p
mapping for that guest (since 32-bit guests don't see the whole host
m2p). and a couple of other things which I can't quite remember right
now.

Anyway, you are welcome to try ;-)

Ian.



More information about the Pkg-grub-devel mailing list