]> git.proxmox.com Git - mirror_qemu.git/commit
vfio/common: Separate vfio-pci ranges
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 8 Sep 2023 09:29:44 +0000 (10:29 +0100)
committerCédric Le Goater <clg@redhat.com>
Mon, 11 Sep 2023 06:34:06 +0000 (08:34 +0200)
commita31fe5daeaa230556145bfc04af1bd4e68f377fa
tree86eb4998cdc72a6115e482969d0a31705c62f315
parent615379764ae67f30a0fcbffeb20d6645f010091c
vfio/common: Separate vfio-pci ranges

QEMU computes the DMA logging ranges for two predefined ranges: 32-bit
and 64-bit. In the OVMF case, when the dynamic MMIO window is enabled,
QEMU includes in the 64-bit range the RAM regions at the lower part
and vfio-pci device RAM regions which are at the top of the address
space. This range contains a large gap and the size can be bigger than
the dirty tracking HW limits of some devices (MLX5 has a 2^42 limit).

To avoid such large ranges, introduce a new PCI range covering the
vfio-pci device RAM regions, this only if the addresses are above 4GB
to avoid breaking potential SeaBIOS guests.

[ clg: - wrote commit log
       - fixed overlapping 32-bit and PCI ranges when using SeaBIOS ]

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Fixes: 5255bbf4ec16 ("vfio/common: Add device dirty page tracking start/stop")
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/common.c
hw/vfio/trace-events