]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 16 Sep 2024 17:10:06 +0000 (18:10 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 6 Nov 2024 12:01:58 +0000 (15:01 +0300)
commit7ee7418dae177bb34226baf6a66e461f55e15465
treeb17f27a1e2fd7c83cfb315266adccc71f51963bc
parentfac933cae4223fecb454b609148d417cae2ca5fd
hw/acpi: Fix ordering of BDF in Generic Initiator PCI Device Handle.

The ordering in ACPI specification [1] has bus number in the lowest byte.
As ACPI tables are little endian this is the reverse of the ordering
used by PCI_BUILD_BDF().  As a minimal fix split the QEMU BDF up
into bus and devfn and write them as single bytes in the correct
order.

[1] ACPI Spec 6.3, Table 5.80

Fixes: 0a5b5acdf2d8 ("hw/acpi: Implement the SRAT GI affinity structure")
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240916171017.1841767-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 16c687d84574a1139a6475c33e3b9191f7932ac0)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/acpi/acpi_generic_initiator.c