mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-03-18 02:32:26 +00:00
qemu: Remove OVMF X-PciMmio64Mb fw_cfg hint
Modern OVMF (edk2-stable202502 and later) automatically sizes the 64-bit PCI MMIO aperture based on the BARs of actually attached devices during PCI enumeration. The opt/ovmf/X-PciMmio64Mb fw_cfg hint is no longer needed to ensure large-BAR devices like NVIDIA GPUs receive adequate MMIO space. The previous approach was fragile: the runtime scanned host PCI devices to estimate the required aperture size, but only considered GPU devices (class 0x0302), missing NVSwitches and other devices with large BARs. Removing this code avoids confusion about MMIO sizing responsibility. Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
330bfff4be
commit
bb7fd335f3
@@ -815,18 +815,6 @@ func (q *qemu) createPCIeTopology(qemuConfig *govmmQemu.Config, hypervisorConfig
|
||||
// Deduce the right values for mem-reserve and pref-64-reserve memory regions
|
||||
memSize32bit, memSize64bit := q.arch.getBARsMaxAddressableMemory()
|
||||
|
||||
// The default OVMF MMIO aperture is too small for some PCIe devices
|
||||
// with huge BARs so we need to increase it.
|
||||
// memSize64bit is in bytes, convert to MB, OVMF expects MB as a string
|
||||
if strings.Contains(strings.ToLower(hypervisorConfig.FirmwarePath), "ovmf") {
|
||||
pciMmio64Mb := fmt.Sprintf("%d", (memSize64bit / 1024 / 1024))
|
||||
fwCfg := govmmQemu.FwCfg{
|
||||
Name: "opt/ovmf/X-PciMmio64Mb",
|
||||
Str: pciMmio64Mb,
|
||||
}
|
||||
qemuConfig.FwCfg = append(qemuConfig.FwCfg, fwCfg)
|
||||
}
|
||||
|
||||
// Get the number of hot(cold)-pluggable ports needed from the provided
|
||||
// VFIO devices
|
||||
var numOfPluggablePorts uint32 = 0
|
||||
|
||||
Reference in New Issue
Block a user