Re: [PATCH 1/1] direct mmio for passthrough - kernel part

Avi Kivity
2008-04-02T04:00:48Z

Anthony Liguori wrote:
>
> You could get away with supporting reserved RAM another way though.
> If we refactored the MMU to use hfn_t instead of struct page, you
> would then need a mechanism to mmap() reserved ram into userspace
> (similar to ioremap I guess). In fact, you may be able to just lie
> and claim reserved ram is IO ram.

We'd need it to return a (hfn_t, page_type_t) pair so the caller would
know whether to use page refcounting or not. The caller might be able
to ask Linux whether the page has a struct page or not, but it gets hairy.

That's why I'm interested in the possibility of adding struct pages at
runtime. vmemmap is needed for many other reasons (NUMA, memory hotplug,
sparse SGI memory) so it's reasonable that it will be enabled on most
distros.

--
Any sufficiently difficult bug is indistinguishable from a feature.