From: Philippe Mathieu-Daudé <[email protected]>

We'll use TARGET_PAGE_BITS_MIN in page-vary-common.c,
so expose it via "exec/page-vary.h".

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Pierrick Bouvier <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-ID: <[email protected]>
---
 include/exec/page-vary.h | 14 ++++++++++++++
 page-vary-target.c       | 15 ---------------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/include/exec/page-vary.h b/include/exec/page-vary.h
index 101c25911c..3c77689ca5 100644
--- a/include/exec/page-vary.h
+++ b/include/exec/page-vary.h
@@ -20,6 +20,20 @@
 #ifndef EXEC_PAGE_VARY_H
 #define EXEC_PAGE_VARY_H
 
+/*
+ * For system mode, the minimum comes from the number of bits
+ * required for maximum alignment (6) and the number of bits
+ * required for TLB_FLAGS_MASK (3).
+ *
+ * For user mode, TARGET_PAGE_BITS_VARY is a hack to allow the target
+ * page size to match the host page size.  Mostly, this reduces the
+ * ordinary target page size to run on a host with 4KiB pages (i.e. x86).
+ * There is no true minimum required by the implementation, but keep the
+ * same minimum as for system mode for sanity.
+ * See linux-user/mmap.c, mmap_h_lt_g and mmap_h_gt_g.
+ */
+#define TARGET_PAGE_BITS_MIN 9
+
 typedef struct {
     bool decided;
     int bits;
diff --git a/page-vary-target.c b/page-vary-target.c
index 49a32b4fe5..ab92da4539 100644
--- a/page-vary-target.c
+++ b/page-vary-target.c
@@ -23,21 +23,6 @@
 #include "exec/page-vary.h"
 #include "exec/target_page.h"
 
-
-/*
- * For system mode, the minimum comes from the number of bits
- * required for maximum alignment (6) and the number of bits
- * required for TLB_FLAGS_MASK (3).
- *
- * For user mode, TARGET_PAGE_BITS_VARY is a hack to allow the target
- * page size to match the host page size.  Mostly, this reduces the
- * ordinary target page size to run on a host with 4KiB pages (i.e. x86).
- * There is no true minimum required by the implementation, but keep the
- * same minimum as for system mode for sanity.
- * See linux-user/mmap.c, mmap_h_lt_g and mmap_h_gt_g.
- */
-#define TARGET_PAGE_BITS_MIN 9
-
 #ifndef TARGET_PAGE_BITS_VARY
 QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN);
 #endif
-- 
2.43.0


Reply via email to