diff mbox series

[v2,24/34] acpi: pci: describe all functions on populated slots

Message ID 20230302161543.286002-25-imammedo@redhat.com (mailing list archive)
State New, archived
Headers show
Series pci(pc/q35): acpi-index support on non-hotpluggable slots | expand

Commit Message

Igor Mammedov March 2, 2023, 4:15 p.m. UTC
describing all present devices on functions other than
0 was complicated when non hotplug and hotplug code
was intermixed. So QEMU has been excluding non zero
functions since they are not supported by hotplug code,
then a condition to whitelist coldplugged bridges was
added and later whitelisting of devices that advertise
presence of their own AML description.

With non hotplug and hotplug code separated, it is
possible to relax rules and allow describing all
non-hotpluggble functions and hence simplify
conditions whether PCI device should be enumerated by
generic (non-hotplug) code.

Price of that simplification is an extra few Device()
descriptors in DSDT exposing built-in chipset functions,
which has no functional effect on guest side.

Apart from that, the enumeration of non zero functions,
allows to attach more NICs with acpi-index enabled
directly on hostbridge (if hotplug is not required).

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 * patch is making acpi-index feature support complete in
   the scope of host bridge (support of acpi-index on PXB
   is out of scope of this series, and probably should follow
   host-bridge clean up)
 * follow up patch will add a tests case with acpi-index
   enabled PCI device on non zero function to demonstrate
   that.
---
 hw/i386/acpi-build.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 46f78e9338..8e2481fe5e 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -494,12 +494,6 @@  static bool is_devfn_ignored_generic(const int devfn, const PCIBus *bus)
             if (DEVICE(pdev)->hotplugged) {
                 return true;
             }
-        } else if (!get_dev_aml_func(DEVICE(pdev))) {
-            /*
-             * Ignore all other devices on !0 functions unless they
-             * have AML description (i.e have get_dev_aml_func() != 0)
-             */
-            return true;
         }
     }
     return false;