diff mbox

[v3,20/35] osdep: add QEMU_MADV_REMOVE and tirivial fix

Message ID 3ff50899a010abdb7f63ca699eb7dd271eb26b00.1351582535.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata Oct. 30, 2012, 8:32 a.m. UTC
MADV_REMOVE will be used by postcopy.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 osdep.h |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/osdep.h b/osdep.h
index c5fd3d9..9e97f39 100644
--- a/osdep.h
+++ b/osdep.h
@@ -113,6 +113,11 @@  void qemu_vfree(void *ptr);
 #else
 #define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
 #endif
+#ifdef MADV_REMOVE
+#define QEMU_MADV_REMOVE MADV_REMOVE
+#else
+#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
+#endif
 
 #elif defined(CONFIG_POSIX_MADVISE)
 
@@ -120,7 +125,9 @@  void qemu_vfree(void *ptr);
 #define QEMU_MADV_DONTNEED  POSIX_MADV_DONTNEED
 #define QEMU_MADV_DONTFORK  QEMU_MADV_INVALID
 #define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID
-#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
+#define QEMU_MADV_DONTDUMP  QEMU_MADV_INVALID
+#define QEMU_MADV_HUGEPAGE  QEMU_MADV_INVALID
+#define QEMU_MADV_REMOVE    QEMU_MADV_INVALID
 
 #else /* no-op */
 
@@ -128,7 +135,9 @@  void qemu_vfree(void *ptr);
 #define QEMU_MADV_DONTNEED  QEMU_MADV_INVALID
 #define QEMU_MADV_DONTFORK  QEMU_MADV_INVALID
 #define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID
-#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
+#define QEMU_MADV_DONTDUMP  QEMU_MADV_INVALID
+#define QEMU_MADV_HUGEPAGE  QEMU_MADV_INVALID
+#define QEMU_MADV_REMOVE    QEMU_MADV_INVALID
 
 #endif