vpci/msix: fix PBA accesses
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 31 Mar 2022 08:58:42 +0000 (10:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 31 Mar 2022 08:58:42 +0000 (10:58 +0200)
commitef63570d8391a35fd734a956865b8295d2c57112
treec52021a4e0dd1b17b9d7300570f28345e7b9c2f8
parentdd359f9f505e7df960aad13116bc6f576f5fdd94
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>
master commit: b4f21160601155762a4d014db9623af921fec959
master date: 2022-03-09 16:21:01 +0100
xen/drivers/vpci/msix.c
xen/drivers/vpci/vpci.c
xen/include/xen/vpci.h