target/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()

Get the target page bits at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-3-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-13 05:09:52 +01:00
parent 0d05d9365c
commit eca25ddb32
3 changed files with 6 additions and 3 deletions

View File

@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "exec/page-protection.h"
#include "exec/target_page.h"
#include "exec/log.h"
#include "cpu.h"
#include "internal.h"
@@ -492,7 +493,7 @@ bool ppc_booke_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
if (ret == 0) {
*raddrp = raddr;
*protp = prot;
*psizep = TARGET_PAGE_BITS;
*psizep = qemu_target_page_bits();
return true;
} else if (!guest_visible) {
return false;

View File

@@ -21,6 +21,7 @@
#include "qemu/units.h"
#include "cpu.h"
#include "exec/page-protection.h"
#include "exec/target_page.h"
#include "qemu/error-report.h"
#include "qemu/qemu-print.h"
#include "system/hw_accel.h"
@@ -1065,7 +1066,7 @@ bool ppc_hash64_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
*raddrp = raddr;
*protp = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
*psizep = TARGET_PAGE_BITS;
*psizep = qemu_target_page_bits();
return true;
}

View File

@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/page-protection.h"
#include "exec/target_page.h"
#include "qemu/error-report.h"
#include "system/kvm.h"
#include "system/memory.h"
@@ -717,7 +718,7 @@ static bool ppc_radix64_xlate_impl(PowerPCCPU *cpu, vaddr eaddr,
}
}
*protp = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
*psizep = TARGET_PAGE_BITS;
*psizep = qemu_target_page_bits();
return true;
}