|
|
9bac43 |
From 50789e32c0d8f91b69c918f43ee9415b2fbd86e0 Mon Sep 17 00:00:00 2001
|
|
|
9bac43 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9bac43 |
Date: Thu, 19 Oct 2017 01:34:52 +0200
|
|
|
9bac43 |
Subject: [PATCH 63/69] osdep: Define QEMU_MADV_REMOVE
|
|
|
9bac43 |
|
|
|
9bac43 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9bac43 |
Message-id: <20171019013453.21449-4-ehabkost@redhat.com>
|
|
|
9bac43 |
Patchwork-id: 77369
|
|
|
9bac43 |
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 3/4] osdep: Define QEMU_MADV_REMOVE
|
|
|
9bac43 |
Bugzilla: 1460848
|
|
|
9bac43 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
Define QEMU_MADV_REMOVE, so we can use it with qemu_madvise().
|
|
|
9bac43 |
|
|
|
9bac43 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9bac43 |
Message-Id: <20170824192315.5897-3-ehabkost@redhat.com>
|
|
|
9bac43 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
9bac43 |
Tested-by: Zack Cornelius <zack.cornelius@kove.net>
|
|
|
9bac43 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9bac43 |
(cherry picked from commit 0f81d3353029d26c6f8731a65d8052c532b1ced6)
|
|
|
9bac43 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
9bac43 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9bac43 |
---
|
|
|
9bac43 |
include/qemu/osdep.h | 7 +++++++
|
|
|
9bac43 |
1 file changed, 7 insertions(+)
|
|
|
9bac43 |
|
|
|
9bac43 |
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
|
|
|
9bac43 |
index 6855b94..e9fa217 100644
|
|
|
9bac43 |
--- a/include/qemu/osdep.h
|
|
|
9bac43 |
+++ b/include/qemu/osdep.h
|
|
|
9bac43 |
@@ -257,6 +257,11 @@ void qemu_anon_ram_free(void *ptr, size_t size);
|
|
|
9bac43 |
#else
|
|
|
9bac43 |
#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID
|
|
|
9bac43 |
#endif
|
|
|
9bac43 |
+#ifdef MADV_REMOVE
|
|
|
9bac43 |
+#define QEMU_MADV_REMOVE MADV_REMOVE
|
|
|
9bac43 |
+#else
|
|
|
9bac43 |
+#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
|
|
|
9bac43 |
+#endif
|
|
|
9bac43 |
|
|
|
9bac43 |
#elif defined(CONFIG_POSIX_MADVISE)
|
|
|
9bac43 |
|
|
|
9bac43 |
@@ -269,6 +274,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);
|
|
|
9bac43 |
#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
|
|
|
9bac43 |
#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
|
|
|
9bac43 |
#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID
|
|
|
9bac43 |
+#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
|
|
|
9bac43 |
|
|
|
9bac43 |
#else /* no-op */
|
|
|
9bac43 |
|
|
|
9bac43 |
@@ -281,6 +287,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);
|
|
|
9bac43 |
#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID
|
|
|
9bac43 |
#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID
|
|
|
9bac43 |
#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID
|
|
|
9bac43 |
+#define QEMU_MADV_REMOVE QEMU_MADV_INVALID
|
|
|
9bac43 |
|
|
|
9bac43 |
#endif
|
|
|
9bac43 |
|
|
|
9bac43 |
--
|
|
|
9bac43 |
1.8.3.1
|
|
|
9bac43 |
|