diff options
author | Nicolin Chen <nicolinc@nvidia.com> | 2024-06-19 13:12:43 -0700 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-03 18:14:06 -0400 |
commit | 5786827f47a0721bb997ad3f653d2b843ba3fd76 (patch) | |
tree | 5d41dcc0521f08e83ddd1409de2c1dd51a59f59e /hw/intc | |
parent | 93c76555d842b5d84b95f66abecb6b19545338d9 (diff) | |
download | qemu-5786827f47a0721bb997ad3f653d2b843ba3fd76.zip qemu-5786827f47a0721bb997ad3f653d2b843ba3fd76.tar.gz qemu-5786827f47a0721bb997ad3f653d2b843ba3fd76.tar.bz2 |
hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping
It's observed that Linux kernel booting with the VM reports a "conflicting
mapping for input ID" FW_BUG.
The IORT doc defines "Number of IDs" to be "the number of IDs in the range
minus one", while virt-acpi-build.c simply stores the number of IDs in the
id_count without the "minus one". Meanwhile, some of the callers pass in a
0xFFFF following the spec. So, this is a mismatch between the function and
its callers.
Fix build_iort_id_mapping() by internally subtracting one from the pass-in
@id_count. Accordingly make sure that all existing callers pass in a value
without the "minus one", i.e. change all 0xFFFFs to 0x10000s.
Also, add a few lines of comments to highlight this change along with the
referencing document for this build_iort_id_mapping().
Fixes: 42e0f050e3a5 ("hw/arm/virt-acpi-build: Add IORT support to bypass SMMUv3")
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Message-Id: <20240619201243.936819-1-nicolinc@nvidia.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/intc')
0 files changed, 0 insertions, 0 deletions