In order to remove the convenient CPUState::as field, access the vcpu first address space using the cpu_get_address_space() helper.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- semihosting/arm-compat-semi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 61001267965..4c282aea5d6 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -149,12 +149,14 @@ static bool find_ram_cb(Int128 start, Int128 len, const MemoryRegion *mr, static LayoutInfo common_semi_find_bases(CPUState *cs) { + AddressSpace *as; FlatView *fv; LayoutInfo info = { 0, 0, 0, 0 }; RCU_READ_LOCK_GUARD(); - fv = address_space_to_flatview(cs->as); + as = cpu_get_address_space(cs, 0); + fv = address_space_to_flatview(as); flatview_for_each_range(fv, find_ram_cb, &info); /* -- 2.51.0
