Previously, if the high PCIe MMIO window did not fit in the guest
physical address space, it was silently disabled, leaving no room to
place any 64-bit BAR too large for the 32-bit window. On hosts with a
small IPA space (e.g. a 36-bit IPA), this made devices like virtio-gpu
with a large hostmem BAR unusable.
Instead, shrink the window to the largest power of two that fits (no
smaller than 1GiB) and warn about it. Only if even the minimum does not
fit is the window disabled, and each high region now warns when it is
disabled for not fitting rather than vanishing silently.
To make room at all on such hosts, skip the legacy 256GiB floor for the
high IO region when the high regions cannot fit there, placing them
right above RAM instead. !highmem keeps the floor since disabling the
regions is the point of that option.
Accordingly, highmem-mmio-size now accepts any power of 2 down to 1GiB
instead of rejecting values below the 512GiB default.
Assisted-by: Claude:claude-fable-5