]> git.ipfire.org Git - thirdparty/qemu.git/commit
accel/mshv: Remove remap overlapping mappings code
authorMagnus Kulke <magnuskulke@linux.microsoft.com>
Tue, 13 Jan 2026 15:37:08 +0000 (16:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Feb 2026 10:16:52 +0000 (11:16 +0100)
commit626e5dc999353d2c4a89febd46301bfec6daa3a7
tree12c2f6e095e0d0c2ffb6619b7ac824e4e033fb4a
parent69345f948ab6051793c034ecedc97c68ca49649d
accel/mshv: Remove remap overlapping mappings code

This change removes userland code that worked around a restriction
in the mshv driver in the 6.18 kernel: regions from userland
couldn't be mapped to multiple regions in the kernel. We maintained a
shadow mapping table in qemu and used a heuristic to swap in a requested
region in case of UNMAPPED_GPA exits.

However, this heuristic wasn't reliable in all cases, since HyperV
behaviour is not 100% reliable across versions. HyperV itself doesn't
prohibit to map regions at multiple places into the guest, so the
restriction has been removed in the mshv driver.

Hence we can remove the remapping code. Effectively this will mandate a
6.19 kernel, if the workload attempt to map e.g. BIOS to multiple
reagions. I still think it's the right call to remove this logic:

- The workaround only seems to work reliably with a certain revision
  of HyperV as a nested hypervisor.
- We expect Direct Virtualization (L1VH) to be the main platform for
  the mshv accelerator, which also requires a 6.19 kernel

This reverts commit efc4093358511a58846a409b965213aa1bb9f31a.

Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Acked-by: Wei Liu (Microsoft) <wei.liu@kernel.org>
Tested-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Link: https://lore.kernel.org/r/20260113153708.448968-1-magnuskulke@linux.microsoft.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/mshv/mem.c
accel/mshv/mshv-all.c
accel/mshv/trace-events
include/system/mshv_int.h
target/i386/mshv/mshv-cpu.c