On 1/10/25 17:05, Philippe Mathieu-Daudé wrote:
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]>
---
hw/core/generic-loader.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -130,7 +131,7 @@ static void generic_loader_realize(DeviceState *dev, Error
**errp)
}
if (s->file) {
- AddressSpace *as = s->cpu ? s->cpu->as : NULL;
+ AddressSpace *as = cpu_get_address_space(s->cpu, 0);
Oops, I missed the NULL check.
if (!s->force_raw) {
size = load_elf_as(s->file, NULL, NULL, NULL, &entry, NULL, NULL,