x86/msi: get rid of read_msi_msg
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 22 Sep 2020 14:11:06 +0000 (16:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 22 Sep 2020 14:11:06 +0000 (16:11 +0200)
commit5ad31525c9aeed6d3a349799fe491b5a7c678049
treeb63c17aa2e340a9b7d575c73f46e531a0b938c23
parentfc8200a6ad5248d8fb6b0fbf3f3dc80f29dfe0c7
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