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

Andrea Arcangeli
2008-04-01T22:38:06Z

On Tue, Apr 01, 2008 at 10:22:51PM +0300, Avi Kivity wrote:
> It's just something we discussed, not code.

Yes, the pfn_valid check should skip all refcounting for mmio regions
without a struct page. But gfn_to_page can't work without a struct
page, so some change will be needed there. With the reserved ram patch
I didn't need to touch the gfn_to_page interface because the memmap
happens to exist despite the ram is reserved in the e820 map, so I
used !page_count() instead of the previously discussed !pfn_valid to
skip all refcounting (reserved ram must skip the refcounting too
because those ram pages can't be freed as they're not-ram as far as
linux is concerned).