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_overlap(struct kvm_memslots *slots, int id, gfn_t start, gfn_t end) { struct kvm_memslot_iter iter; kvm_for_each_memslot_in_gfn_range(&iter, slots, start, end) { if (iter.slot->id != id) return true; } return false; } ... if ((change == KVM_MR_CREATE || change == KVM_MR_MOVE) && kvm_check_memslot_overlap(slots, id, base_gfn, base_gfn + npages)) return -EEXIST; Paolo