3e81a71c9f
When we're replacing the existing mapping there is possibility of a race on memory map with other threads doing mmap operations - the address being unmapped/re-mapped could be occupied by another thread in between. Linux mmap man page recommends keeping the existing mappings in place to reserve the place and instead utilize the fact that the next mmap operation with MAP_FIXED flag passed will implicitly destroy the existing mappings behind the chosen address. This behavior is guaranteed by POSIX / BSD and therefore is portable. Note that it wouldn't make the replacement atomic for parallel accesses to the replaced region - those might still fail with SIGBUS due to xenforeignmemory_map not being atomic. So we're still not expecting those. Tested-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com> Reviewed-by: Paul Durrant <paul@xen.org> Message-Id: <1618889702-13104-1-git-send-email-igor.druzhinin@citrix.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> |
||
---|---|---|
.. | ||
kvm | ||
xen | ||
acpi-build.c | ||
acpi-build.h | ||
acpi-common.c | ||
acpi-common.h | ||
acpi-microvm.c | ||
acpi-microvm.h | ||
amd_iommu.c | ||
amd_iommu.h | ||
e820_memory_layout.c | ||
e820_memory_layout.h | ||
fw_cfg.c | ||
fw_cfg.h | ||
generic_event_device_x86.c | ||
intel_iommu_internal.h | ||
intel_iommu.c | ||
Kconfig | ||
kvmvapic.c | ||
meson.build | ||
microvm.c | ||
multiboot.c | ||
multiboot.h | ||
pc_piix.c | ||
pc_q35.c | ||
pc_sysfw.c | ||
pc.c | ||
port92.c | ||
trace-events | ||
trace.h | ||
vmmouse.c | ||
vmport.c | ||
x86-iommu-stub.c | ||
x86-iommu.c | ||
x86.c |