[RFC PATCH kvmtool v1 24/32] Change vesa mapping from private to shared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Private mappings don't work with restricted memory since it
might be COWed.

Signed-off-by: Fuad Tabba <tabba@xxxxxxxxxx>
---
 hw/vesa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vesa.c b/hw/vesa.c
index 277d638..3233794 100644
--- a/hw/vesa.c
+++ b/hw/vesa.c
@@ -96,7 +96,7 @@ struct framebuffer *vesa__init(struct kvm *kvm)
 		goto unregister_device;
 	}
 
-	mem = mmap(NULL, VESA_MEM_SIZE, PROT_RW, MAP_PRIVATE, mem_fd, 0);
+	mem = mmap(NULL, VESA_MEM_SIZE, PROT_RW, MAP_SHARED, mem_fd, 0);
 	if (mem == MAP_FAILED) {
 		r = -errno;
 		goto close_memfd;
-- 
2.39.0.rc0.267.gcb52ba06e7-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux