From: Richard Henderson <[email protected]> Use target_info->page_bits_init to implement migration_legacy_page_bits. Because this is the last function within the file, rename page-vary-target.c to page-vary-system.c and build once for system mode.
Signed-off-by: Richard Henderson <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- MAINTAINERS | 2 +- meson.build | 2 +- page-vary-target.c => page-vary-system.c | 19 ++++++------------- 3 files changed, 8 insertions(+), 15 deletions(-) rename page-vary-target.c => page-vary-system.c (74%) diff --git a/MAINTAINERS b/MAINTAINERS index 8da0b357fbb..606b16762cf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -159,7 +159,7 @@ M: Richard Henderson <[email protected]> R: Paolo Bonzini <[email protected]> S: Maintained F: system/watchpoint.c -F: page-vary-target.c +F: page-vary-system.c F: page-vary-common.c F: accel/tcg/ F: accel/stubs/tcg-stub.c diff --git a/meson.build b/meson.build index d9a17eeefd3..3cd1d8dbc66 100644 --- a/meson.build +++ b/meson.build @@ -3833,7 +3833,7 @@ if get_option('b_lto') pagevary = declare_dependency(link_with: pagevary) endif common_ss.add(pagevary) -specific_ss.add(files('page-vary-target.c')) +system_ss.add(files('page-vary-system.c')) common_ss.add(files('target-info.c')) system_ss.add(files('target-info-qom.c')) diff --git a/page-vary-target.c b/page-vary-system.c similarity index 74% rename from page-vary-target.c rename to page-vary-system.c index bc4d8931b68..6c49c10e23b 100644 --- a/page-vary-target.c +++ b/page-vary-system.c @@ -1,5 +1,5 @@ /* - * Variable page size handling -- target specific part. + * Variable page size handling -- system specific part. * * Copyright (c) 2003 Fabrice Bellard * @@ -17,24 +17,17 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#define IN_PAGE_VARY 1 - #include "qemu/osdep.h" #include "exec/page-vary.h" -#include "exec/target_page.h" - -#ifndef CONFIG_USER_ONLY #include "exec/tlb-flags.h" +#include "qemu/target-info-impl.h" QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1)); int migration_legacy_page_bits(void) { -#ifdef TARGET_PAGE_BITS_VARY - QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS_LEGACY < TARGET_PAGE_BITS_MIN); - return TARGET_PAGE_BITS_LEGACY; -#else - return TARGET_PAGE_BITS; -#endif + const TargetInfo *ti = target_info(); + + assert(ti->page_bits_init >= TARGET_PAGE_BITS_MIN); + return ti->page_bits_init; } -#endif -- 2.52.0
