Re: [RFC PATCH 25/25] accel/mshv: Add memory remapping workaround

2025-05-22 Thread Magnus Kulke
On Tue, May 20, 2025 at 03:53:10PM +0200, Paolo Bonzini wrote: > On 5/20/25 13:30, Magnus Kulke wrote: > > Qemu maps regions of userland multiple times into the guest. The MSHV > > kernel driver detects those overlapping regions and rejects those > > mappings. > > Can you explain what you see? QE

Re: [RFC PATCH 25/25] accel/mshv: Add memory remapping workaround

2025-05-20 Thread Paolo Bonzini
On 5/20/25 13:30, Magnus Kulke wrote: Qemu maps regions of userland multiple times into the guest. The MSHV kernel driver detects those overlapping regions and rejects those mappings. Can you explain what you see? QEMU doesn't do that, just look at KVM code: static bool kvm_check_memslot_over

[RFC PATCH 25/25] accel/mshv: Add memory remapping workaround

2025-05-20 Thread Magnus Kulke
Qemu maps regions of userland multiple times into the guest. The MSHV kernel driver detects those overlapping regions and rejects those mappings. A logic is introduced to track all mappings and replace a region on the fly if an unmapped gpa is encountered. If there is a region in the list that wou