]> xenbits.xensource.com Git - xen.git/commit
vpci/msix: restore PBA access length and alignment restrictions
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 29 Mar 2023 12:56:33 +0000 (14:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 29 Mar 2023 12:56:33 +0000 (14:56 +0200)
commit7a502b4fbc339e9d3d3d45fb37f09da06bc3081c
tree3a9ac38753fc9d63e95c6b266cebd592ea064270
parente692b22230b411d762ac9e278a398e28df474eae
vpci/msix: restore PBA access length and alignment restrictions

Accesses to the PBA array have the same length and alignment
limitations as accesses to the MSI-X table:

"For all accesses to MSI-X Table and MSI-X PBA fields, software must
use aligned full DWORD or aligned full QWORD transactions; otherwise,
the result is undefined."

Introduce such length and alignment checks into the handling of PBA
accesses for vPCI.  This was a mistake of mine for not reading the
specification correctly.

Note that accesses must now be aligned, and hence there's no longer a
need to check that the end of the access falls into the PBA region as
both the access and the region addresses must be aligned.

Fixes: b177892d2d ('vpci/msix: handle accesses adjacent to the MSI-X table')
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/vpci/msix.c