x86/hvm/ioreq: MMIO range checking completely ignores direction flag
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 14 Sep 2018 11:03:38 +0000 (13:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 14 Sep 2018 11:03:38 +0000 (13:03 +0200)
commit74fee1b6d35a257f58a38d320bcc72d9efc7d413
treedf130cc4fd1632982859baf83c4e0cd3f11762a3
parent2004a914b675811136ecb185772d2ab4108403d4
x86/hvm/ioreq: MMIO range checking completely ignores direction flag

hvm_select_ioreq_server() is used to route an ioreq to the appropriate
ioreq server. For MMIO this is done by comparing the range of the ioreq
to the ranges registered by the device models of each ioreq server.
Unfortunately the calculation of the range if the ioreq completely ignores
the direction flag and thus may calculate the wrong range for comparison.
Thus the ioreq may either be routed to the wrong server or erroneously
terminated by null_ops.

NOTE: The patch also fixes whitespace in the switch statement to make it
      style compliant.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 60a56dc0064a00830663ffe48215dcd080cb9504
master date: 2018-08-15 14:14:06 +0200
xen/arch/x86/hvm/ioreq.c