]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: correct read/write split at page boundaries
authorJan Beulich <jbeulich@suse.com>
Fri, 24 Jan 2025 09:15:56 +0000 (10:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Jan 2025 09:15:56 +0000 (10:15 +0100)
commit672894a11fe06e664a0ebfb600baf5dbb897b9e4
tree0afc8c6b8d582a7c50278460c395554dc2e6ff19
parent23d60dbb0493b2f9ec1d89be5341eec2ee9dab32
x86/HVM: correct read/write split at page boundaries

The MMIO cache is intended to have one entry used per independent memory
access that an insn does. This, in particular, is supposed to be
ignoring any page boundary crossing. Therefore when looking up a cache
entry, the access'es starting (linear) address is relevant, not the one
possibly advanced past a page boundary.

In order for the same offset-into-buffer variable to be usable in
hvmemul_phys_mmio_access() for both the caller's buffer and the cache
entry's it is further necessary to have the un-adjusted caller buffer
passed into there.

Fixes: 2d527ba310dc ("x86/hvm: split all linear reads and writes at page boundary")
Reported-by: Manuel Andreas <manuel.andreas@tum.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/arch/x86/hvm/emulate.c