x86/msi: get rid of read_msi_msg
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 22 Sep 2020 13:47:58 +0000 (15:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Sep 2020 13:47:58 +0000 (15:47 +0200)
commitcb5e9730862ba0c99e81d3fbd8f65010707245e4
tree3bbcc453ba883a4e285c04653a88314e78e0d67f
parent8e76aef72820435e766c7f339ed36da33da90c40
x86/msi: get rid of read_msi_msg

It's safer and faster to just use the cached last written
(untranslated) MSI message stored in msi_desc for the single user that
calls read_msi_msg.

This also prevents relying on the data read from the device MSI
registers in order to figure out the index into the IOMMU interrupt
remapping table, which is not safe.

This is part of XSA-337.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/msi.c