]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
system/physmem: Remove the assertion of page-aligned section number
authorJim Shu <jim.shu@sifive.com>
Wed, 28 Jan 2026 15:23:48 +0000 (23:23 +0800)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 2 Feb 2026 21:11:49 +0000 (22:11 +0100)
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 <jim.shu@sifive.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20260128152348.2095427-4-jim.shu@sifive.com>
[PMD: Reworded description per Pierrick's comment]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
system/physmem.c

index d17596a77fb67eb88a5754589d7a0bf0f9f9ccd9..2fb0c25c93b5c59dc84130428977cf7b7aed4c9a 100644 (file)
@@ -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,