]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
x86/mm: account for the offset when performing subpage r/o MMIO access
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 9 Apr 2025 16:51:31 +0000 (18:51 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Tue, 15 Apr 2025 14:01:48 +0000 (16:01 +0200)
commit38d07809794e3c723a4de7e10c25c1f6cb590dc6
tree90d32f4958d1f862dc80f15521f004efc4598040
parent0589bf22156e7778e813dac75acef3471409aaca
x86/mm: account for the offset when performing subpage r/o MMIO access

The current logic in subpage_mmio_write_emulate() doesn't take into account
the page offset, and always performs the writes at offset 0 (start of the
page).

Fix this by accounting for the offset before performing the write.

Fixes: 8847d6e23f97 ('x86/mm: add API for marking only part of a MMIO page read only')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm.c