Only do one memory:physical map per MCFG entry.
In order to better take advantage of the kernel's demand paging system, pcid can map the entire MMIO range for each MCFG entry, i.e. each (segment group, start bus..=end bus)
range, and rely on the kernel to lazily map (and unmap, although not yet impld). This reduces the number of memory:physical
grants, in QEMU, from 256 (1 seg group, bus 0..=255, 1 MiB each) to 1 (256 MiB). Segment groups will likely work as a result, but I kept the assert anyway as this has not been tested.
This works in QEMU, and has now also been verified to work on (my) real hardware.
Edited by Jacob Lorentzon