diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-09-19 13:30:29 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-10-28 10:26:02 +0100 |
commit | 7886cefe5ddd238c64d07eb037804f1aef24755c (patch) | |
tree | 5faf0102157c73268c1cc3922083be184688d1d8 /exec.c | |
parent | 50276a79aa15713decfede5cab183fc371e3e57d (diff) | |
download | qemu-7886cefe5ddd238c64d07eb037804f1aef24755c.zip qemu-7886cefe5ddd238c64d07eb037804f1aef24755c.tar.gz qemu-7886cefe5ddd238c64d07eb037804f1aef24755c.tar.bz2 |
exec: Split out variable page size support to exec-vary.c
The next patch will play a trick with "const" that will
confuse the compiler about the uses of target_page_bits
within exec.c. Moving everything to a new file prevents
this confusion.
No functional change so far.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 34 |
1 files changed, 0 insertions, 34 deletions
@@ -91,11 +91,6 @@ AddressSpace address_space_memory; static MemoryRegion io_mem_unassigned; #endif -#ifdef TARGET_PAGE_BITS_VARY -int target_page_bits; -bool target_page_bits_decided; -#endif - CPUTailQ cpus = QTAILQ_HEAD_INITIALIZER(cpus); /* current CPU in the current thread. It is only valid inside @@ -109,37 +104,8 @@ int use_icount; uintptr_t qemu_host_page_size; intptr_t qemu_host_page_mask; -bool set_preferred_target_page_bits(int bits) -{ - /* The target page size is the lowest common denominator for all - * the CPUs in the system, so we can only make it smaller, never - * larger. And we can't make it smaller once we've committed to - * a particular size. - */ -#ifdef TARGET_PAGE_BITS_VARY - assert(bits >= TARGET_PAGE_BITS_MIN); - if (target_page_bits == 0 || target_page_bits > bits) { - if (target_page_bits_decided) { - return false; - } - target_page_bits = bits; - } -#endif - return true; -} - #if !defined(CONFIG_USER_ONLY) -static void finalize_target_page_bits(void) -{ -#ifdef TARGET_PAGE_BITS_VARY - if (target_page_bits == 0) { - target_page_bits = TARGET_PAGE_BITS_MIN; - } - target_page_bits_decided = true; -#endif -} - typedef struct PhysPageEntry PhysPageEntry; struct PhysPageEntry { |