diff mbox series

[RFC,05/21] madvise: Add QEMU_MADV_SPLIT

Message ID 20230117220914.2062125-6-peterx@redhat.com (mailing list archive)
State New, archived
Headers show
Series migration: Support hugetlb doublemaps | expand

Commit Message

Peter Xu Jan. 17, 2023, 10:08 p.m. UTC
MADV_SPLIT is a new madvise() on Linux.  Define QEMU_MADV_SPLIT.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 include/qemu/madvise.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Juan Quintela Jan. 30, 2023, 5:01 a.m. UTC | #1
Peter Xu <peterx@redhat.com> wrote:
> MADV_SPLIT is a new madvise() on Linux.  Define QEMU_MADV_SPLIT.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

You can maintain the reviewed-by even if you collapsed with next one as
David suggests.
diff mbox series

Patch

diff --git a/include/qemu/madvise.h b/include/qemu/madvise.h
index b6fa49553f..3dddd25065 100644
--- a/include/qemu/madvise.h
+++ b/include/qemu/madvise.h
@@ -63,6 +63,11 @@ 
 #else
 #define QEMU_MADV_POPULATE_WRITE QEMU_MADV_INVALID
 #endif
+#ifdef MADV_SPLIT
+#define QEMU_MADV_SPLIT MADV_SPLIT
+#else
+#define QEMU_MADV_SPLIT QEMU_MADV_INVALID
+#endif
 
 #elif defined(CONFIG_POSIX_MADVISE)
 
@@ -77,6 +82,7 @@ 
 #define QEMU_MADV_NOHUGEPAGE  QEMU_MADV_INVALID
 #define QEMU_MADV_REMOVE QEMU_MADV_DONTNEED
 #define QEMU_MADV_POPULATE_WRITE QEMU_MADV_INVALID
+#define QEMU_MADV_SPLIT QEMU_MADV_INVALID
 
 #else /* no-op */
 
@@ -91,6 +97,7 @@ 
 #define QEMU_MADV_NOHUGEPAGE  QEMU_MADV_INVALID
 #define QEMU_MADV_REMOVE QEMU_MADV_INVALID
 #define QEMU_MADV_POPULATE_WRITE QEMU_MADV_INVALID
+#define QEMU_MADV_SPLIT QEMU_MADV_INVALID
 
 #endif