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

Andrea Arcangeli
2008-04-01T22:22:51Z

On Tue, Apr 01, 2008 at 01:21:37PM -0500, Anthony Liguori wrote:
> return a page, not a HPA. I haven't looked too deeply yet, but my
> suspicion is that to properly support mapping in VM_IO pages will require
> some general refactoring since we always assume that a struct page exists
> for any HPA.

Yes, that was potentially problem for reserved _ram_ pages too, as it
isn't guaranteed that memmap_t (old days nomenclature) will exist for
physical addresses not defined as ram in the e820 map (to make it work
without VT-d I have to reserve the ram in the host at the e820 map
parsing time). If the memmap will not exist for the reserved ram
physical range, the pfn_valid() will fail at runtime in kvm and the
bad_page will generate a graceful emulation failure, so it's very
safe. But once we handle direct memslots for mmio regions, the
reserved ram will better stop depending on the memmap too.