]> xenbits.xensource.com Git - xen.git/commit
x86/emul: Fix misaligned IO breakpoint behaviour in PV guests
authorMatthew Barnes <matthew.barnes@cloud.com>
Thu, 8 Aug 2024 11:27:50 +0000 (13:27 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 8 Aug 2024 11:27:50 +0000 (13:27 +0200)
commit08aacc392d86d4c7dbebdb5e664060ae2af72057
tree543b91b62c4ecd5fb2e225331fe44375e779c56e
parentef31716a57e6c29ba14b4f009e9a67277c8117a8
x86/emul: Fix misaligned IO breakpoint behaviour in PV guests

When hardware breakpoints are configured on misaligned IO ports, the
hardware will mask the addresses based on the breakpoint width during
comparison.

For PV guests, misaligned IO breakpoints do not behave the same way, and
therefore yield different results.

This patch tweaks the emulation of IO breakpoints for PV guests such
that they reproduce the same behaviour as hardware.

Fixes: bec9e3205018 ("x86: emulate I/O port access breakpoints")
Signed-off-by: Matthew Barnes <matthew.barnes@cloud.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/pv/emul-priv-op.c