Hi Cédric, Peter,

> -----Original Message-----
> From: Peter Maydell <peter.mayd...@linaro.org>
> Sent: Friday, May 9, 2025 11:28 PM
> To: Cédric Le Goater <c...@redhat.com>
> Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; Steven Lee
> <steven_...@aspeedtech.com>
> Subject: Re: [PULL 22/23] tests/function/aspeed: Add functional test for
> ast2700fc
> 
> On Fri, 9 May 2025 at 15:32, Cédric Le Goater <c...@redhat.com> wrote:
> > In the ast2700fc machine and the fby35, each SoC has its own memory
> > region and, since there is no need for the global system memory
> > region, it's empty. But in some places, like
> > rom_check_and_register_reset(), it's a problem for the flattened
> > global view.
> 
> Generally speaking, board models should set things up so that the "main" SoC
> for the board uses the main system memory MR, rather than creating its own
> empty MR for that purpose, I think.
> 
> But separately from that, it's weird to get into flatview_lookup with an empty
> FlatView here. We called memory_region_find(), which is a wrapper around
> memory_region_find_rcu(). That function doesn't make assumptions about
> where the MR it's passed is from: it walks up the tree of MRs to find the root
> MR, it looks up the AddressSpace for that root MR, and then it gets the
> FlatView for that AS and calls flatview_lookup(). If the FlatView we end up 
> with
> doesn't have the MR in it, what's happened ?
> 

I also realized this was caused by the CA35 memory not being part of the system 
memory, while fixing the 2700FC Clang sanitizer issue last Wednesday.
To fix it, I added the CA35 memory region to the system memory:

memory_region_add_subregion(get_system_memory(), 0, &s->ca35_memory);

Patch for reference:
https://patchwork.kernel.org/project/qemu-devel/patch/20250507101005.1474823-2-steven_...@aspeedtech.com/

This seems to resolve the issue, though I'm not sure whether it's a proper fix 
or just a workaround.

Regards,
Steven

Reply via email to