Hi John,
Versions of OVMF in Jammy and earlier do not contain
https://github.com/tianocore/edk2/commit/ecb778d0ac62560aa172786ba19521f27bc3f650,
and as a result, there is no need for users to force a smaller
opt/ovmf/X-PciMmio64Mb on those releases when passing through a large
BAR GPU since the default window size pre-PlatformDynamicMmioWindow is
already too small for GPUs which experience this initialization time
issue noticeably. (and thus, the faster boot behavior that this patch
allows us to re-enable in Noble is the default behavior for Jammy and
before, for sufficiently large GPUs).
Since the slowness is only really noticeable/significant on these very
large-BAR GPUs, I don't have any use cases in mind for why one would
want to force a smaller aperture size on Jammy and before.
However, theoretically, there could be cases where a user would still
want to do this independent of initialization time improvements, so we
could still prepare a Jammy SRU if you'd like - it just is not something
that would be needed or used from my side.
As for tests, the same approach that we use on DGX should work to test generic
hardware as well. You won't see any meaningful boot time difference if you
don't have a very large memory window on your GPU to test with, since that
slowness scales with GPU memory size, but you could still confirm that this
patch works if you set opt/ovmf/X-PciMmio64Mb to a value smaller than your
GPU's MMIO window size (and that which the PlatformDynamicMmioWindow function
calculates), then verify that the GPU driver in your guest VM *fails* to load
with that GPU passed through. If your GPU was working in the VM before you made
that change, you can know that this patch did as it intended by allowing you to
force a smaller window via opt/ovmf/X-PciMmio64Mb.
More portable virt-install command (adjust as needed for your platform):
cloud-localds ${VM}-seed.qcow2 user-data -d qcow2
qemu-img create -b jammy-server-cloudimg-amd64.img -F qcow2 -f qcow2
${VM}-vda.qcow2 80G
GPU01=pci_0000_07_00_0
GPU02=pci_0000_0f_00_0
GPU03=pci_0000_47_00_0
GPU04=pci_0000_4e_00_0
virt-install --name ${VM} --memory $((138*1024*1024)) --graphics
vnc,listen=0.0.0.0 --noautoconsole \
--console pty,target_type=serial --vcpus 4,cpuset=0-3 \
--machine q35 --osinfo name=ubuntujammy \
--cpu
host-passthrough,cache.mode=passthrough,cell0.memory=$((128*1024*1024)),cell0.cpus=0-3
\
--boot
loader=/usr/share/OVMF/OVMF_CODE_4M.fd,loader_ro=yes,loader_type=pflash \
--disk ${VM}-vda.qcow2 --disk ${VM}-seed.qcow2 --import \
--host-device=${GPU01} \
--host-device=${GPU02} \
--host-device=${GPU03} \
--host-device=${GPU04}
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2101903
Title:
Backport "OvmfPkg: Use user-specified opt/ovmf/X-PciMmio64Mb value
unconditionally" to Noble
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/2101903/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs