All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Junyan He <junyan.he@intel.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PULL 1/7] memory, exec: Expose all memory block related flags.
Date: Mon, 20 Aug 2018 23:24:23 +0300	[thread overview]
Message-ID: <20180820104045.133968-2-mst@redhat.com> (raw)
In-Reply-To: <20180820104045.133968-1-mst@redhat.com>

From: Junyan He <junyan.he@intel.com>

We need to use these flags in other files rather than just in exec.c,
For example, RAM_SHARED should be used when create a ram block from file.
We expose them the exec/memory.h

Signed-off-by: Junyan He <junyan.he@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/exec/memory.h | 20 ++++++++++++++++++++
 exec.c                | 20 --------------------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/include/exec/memory.h b/include/exec/memory.h
index 448d41a752..6d0af29155 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -103,6 +103,26 @@ struct IOMMUNotifier {
 };
 typedef struct IOMMUNotifier IOMMUNotifier;
 
+/* RAM is pre-allocated and passed into qemu_ram_alloc_from_ptr */
+#define RAM_PREALLOC   (1 << 0)
+
+/* RAM is mmap-ed with MAP_SHARED */
+#define RAM_SHARED     (1 << 1)
+
+/* Only a portion of RAM (used_length) is actually used, and migrated.
+ * This used_length size can change across reboots.
+ */
+#define RAM_RESIZEABLE (1 << 2)
+
+/* UFFDIO_ZEROPAGE is available on this RAMBlock to atomically
+ * zero the page and wake waiting processes.
+ * (Set during postcopy)
+ */
+#define RAM_UF_ZEROPAGE (1 << 3)
+
+/* RAM can be migrated */
+#define RAM_MIGRATABLE (1 << 4)
+
 static inline void iommu_notifier_init(IOMMUNotifier *n, IOMMUNotify fn,
                                        IOMMUNotifierFlag flags,
                                        hwaddr start, hwaddr end,
diff --git a/exec.c b/exec.c
index 4f5df07b6a..cc042dcefd 100644
--- a/exec.c
+++ b/exec.c
@@ -87,26 +87,6 @@ AddressSpace address_space_memory;
 
 MemoryRegion io_mem_rom, io_mem_notdirty;
 static MemoryRegion io_mem_unassigned;
-
-/* RAM is pre-allocated and passed into qemu_ram_alloc_from_ptr */
-#define RAM_PREALLOC   (1 << 0)
-
-/* RAM is mmap-ed with MAP_SHARED */
-#define RAM_SHARED     (1 << 1)
-
-/* Only a portion of RAM (used_length) is actually used, and migrated.
- * This used_length size can change across reboots.
- */
-#define RAM_RESIZEABLE (1 << 2)
-
-/* UFFDIO_ZEROPAGE is available on this RAMBlock to atomically
- * zero the page and wake waiting processes.
- * (Set during postcopy)
- */
-#define RAM_UF_ZEROPAGE (1 << 3)
-
-/* RAM can be migrated */
-#define RAM_MIGRATABLE (1 << 4)
 #endif
 
 #ifdef TARGET_PAGE_BITS_VARY
-- 
MST

  reply	other threads:[~2018-08-20 20:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20 20:24 [Qemu-devel] [PULL 0/7] pc: fixes Michael S. Tsirkin
2018-08-20 20:24 ` Michael S. Tsirkin [this message]
2018-08-20 20:24 ` [Qemu-devel] [PULL 2/7] memory, exec: switch file ram allocation functions to 'flags' parameters Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 3/7] configure: add libpmem support Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 4/7] hostmem-file: add the 'pmem' option Michael S. Tsirkin
2018-08-24 15:13   ` Peter Maydell
2018-08-24 16:53     ` Michael S. Tsirkin
2018-08-24 16:57       ` Peter Maydell
2018-08-24 17:14         ` Michael S. Tsirkin
2018-08-28 15:42           ` Yi Zhang
2018-08-20 20:24 ` [Qemu-devel] [PULL 5/7] mem/nvdimm: ensure write persistence to PMEM in label emulation Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 6/7] migration/ram: Add check and info message to nvdimm post copy Michael S. Tsirkin
2018-08-20 20:24 ` [Qemu-devel] [PULL 7/7] migration/ram: ensure write persistence on loading all data to PMEM Michael S. Tsirkin
2018-08-21 10:35 ` [Qemu-devel] [PULL 0/7] pc: fixes Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180820104045.133968-2-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=junyan.he@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.