[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: Implement domain_get_maximum_gpfn
On Wed, 2014-07-02 at 10:50 +0100, Jan Beulich wrote: > >>> On 02.07.14 at 11:41, <Ian.Campbell@xxxxxxxxxx> wrote: > > On Wed, 2014-07-02 at 10:37 +0100, Julien Grall wrote: > >> On 02/07/14 10:22, Ian Campbell wrote: > >> > Any reason why both arm and x86 can't just use a fixed scratch pfn for > >> > this temporary mapping? Both of them surely have spaces which they can > >> > guarantee won't overlap with anything. > >> > >> This was the previous behavior until last November. > >> > >> commit db062c28f30eb68d1b5d7a910445a0ba1136179a > >> Date: Wed Nov 13 09:26:13 2013 +0100 > >> > >> libxc: move temporary grant table mapping to end of memory > >> > >> In order to set up the grant table for HVM guests, libxc needs to map > >> the grant table temporarily. At the moment, it does this by adding the > >> grant page to the HVM guest's p2m table in the MMIO hole (at gfn > >> 0xFFFFE), > >> then mapping that gfn, setting up the table, then unmapping the gfn and > >> removing it from the p2m table. > >> > >> This breaks with PVH guests with 4G or more of ram, because there is > >> no MMIO hole; so it ends up clobbering a valid RAM p2m entry, then > >> leaving a "hole" when it removes the grant map from the p2m table. > >> Since the guest thinks this is normal ram, when it maps it and tries > >> to access the page, it crashes. > >> > >> This patch maps the page at max_gfn+1 instead. > >> > >> I'm not sure what to do for x86, so I was planning to introduce a per-arch > > hook to retrieve a scratch gpfn. > >> x86 would keep the current behavior, and ARM will use the GNTTAB space in > > the layout. > > > > Perhaps x86 could use some well known MMIO space, like the APIC at > > 0xfff???? > > Except that PVH has no LAPIC right now. Yet with the recent hole > punching patches I wonder whether "there is no MMIO hole" is actually > correct. Roger? Another option might be to just burn a special pfn on a scratch mapping. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |