@@ -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
@@ -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,
@@ -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"
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/boards.h"
@@ -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"
Move these generic functions to a more common place, with other functions related to host page size. Document a little. Cc: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- 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(-)