[PATCH v3 0/9] i440fx/acpi: addition of feature and bug fixes.

Ani Sinha posted 9 patches 3 years, 6 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200915153818.13020-1-ani@anisinha.ca
Maintainers: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Thomas Huth <thuth@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Richard Henderson <rth@twiddle.net>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Laurent Vivier <lvivier@redhat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
There is a newer version of this series
hw/acpi/pcihp.c                   |  15 ++++++++++++
hw/acpi/piix4.c                   |   6 +++--
hw/i386/acpi-build.c              |  37 +++++++++++++++++++-----------
tests/data/acpi/pc/DSDT.hpbridge  | Bin 0 -> 4895 bytes
tests/data/acpi/pc/DSDT.roothp    | Bin 0 -> 5130 bytes
tests/data/acpi/q35/DSDT          | Bin 7678 -> 7670 bytes
tests/data/acpi/q35/DSDT.acpihmat | Bin 9002 -> 8994 bytes
tests/data/acpi/q35/DSDT.bridge   | Bin 7695 -> 7688 bytes
tests/data/acpi/q35/DSDT.cphp     | Bin 8141 -> 8133 bytes
tests/data/acpi/q35/DSDT.dimmpxm  | Bin 9331 -> 9323 bytes
tests/data/acpi/q35/DSDT.ipmibt   | Bin 7753 -> 7745 bytes
tests/data/acpi/q35/DSDT.memhp    | Bin 9037 -> 9029 bytes
tests/data/acpi/q35/DSDT.mmio64   | Bin 8808 -> 8801 bytes
tests/data/acpi/q35/DSDT.numamem  | Bin 7684 -> 7676 bytes
tests/data/acpi/q35/DSDT.tis      | Bin 8283 -> 8276 bytes
tests/qtest/bios-tables-test.c    |  30 ++++++++++++++++++++++++
16 files changed, 73 insertions(+), 15 deletions(-)
create mode 100644 tests/data/acpi/pc/DSDT.hpbridge
create mode 100644 tests/data/acpi/pc/DSDT.roothp
[PATCH v3 0/9] i440fx/acpi: addition of feature and bug fixes.
Posted by Ani Sinha 3 years, 6 months ago
In v3, I fixed another bug with patch #9. Now, with hotplug disabled on both
root bus and pci bridges, we  get a clean DSDT table as can be seen here:

https://pastebin.ubuntu.com/p/JSZhfyBFD7/

The AML corresponding to the root bus is:

   Scope (\_SB)
    {
        Scope (PCI0)
        {
            Device (S00)
            {
                Name (_ADR, Zero)  // _ADR: Address
            }

            Device (S10)
            {
                Name (_ADR, 0x00020000)  // _ADR: Address
                Method (_S1D, 0, NotSerialized)  // _S1D: S1 Device State
                {
                    Return (Zero)
                }

                Method (_S2D, 0, NotSerialized)  // _S2D: S2 Device State
                {
                    Return (Zero)
                }

                Method (_S3D, 0, NotSerialized)  // _S3D: S3 Device State
                {
                    Return (Zero)
                }
            }

            Device (S18)
            {
                Name (_ADR, 0x00030000)  // _ADR: Address
            }
        }
    }


The AML was generated by making the following change to the test:

diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 7632cfe1be..39b5c213ef 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -750,7 +750,7 @@ static void test_acpi_piix4_root_hotplug(void)
     data.required_struct_types = base_required_struct_types;
     data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off "
-                  "-device pci-bridge,chassis_nr=1", &data);
+                  "-device pci-bridge,chassis_nr=1 -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off", &data);
     free_test_data(&data);
 }


and then running the test using:
$ make tests/qtest/bios-tables-test && \
  V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/bios-tables-test


Ani Sinha (9):
  tests/acpi: document addition of table DSDT.roothp for unit testing
    root pci hotplug on/off
  tests/acpi: add a new unit test to test hotplug off/on feature on the
    root pci bus
  tests/acpi: add a new ACPI table in order to test root pci hotplug
    on/off
  Fix a gap where acpi_pcihp_find_hotplug_bus() returns a
    non-hotpluggable bus
  i440fx/acpi: do not add hotplug related amls for cold plugged bridges
  tests/acpi: list added acpi table binary file for pci bridge hotplug
    test
  tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support'
    bridge flag
  tests/acpi: add newly added acpi DSDT table blob for pci bridge
    hotplug flag
  piix4: don't reserve hw resources when hotplug is off globally

 hw/acpi/pcihp.c                   |  15 ++++++++++++
 hw/acpi/piix4.c                   |   6 +++--
 hw/i386/acpi-build.c              |  37 +++++++++++++++++++-----------
 tests/data/acpi/pc/DSDT.hpbridge  | Bin 0 -> 4895 bytes
 tests/data/acpi/pc/DSDT.roothp    | Bin 0 -> 5130 bytes
 tests/data/acpi/q35/DSDT          | Bin 7678 -> 7670 bytes
 tests/data/acpi/q35/DSDT.acpihmat | Bin 9002 -> 8994 bytes
 tests/data/acpi/q35/DSDT.bridge   | Bin 7695 -> 7688 bytes
 tests/data/acpi/q35/DSDT.cphp     | Bin 8141 -> 8133 bytes
 tests/data/acpi/q35/DSDT.dimmpxm  | Bin 9331 -> 9323 bytes
 tests/data/acpi/q35/DSDT.ipmibt   | Bin 7753 -> 7745 bytes
 tests/data/acpi/q35/DSDT.memhp    | Bin 9037 -> 9029 bytes
 tests/data/acpi/q35/DSDT.mmio64   | Bin 8808 -> 8801 bytes
 tests/data/acpi/q35/DSDT.numamem  | Bin 7684 -> 7676 bytes
 tests/data/acpi/q35/DSDT.tis      | Bin 8283 -> 8276 bytes
 tests/qtest/bios-tables-test.c    |  30 ++++++++++++++++++++++++
 16 files changed, 73 insertions(+), 15 deletions(-)
 create mode 100644 tests/data/acpi/pc/DSDT.hpbridge
 create mode 100644 tests/data/acpi/pc/DSDT.roothp

-- 
2.17.1