On Fri, 4 Sept 2026 at 20:13, Philippe Mathieu-Daudé
<[email protected]> wrote:
> > @@ -117,6 +119,12 @@ static bool riscv_hart_realize(RISCVHartArrayState *s, 
> > int idx,
> >       object_initialize_child(OBJECT(s), "harts[*]", &s->harts[idx], 
> > cpu_type);
> >       qdev_prop_set_uint64(DEVICE(&s->harts[idx]), "resetvec", s->resetvec);
> >
> > +    /* Use private memory instead of system_memory if provided */
> > +    if (s->memory) {
> > +        object_property_set_link(OBJECT(&s->harts[idx]), "memory",
> > +                                 OBJECT(s->memory), &error_abort);
>
> IMHO this logic should be inverted: we want explicit memory bus mapping
> by default, and if not set then take the global memory. Personally I'd
> even go further and assert it is set (otherwise programming error), with
> a preliminary patch setting global system memory to current machines.

I'm on board with this idea, but I couldn't follow what you meant by
"if not set then take the global memory"? That's what happens
currently?

Are you saying always set the memory link to the provided MemoryRegion
(with a fallback to system_memory, or in the stronger case with an
assert if not set)?

Then we could drop cpu_exec_init.

Reply via email to