[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V1 18/32] osdep: import MADV_DOEXEC
From: |
Steve Sistare |
Subject: |
[PATCH V1 18/32] osdep: import MADV_DOEXEC |
Date: |
Thu, 30 Jul 2020 08:14:22 -0700 |
Anonymous memory segments used by the guest are preserved across a re-exec
of qemu, mapped at the same VA, via a proposed madvise(MADV_DOEXEC) option
in the Linux kernel. For the madvise patches, see:
https://lore.kernel.org/lkml/1595869887-23307-1-git-send-email-anthony.yznaga@oracle.com/
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
include/qemu/osdep.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index bb28df1..7ce555a 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -390,6 +390,11 @@ void qemu_anon_ram_free(void *ptr, size_t size);
#else
#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
#endif
+#ifdef MADV_DOEXEC
+#define QEMU_MADV_DOEXEC MADV_DOEXEC
+#else
+#define QEMU_MADV_DOEXEC QEMU_MADV_INVALID
+#endif
#elif defined(CONFIG_POSIX_MADVISE)
@@ -403,6 +408,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);
#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID
#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
+#define QEMU_MADV_DOEXEC QEMU_MADV_INVALID
#else /* no-op */
@@ -416,6 +422,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);
#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID
#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
+#define QEMU_MADV_DOEXEC QEMU_MADV_INVALID
#endif
--
1.8.3.1
- [PATCH V1 29/32] pci: export pci_update_mappings, (continued)
- [PATCH V1 29/32] pci: export pci_update_mappings, Steve Sistare, 2020/07/30
- [PATCH V1 25/32] char: save/restore chardev pty fds, Steve Sistare, 2020/07/30
- [PATCH V1 24/32] ui: save/restore vnc socket fds, Steve Sistare, 2020/07/30
- [PATCH V1 31/32] vfio-pci: trace pci config, Steve Sistare, 2020/07/30
- [PATCH V1 02/32] savevm: VM handlers mode mask, Steve Sistare, 2020/07/30
- [PATCH V1 05/32] savevm: QMP command for cprload, Steve Sistare, 2020/07/30
- [PATCH V1 09/32] savevm: prevent cprsave if memory is volatile, Steve Sistare, 2020/07/30
- [PATCH V1 19/32] memory: ram_block_add cosmetic changes, Steve Sistare, 2020/07/30
- [PATCH V1 18/32] osdep: import MADV_DOEXEC,
Steve Sistare <=
- [PATCH V1 21/32] exec, memory: exec(3) to restart, Steve Sistare, 2020/07/30
- [PATCH V1 13/32] gdbstub: gdb support for suspended state, Steve Sistare, 2020/07/30
- [PATCH V1 23/32] char: save/restore chardev socket fds, Steve Sistare, 2020/07/30
- [PATCH V1 26/32] monitor: save/restore QMP negotiation status, Steve Sistare, 2020/07/30
- [PATCH V1 30/32] vfio-pci: save and restore, Steve Sistare, 2020/07/30
- [PATCH V1 32/32] vfio-pci: improved tracing, Steve Sistare, 2020/07/30
- [PATCH V1 27/32] vhost: reset vhost devices upon cprsave, Steve Sistare, 2020/07/30
- Re: [PATCH V1 00/32] Live Update, Daniel P . Berrangé, 2020/07/30