On 15/10/25 15:27, Anton Johansson wrote:
Signed-off-by: Anton Johansson <[email protected]>
---
include/qemu/target-info-impl.h | 2 ++
include/qemu/target-info.h | 8 ++++++++
target-info.c | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-impl.h
index 17887f64e2..80d1613128 100644
--- a/include/qemu/target-info-impl.h
+++ b/include/qemu/target-info-impl.h
@@ -18,6 +18,8 @@ typedef struct TargetInfo {
SysEmuTarget target_arch;
/* runtime equivalent of TARGET_LONG_BITS definition */
unsigned long_bits;
+ /* runtime equivalent of TARGET_PHYS_ADDR_SPACE_BITS definition */
+ unsigned phys_addr_space_bits;
/* runtime equivalent of CPU_RESOLVING_TYPE definition */
const char *cpu_type;
/* QOM typename machines for this binary must implement */
diff --git a/target-info.c b/target-info.c
index 3110ab32f7..3d696ae0b3 100644
--- a/target-info.c
+++ b/target-info.c
@@ -22,6 +22,11 @@ unsigned target_long_bits(void)
return target_info()->long_bits;
}
+unsigned target_phys_addr_space_bits(void)
+{
+ return target_info()->phys_addr_space_bits;
+}
Missing field initialization in target_info_stub[].
BTW this definition seems unused by common code since commit
2e8fe327eb6 ("accel/tcg: Simplify L1_MAP_ADDR_SPACE_BITS").
Do we still need to expose it to common components?