[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qem
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h' |
Date: |
Thu, 7 May 2020 19:39:53 +0200 |
Move these generic functions to a more common place, with other
functions related to host page size. Document a little.
Cc: Alexey Kardashevskiy <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/exec/ram_addr.h | 3 ---
include/qemu-common.h | 10 ++++++++++
hw/ppc/spapr_caps.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 1 +
hw/vfio/spapr.c | 2 +-
5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 06096e8c6a..195b67d3c8 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -93,9 +93,6 @@ static inline unsigned long int
ramblock_recv_bitmap_offset(void *host_addr,
bool ramblock_is_pmem(RAMBlock *rb);
-long qemu_minrampagesize(void);
-long qemu_maxrampagesize(void);
-
/**
* qemu_ram_alloc_from_file,
* qemu_ram_alloc_from_fd: Allocate a ram block from the specified backing
diff --git a/include/qemu-common.h b/include/qemu-common.h
index d0142f29ac..2821a6ef76 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -80,6 +80,16 @@ bool set_preferred_target_page_bits(int bits);
*/
void finalize_target_page_bits(void);
+/**
+ * qemu_minrampagesize:
+ * qemu_maxrampagesize:
+ *
+ * If backed via -memdev, return the device page size,
+ * else return the host kernel page size.
+ */
+long qemu_minrampagesize(void);
+long qemu_maxrampagesize(void);
+
/**
* Sends a (part of) iovec down a socket, yielding when the socket is full, or
* Receives data into a (part of) iovec from a socket,
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index eb54f94227..33a802a103 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -23,11 +23,11 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "sysemu/hw_accel.h"
-#include "exec/ram_addr.h"
#include "target/ppc/cpu.h"
#include "target/ppc/mmu-hash64.h"
#include "cpu-models.h"
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index f660070d22..c009384505 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/boards.h"
diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 2900bd1941..c64db940a7 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -9,13 +9,13 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "cpu.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
#include "hw/vfio/vfio-common.h"
#include "hw/hw.h"
-#include "exec/ram_addr.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "trace.h"
--
2.21.3
- [PATCH 00/10] exec: Shear 'exec/ram_addr.h' and make NVMe device target-agnostic, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 01/10] exec: Rename qemu_ram_writeback() as qemu_ram_msync(), Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 03/10] exec: Move tb_invalidate_phys_range() to 'exec/exec-all.h', Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h',
Philippe Mathieu-Daudé <=
- [PATCH 06/10] exec: Move ramblock_recv_bitmap_offset() to migration/ram.c, Philippe Mathieu-Daudé, 2020/05/07
- [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h', Philippe Mathieu-Daudé, 2020/05/07