vpci/msix: fix PBA accesses
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 9 Mar 2022 15:21:01 +0000 (16:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 9 Mar 2022 15:21:01 +0000 (16:21 +0100)
commitb4f21160601155762a4d014db9623af921fec959
treeaeb20e3c72e87d2db9eab036f2fd7aa75199370e
parent8d03080d2a339840d3a59e0932a94f804e45110d
vpci/msix: fix PBA accesses

Map the PBA in order to access it from the MSI-X read and write
handlers. Note that previously the handlers would pass the physical
host address into the {read,write}{l,q} handlers, which is wrong as
those expect a linear address.

Map the PBA using ioremap when the first access is performed. Note
that 32bit arches might want to abstract the call to ioremap into a
vPCI arch handler, so they can use a fixmap range to map the PBA.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Alex Olson <Alex.Olson@starlab.io>
xen/drivers/vpci/msix.c
xen/drivers/vpci/vpci.c
xen/include/xen/vpci.h