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

Re: [Xen-devel] [edk2-devel] [PATCH v4 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables



On Wed, Aug 07, 2019 at 06:07:03PM +0200, Roger Pau Monné wrote:
> On Mon, Jul 29, 2019 at 04:39:42PM +0100, Anthony PERARD wrote:
> > XenIoPvhDxe use XenIoMmioLib to reserve some space to be use by the
> > Grant Tables.
> > 
> > The call is only done if it is necessary, we simply detect if the
> > guest is PVH, as in this case there is currently no PCI bus, and no
> > PCI Xen platform device which would start the XenIoPciDxe and allocate
> > the space for the Grant Tables.
> 
> Since I'm not familiar with OVMF code, where is the grant table
> physical memory coming from then, is it allocated from a hole in the
> memory map?

On HVM, we use the first BAR of the Xen platform PCI device. Since there
is no such thing on PVH, I simply allocate some memory for it, with
AllocateReservedPages() which mean allocate some pages and tell the OS
to not touch them.

We could deallocate these pages and give them back to the OS but that
would need some refactoring.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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