On Mon, 25 May 2026 at 16:47, BALATON Zoltan <[email protected]> wrote:
>
> Make memory_region_set_ops() function public. In some cases such as
> when devices have configurable endianness or different behaviour based
> on settings it is necessary to change the ops callback after the
> memory region is created. Export memory_region_set_ops() function for
> this.

If some other CPU is in the middle of using the old MemoryRegionOps
when the device swaps them out under its feet, what happens?

You could also remove the old MR from its container and add a different
one with the different behaviour when the guest changes the config,
or have both of them in the container and toggle which is visible
with memory_region_set_enabled(). That might potentially be more
awkward but it would avoid having to look into the memory region
API internals.

-- PMM

Reply via email to