hw/acpi: Move AML building code for Generic Initiators to aml_build.c
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 16 Sep 2024 17:10:08 +0000 (18:10 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 4 Nov 2024 21:03:24 +0000 (16:03 -0500)
commitd8a4b4c3b4dd258c5f5f6237473349d377ea7fc9
treec26464191d3700fa6648c9fc88c5f6a8bf85b921
parentdc55a90e295e05b6246b0b152a854612467e417f
hw/acpi: Move AML building code for Generic Initiators to aml_build.c

Rather than attempting to create a generic function with mess of the two
different device handle types, use a PCI handle specific variant.  If the
ACPI handle form is needed then that can be introduced alongside this
with little duplicated code.

Drop the PCIDeviceHandle in favor of just passing the bus, devfn
and segment directly.  devfn kept as a single byte because ARI means
that in this case it is just an 8 bit function number.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20240618142333.102be976@imammedo.users.ipa.redhat.com/
Tested-by: "Huang, Ying" <ying.huang@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240916171017.1841767-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/acpi_generic_initiator.c
hw/acpi/aml-build.c
include/hw/acpi/acpi_generic_initiator.h
include/hw/acpi/aml-build.h