On 14:21 Wed 20 Aug , Philippe Mathieu-Daudé wrote: [snip] > > > - arm_load_kernel(&s->soc.fpd.apu.cpu[0], machine, &s->binfo); > > > + arm_load_kernel(ARM_CPU(qemu_get_cpu(0)), machine, &s->binfo); > > > > We'd like to restrict qemu_get_cpu() to generic accelerator code, where > > what type of scheduled vCPU doesn't matter. And forbid this API under > > hw/, because it triggers odd bugs in heterogenous context (we can > > instanciate vCPU in random order, and hot[un]plug them, changing their > > id). Besides hw/ normally have knowledge of how to directly address a > > CPU (how/where it is wired). So I'm not really keen on adding another > > qemu_get_cpu() call here. Can't we keep references in VersalVirt (at > > least for the booting cpu)? > > Otherwise simpler to use the constant QOM path: > > booting_cpu = ARM_CPU(object_resolve_path("/machine/fpd/apu/cpu[0]"));
Sure I can do something in that vein. I'll add an accessor to the SoC interface, as I did for other peripherals. Luc