qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	 Eric Auger <eric.auger@redhat.com>,
	Andrew Jones <ajones@ventanamicro.com>
Subject: Re: [PATCH v2] hw/arm/virt: Remove the lower bound of HighMem IO Regions
Date: Mon, 15 Sep 2025 17:04:58 +0100	[thread overview]
Message-ID: <CAFEAcA9yUd1+TO+CrTo6i3b=BugLsU7E95iW8hnUQiuos1_c5A@mail.gmail.com> (raw)
In-Reply-To: <20250901-virt-v2-1-ac2379402c80@rsg.ci.i.u-tokyo.ac.jp>

On Mon, 1 Sept 2025 at 13:00, Akihiko Odaki
<odaki@rsg.ci.i.u-tokyo.ac.jp> wrote:
>
> Remove the lower bound of the Highmem IO Regions' addresses for the
> latest machine version to increase the chance to fit the regions in the
> PA space.
>
> The lower bound was especially problematic when using virt-install on
> Apple M2. virt-install 5.0.0 adds multiple pcie-root-port devices that
> require sufficient space in the ECAM region. However, the Highmem ECAM
> region did not fit in the limited PA space on the hardware, and the ECAM
> region size was limited to 16 MiB. If virt-install had added more than
> 16 devices to the root bridge, the region overflowed, which prevented
> edk2-stable202505 from scanning PCI devices, including the boot disk,
> causing boot failures.
>
> Ideally, a virtual machine with more than 16 devices added to the root
> bridge should just work so that users and management layers do not have
> to care whether they use constrained hardware.
>
> The base address of the Highmem IO Regions was fixed when commit
> f90747c4e8fb ("hw/arm/virt: GICv3 DT node with one or two redistributor
> regions") added the first Highmem IO Region. Later, commit 957e32cffa57
> ("hw/arm/virt: Dynamic memory map depending on RAM requirements")
> allowed moving the Highmem IO Regions to higher addresses to accommodate
> RAM more than 255 GiB, but the lower bound remained to keep the legacy
> memory map.
>
> Remove the lower bound for the latest machine version to accommodate more
> devices with the root bridge. Keeping the lower bound for the old
> machine versions ensures the compatibility is still maintained.
>
> Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> ---

Hi; this fails "make check":

(1) fails the bios-tables-check (likely the golden-reference
files need updating if the memory layout has changed)

acpi-test: Warning! MCFG binary file mismatch. Actual
[aml:/tmp/aml-PD53C3], Expected
[aml:tests/data/acpi/aarch64/virt/MCFG].
See source file tests/qtest/bios-tables-test.c for instructions on how
to update expected files.
acpi-test: Warning! MCFG mismatch. Actual [asl:/tmp/asl-6N53C3.dsl,
aml:/tmp/aml-PD53C3], Expected [asl:/tmp/asl-FF33C3.dsl,
aml:tests/data/acpi/aarch64/virt/MCFG].
acpi-test: Warning! DSDT binary file mismatch. Actual
[aml:/tmp/aml-YK53C3], Expected
[aml:tests/data/acpi/aarch64/virt/DSDT].
See source file tests/qtest/bios-tables-test.c for instructions on how
to update expected files.
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-JEN4C3.dsl,
aml:/tmp/aml-YK53C3], Expected [asl:/tmp/asl-3ZF4C3.dsl,
aml:tests/data/acpi/aarch64/virt/DSDT].
**
ERROR:../../tests/qtest/bios-tables-test.c:554:test_acpi_asl:
assertion failed: (all_tables_match)


(2) qos-test now fails with a NULL pointer related problem
when running with a build with the sanitizers enabled:


# Start of e1000e-tests tests
# starting QEMU: exec ./qemu-system-aarch64 -qtest
unix:/tmp/qtest-1298136.sock -qtest-log /dev/null -chardev
socket,path=/tmp/qtest-1298136.qmp,id=char0 -mon
chardev=char0,mode=control -display none -audio none -M virt, -cpu max
-device e1000e,netdev=hs0 -netdev socket,fd=6,id=hs0  -accel qtest
----------------------------------- stderr -----------------------------------
../../tests/qtest/libqos/pci.c:394:15: runtime error: member access
within null pointer of type 'QPCIBus' (aka 'struct QPCIBus')
    #0 0x60d9ef616f23 in qpci_config_writel
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/libqos/pci.c:394:15
    #1 0x60d9ef615cc6 in qpci_iomap
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/libqos/pci.c:534:5
    #2 0x60d9ef632504 in e1000e_pci_create
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/libqos/e1000e.c:189:19
    #3 0x60d9ef61334c in qos_driver_new
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/libqos/qgraph.c:756:11
    #4 0x60d9ef6145a1 in allocate_objects
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/libqos/qos_external.c:136:19
    #5 0x60d9ef6c0c3a in qos_allocate_objects
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/qos-test.c:131:12
    #6 0x60d9ef6c0c3a in run_one_test
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/qos-test.c:179:11
    #7 0x7753c4e80387
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x88387) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #8 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #9 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #10 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #11 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #12 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #13 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #14 0x7753c4e802a2
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x882a2) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #15 0x7753c4e80899 in g_test_run_suite
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x88899) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #16 0x7753c4e8092f in g_test_run
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x8892f) (BuildId:
1eb6131419edb83b2178b682829a6913cf682d75)
    #17 0x60d9ef6be7ae in main
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/../../tests/qtest/qos-test.c:347:5
    #18 0x7753c4a2a1c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #19 0x7753c4a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    #20 0x60d9ef5cb224 in _start
(/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/tests/qtest/qos-test+0x16c224)
(BuildId: 538375f704342381ea206855e1476b3ff0beef38)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../../tests/qtest/libqos/pci.c:394:15

thanks
-- PMM


      parent reply	other threads:[~2025-09-15 16:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01 12:00 [PATCH v2] hw/arm/virt: Remove the lower bound of HighMem IO Regions Akihiko Odaki
2025-09-03 15:41 ` Eric Auger
2025-09-15 16:04 ` Peter Maydell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA9yUd1+TO+CrTo6i3b=BugLsU7E95iW8hnUQiuos1_c5A@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=ajones@ventanamicro.com \
    --cc=eric.auger@redhat.com \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).