From: Jim Shu Date: Wed, 28 Jan 2026 15:23:48 +0000 (+0800) Subject: system/physmem: Remove the assertion of page-aligned section number X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e3ec106108ccf4daaa8ad73b492b694be42155c;p=thirdparty%2Fqemu.git system/physmem: Remove the assertion of page-aligned section number We don't need to OR the physical section number anymore since we now directly have a pointer on the memory section. Signed-off-by: Jim Shu Reviewed-by: Pierrick Bouvier Message-ID: <20260128152348.2095427-4-jim.shu@sifive.com> [PMD: Reworded description per Pierrick's comment] Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/system/physmem.c b/system/physmem.c index d17596a77f..2fb0c25c93 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1323,12 +1323,6 @@ static subpage_t *subpage_init(FlatView *fv, hwaddr base); static uint16_t phys_section_add(PhysPageMap *map, MemoryRegionSection *section) { - /* The physical section number is ORed with a page-aligned - * pointer to produce the iotlb entries. Thus it should - * never overflow into the page-aligned value. - */ - assert(map->sections_nb < TARGET_PAGE_SIZE); - if (map->sections_nb == map->sections_nb_alloc) { map->sections_nb_alloc = MAX(map->sections_nb_alloc * 2, 16); map->sections = g_renew(MemoryRegionSection, map->sections,