]> xenbits.xensource.com Git - xen.git/commit
vpci: Add resizable bar support
authorJiqian Chen <Jiqian.Chen@amd.com>
Mon, 24 Feb 2025 03:24:33 +0000 (11:24 +0800)
committerRoger Pau Monne <roger.pau@citrix.com>
Mon, 10 Mar 2025 09:38:29 +0000 (10:38 +0100)
commit6ce1066599eca6542abc248976b225e9da5f11f3
tree5e9c772d454ee8918ff4676477e151494f319680
parent659da11304665eed38a5d02ee80ed0881cb3eb9b
vpci: Add resizable bar support

Some devices, like AMDGPU, support resizable bar capability,
but vpci of Xen doesn't support this feature, so they fail
to resize bars and then cause probing failure.

According to PCIe spec, each bar that supports resizing has
two registers, PCI_REBAR_CAP and PCI_REBAR_CTRL. So, add
handlers to support resizing the size of BARs.

Note that Xen will only trap PCI_REBAR_CTRL, as PCI_REBAR_CAP
is read-only register and the hardware domain already gets
access to it without needing any setup.

Link: https://gitlab.com/xen-project/xen/-/issues/87
Signed-off-by: Jiqian Chen <Jiqian.Chen@amd.com>
Reviewed-by: Roger Pau Monné <roger.pau@cirtrix.com>
Acked-By: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CHANGELOG.md
SUPPORT.md
xen/drivers/vpci/Makefile
xen/drivers/vpci/rebar.c [new file with mode: 0644]
xen/include/xen/pci_regs.h
xen/include/xen/vpci.h