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: 8847d6e23f ('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>
master commit: 38d0780979
master date: 2025-04-15 16:01:48 +0200
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2025-04-29 11:44:04 +02:00
1 parent 6b399ed19f
commit dee15facf8
1 file changed
+1
+1
View File
@@ -5128,6 +5128,7 @@ static void subpage_mmio_write_emulate(
return;
}
addr += offset;
switch ( len )
{
case 1:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.