2019-09-19 13:30:29 -07:00
|
|
|
/*
|
2026-02-17 19:51:05 +10:00
|
|
|
* Variable page size handling -- system specific part.
|
2019-09-19 13:30:29 -07:00
|
|
|
*
|
|
|
|
|
* Copyright (c) 2003 Fabrice Bellard
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
2020-10-23 12:44:24 +00:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2019-09-19 13:30:29 -07:00
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "qemu/osdep.h"
|
2022-03-23 19:57:34 +04:00
|
|
|
#include "exec/page-vary.h"
|
2025-03-28 14:28:06 -05:00
|
|
|
#include "exec/tlb-flags.h"
|
2026-02-17 19:51:05 +10:00
|
|
|
#include "qemu/target-info-impl.h"
|
2025-03-28 14:28:06 -05:00
|
|
|
|
|
|
|
|
QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1));
|
|
|
|
|
|
2025-03-27 18:52:13 -05:00
|
|
|
int migration_legacy_page_bits(void)
|
|
|
|
|
{
|
2026-02-17 19:51:05 +10:00
|
|
|
const TargetInfo *ti = target_info();
|
|
|
|
|
|
|
|
|
|
assert(ti->page_bits_init >= TARGET_PAGE_BITS_MIN);
|
|
|
|
|
return ti->page_bits_init;
|
2025-03-27 18:52:13 -05:00
|
|
|
}
|