qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 23609e: acpi: add interface to build device s


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 23609e: acpi: add interface to build device specific AML
Date: Fri, 10 Jun 2022 06:00:28 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 23609e47c0f62b537ba9803cb15e69993fd0c266
      
https://github.com/qemu/qemu/commit/23609e47c0f62b537ba9803cb15e69993fd0c266
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/acpi_interface.c
    M hw/acpi/meson.build
    A include/hw/acpi/acpi_aml_interface.h

  Log Message:
  -----------
  acpi: add interface to build device specific AML

There is already ISADeviceClass::build_aml() callback which
builds device specific AML blob for some ISA devices.
To extend the same idea to other devices, add TYPE_ACPI_DEV_AML_IF
Interface that will provide a more generic callback which
will be used not only for ISA but other devices. It will
allow get rid of some data-mining and ad-hoc AML building,
by asking device(s) to generate its own AML blob like it's
done for ISA devices.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-2-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f974e0b75b42e50e6f3d529603e316df3e571ca1
      
https://github.com/qemu/qemu/commit/f974e0b75b42e50e6f3d529603e316df3e571ca1
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/isa/isa-bus.c

  Log Message:
  -----------
  acpi: make isa_build_aml() support AcpiDevAmlIf interface

To allow incremental conversion from ISADeviceClass::build_aml
to AcpiDevAmlIf, add support for the later without removing
the former. Once conversion is complete, another commit will
drop ISADeviceClass::build_aml related code.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-3-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e7c72a678ab707e1c76c5cdf9befb410cb25e72c
      
https://github.com/qemu/qemu/commit/e7c72a678ab707e1c76c5cdf9befb410cb25e72c
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/block/fdc-isa.c
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: fdc-isa: replace ISADeviceClass::build_aml with 
AcpiDevAmlIfClass:build_dev_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-4-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ef26fc47baf57be482e5d32bfe9b4769906f5eb7
      
https://github.com/qemu/qemu/commit/ef26fc47baf57be482e5d32bfe9b4769906f5eb7
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/char/parallel.c

  Log Message:
  -----------
  acpi: parallel port: replace ISADeviceClass::build_aml with 
AcpiDevAmlIfClass:build_dev_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-5-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0d170dc13c54d46566fb1717f9342826b8c0c7de
      
https://github.com/qemu/qemu/commit/0d170dc13c54d46566fb1717f9342826b8c0c7de
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/char/serial-isa.c

  Log Message:
  -----------
  acpi: serial-is: replace ISADeviceClass::build_aml with 
AcpiDevAmlIfClass:build_dev_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-6-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d9cf178cc0bcad20fb2c6f1a08bb24a2b45c1c77
      
https://github.com/qemu/qemu/commit/d9cf178cc0bcad20fb2c6f1a08bb24a2b45c1c77
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/rtc/mc146818rtc.c

  Log Message:
  -----------
  acpi: mc146818rtc: replace ISADeviceClass::build_aml with 
AcpiDevAmlIfClass:build_dev_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-7-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 68f01317b4e43ef67ef9cffd646773a4db857fbf
      
https://github.com/qemu/qemu/commit/68f01317b4e43ef67ef9cffd646773a4db857fbf
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/input/pckbd.c

  Log Message:
  -----------
  acpi: pckbd: replace ISADeviceClass::build_aml with 
AcpiDevAmlIfClass:build_dev_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-8-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a576158ee9e68d3237bb5a2b0ff0280b291e7972
      
https://github.com/qemu/qemu/commit/a576158ee9e68d3237bb5a2b0ff0280b291e7972
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/isa/isa-bus.c
    M include/hw/isa/isa.h

  Log Message:
  -----------
  isa-bus: drop no longer used ISADeviceClass::build_aml

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-9-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: dc35bfb6e0be460b05193af87c89a7a3cd0dae54
      
https://github.com/qemu/qemu/commit/dc35bfb6e0be460b05193af87c89a7a3cd0dae54
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    A tests/data/acpi/q35/DSDT.ipmismbus
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: add and whitelist DSDT.ipmismbus expected blob

.. which will be used by follow up smbus-ipmi test-case

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-10-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ac70b4a3f158152f8a60aa882eb8d98b2f041729
      
https://github.com/qemu/qemu/commit/ac70b4a3f158152f8a60aa882eb8d98b2f041729
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test.c

  Log Message:
  -----------
  tests: acpi: q35: add test for smbus-ipmi device

expected new device node:

    Device (MI1)
    {
        Name (_HID, EisaId ("IPI0001"))  // _HID: Hardware ID
        Name (_STR, "ipmi_smbus")  // _STR: Description String
        Name (_UID, One)  // _UID: Unique ID
        Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
        {
            I2cSerialBusV2 (0x0000, ControllerInitiated, 0x000186A0,
                AddressingMode7Bit, "\\_SB.PCI0.SMB0",
                0x00, ResourceProducer, , Exclusive,
                )
        })
        Name (_IFT, 0x04)  // _IFT: IPMI Interface Type
        Name (_SRV, 0x0200)  // _SRV: IPMI Spec Revision
    }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-11-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f4e2fb67bc40b06bf7544536c03e5e234ab5320b
      
https://github.com/qemu/qemu/commit/f4e2fb67bc40b06bf7544536c03e5e234ab5320b
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blob DSDT.ipmismbus

basic q35 DSDT with an extra device node:

  Device (MI1)
    {
        Name (_HID, EisaId ("IPI0001"))  // _HID: Hardware ID
        Name (_STR, "ipmi_smbus")  // _STR: Description String
        Name (_UID, One)  // _UID: Unique ID
        Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
        {
      I2cSerialBusV2 (0x0000, ControllerInitiated, 0x000186A0,
          AddressingMode7Bit, "\\_SB.PCI0.SMB0",
          0x00, ResourceProducer, , Exclusive,
          )
        })
        Name (_IFT, 0x04)  // _IFT: IPMI Interface Type
        Name (_SRV, 0x0200)  // _SRV: IPMI Spec Revision
    }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-12-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4ccf0937a41dc11f515ee965631a0e44ede97427
      
https://github.com/qemu/qemu/commit/4ccf0937a41dc11f515ee965631a0e44ede97427
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist DSDT.ipmismbus expected blob

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-13-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ea01c52291ffb7b571e21bb137470abd9e1c3175
      
https://github.com/qemu/qemu/commit/ea01c52291ffb7b571e21bb137470abd9e1c3175
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/ipmi-stub.c
    M hw/acpi/ipmi.c
    M hw/i386/acpi-build.c
    M include/hw/acpi/ipmi.h

  Log Message:
  -----------
  ipmi: acpi: use relative path to resource source

smbus-ipmi AML description needs to specify a path to its parent
node in _CRS. The rest of IPMI inplementations (ISA based)
do not need path at all. Instead of passing through a full path
use relative path to point to smbus-ipmi's parent node, it will
let follow up patches to create IPMI device AML in a generic
way instead of current ad-hoc way. (i.e. AML will be generated
the same way it's done for other ISA device, and smbus will be
converted to generate AML for its slave devices the same way
as ISA)

expected AML change:
     Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
     {
        I2cSerialBusV2 (0x0000, ControllerInitiated, 0x000186A0,
-           AddressingMode7Bit, "\\_SB.PCI0.SMB0",
+           AddressingMode7Bit, "^",
            0x00, ResourceProducer, , Exclusive,
            )
      })

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-14-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 0f5b3fd7483e3fe8f0c8fc28346a1b0cd91de106
      
https://github.com/qemu/qemu/commit/0f5b3fd7483e3fe8f0c8fc28346a1b0cd91de106
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected DSDT.ipmismbus blob

expected AML change:
         Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
         {
            I2cSerialBusV2 (0x0000, ControllerInitiated, 0x000186A0,
    -           AddressingMode7Bit, "\\_SB.PCI0.SMB0",
    +           AddressingMode7Bit, "^",
                0x00, ResourceProducer, , Exclusive,
                )
          })

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-15-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4b66ddcc4d2d690f11152aeed1097f44ecff1aa4
      
https://github.com/qemu/qemu/commit/4b66ddcc4d2d690f11152aeed1097f44ecff1aa4
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i2c/smbus_ich9.c

  Log Message:
  -----------
  acpi: ich9-smb: add support for AcpiDevAmlIf interface

wire AcpiDevAmlIf interface to build ich9-smb and its slave
devices AML. It will be used by followup patches to switch
from creating AML in ad-hoc way to a more systematic one
that will scan present devices and ask them to provide
their AML code like it's done with ISA devices.

This patch is a partial conversion, as it only fetches
AML from slave devices attached to its I2C bus.

The conversion will be completed when PCI bus is
switched to use AcpiDevAmlIf and build_smb0() could be
dropped.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-16-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5876d9b53fee5fc5a341fad1618cf3a9731206da
      
https://github.com/qemu/qemu/commit/5876d9b53fee5fc5a341fad1618cf3a9731206da
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/ipmi-stub.c
    M hw/acpi/ipmi.c
    M hw/i386/acpi-build.c
    M hw/ipmi/isa_ipmi_bt.c
    M hw/ipmi/isa_ipmi_kcs.c
    M hw/ipmi/smbus_ipmi.c
    M include/hw/acpi/ipmi.h

  Log Message:
  -----------
  acpi: ipmi: use AcpiDevAmlIf interface to build IPMI device descriptors

convert ad-hoc way we use to generate AML for ISA/SMB IPMI devices
to a generic approach (i.e. make devices provide its own AML blobs
like it is done with other ISA devices (ex. KBD))

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-17-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 38003951b5948865f0a6be3e43b3658ae54d6e97
      
https://github.com/qemu/qemu/commit/38003951b5948865f0a6be3e43b3658ae54d6e97
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  q35: acpi: drop not needed PCMachineClass::do_not_add_smb_acpi

by default we do not version ACPI AML as it's considered
a part of firmware. Drop do_not_add_smb_acpi that blocked
SMBUS AML description on 3.1 and older machine types without
providing justification.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-18-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 6a4b286ced99377652f1ae0963e69ccac8c3df3b
      
https://github.com/qemu/qemu/commit/6a4b286ced99377652f1ae0963e69ccac8c3df3b
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: white-list to be re-factored pc/q35 DSDT

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220609114855.3477822-1-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 92ea7fb3fe311d30905e12a962b22a38251c1a79
      
https://github.com/qemu/qemu/commit/92ea7fb3fe311d30905e12a962b22a38251c1a79
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/isa/piix3.c

  Log Message:
  -----------
  acpi: pc: isa bridge: use AcpiDevAmlIf interface to build ISA device 
descriptors

replaces ad-hoc build_isa_devices_aml() with generic AcpiDevAmlIf
way to build bridge AML including all devices that are attached to
its ISA bus.

Later when PCI is converted to AcpiDevAmlIf, build_piix4_isa_bridge()
will also be dropped since PCI parts itself will take care of
building device prologue/epilogue AML for each enumerated PCI
device.

Expected AML change is contextual, where ISA devices are moved
from separately declared _SB.PCI0.ISA scope , directly under
Device(ISA) node.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-20-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 887e8e9d3a4578059bd0a213e9b3cae81943dc18
      
https://github.com/qemu/qemu/commit/887e8e9d3a4578059bd0a213e9b3cae81943dc18
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/isa/lpc_ich9.c

  Log Message:
  -----------
  acpi: q35: isa bridge: use AcpiDevAmlIf interface to build ISA device 
descriptors

replaces adhoc build_isa_devices_aml() with generic AcpiDevAmlIf
way to build bridge AML including all devices that are attached
to its ISA bus.

Later when PCI is converted to AcpiDevAmlIf, build_q35_isa_bridge()
will also be dropped since PCI parts itself will take care of
building device prologue/epilogue AML for each enumerated PCI device.

Expected AML change is contextual, where ISA devices are moved from
separately declared _SB.PCI0.ISA scope, directly under Device(ISA)
node.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-21-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8796f60fbfa15cf392c5892311ccec5f4ec805b5
      
https://github.com/qemu/qemu/commit/8796f60fbfa15cf392c5892311ccec5f4ec805b5
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.hpbrroot
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpierst
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.cxl
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/data/acpi/q35/DSDT.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.viot
    M tests/data/acpi/q35/DSDT.xapic
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

Expected AML change:
ISA devices under separate _SB.PCI0.ISA scope are moved
directly under Device(ISA) node.

Example from PC machine, and q35 have similar changes:

         {
             Name (_ADR, 0x00010000)  // _ADR: Address
             OperationRegion (P40C, PCI_Config, 0x60, 0x04)
-        }
-    }
-
-    Scope (_SB.PCI0.ISA)
-    {
-        Device (KBD)
-        {
-            Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard 
(101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
-            Name (_STA, 0x0F)  // _STA: Status
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+            Device (KBD)
             {
-                IO (Decode16,
-                    0x0060,             // Range Minimum
-                    0x0060,             // Range Maximum
-                    0x01,               // Alignment
-                    0x01,               // Length
-                    )
-                IO (Decode16,
-                    0x0064,             // Range Minimum
-                    0x0064,             // Range Maximum
-                    0x01,               // Alignment
-                    0x01,               // Length
-                    )
-                IRQNoFlags ()
-                    {1}
-            })
-        }
-
-        Device (MOU)
-        {
-            Name (_HID, EisaId ("PNP0F13") /* PS/2 Mouse */)  // _HID: 
Hardware ID
-            Name (_STA, 0x0F)  // _STA: Status
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
-            {
-                IRQNoFlags ()
-                    {12}
-            })
-        }
+                Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard 
(101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
+                Name (_STA, 0x0F)  // _STA: Status
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x0060,             // Range Minimum
+                        0x0060,             // Range Maximum
+                        0x01,               // Alignment
+                        0x01,               // Length
+                        )
+                    IO (Decode16,
+                        0x0064,             // Range Minimum
+                        0x0064,             // Range Maximum
+                        0x01,               // Alignment
+                        0x01,               // Length
+                        )
+                    IRQNoFlags ()
+                        {1}
+                })
+            }

-        Device (FDC0)
-        {
-            Name (_HID, EisaId ("PNP0700"))  // _HID: Hardware ID
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
-            {
-                IO (Decode16,
-                    0x03F2,             // Range Minimum
-                    0x03F2,             // Range Maximum
-                    0x00,               // Alignment
-                    0x04,               // Length
-                    )
-                IO (Decode16,
-                    0x03F7,             // Range Minimum
-                    0x03F7,             // Range Maximum
-                    0x00,               // Alignment
-                    0x01,               // Length
-                    )
-                IRQNoFlags ()
-                    {6}
-                DMA (Compatibility, NotBusMaster, Transfer8, )
-                    {2}
-            })
-            Device (FLPA)
+            Device (MOU)
             {
-                Name (_ADR, Zero)  // _ADR: Address
-                Name (_FDI, Package (0x10)  // _FDI: Floppy Drive Information
+                Name (_HID, EisaId ("PNP0F13") /* PS/2 Mouse */)  // _HID: 
Hardware ID
+                Name (_STA, 0x0F)  // _STA: Status
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
                 {
-                    Zero,
-                    0x05,
-                    0x4F,
-                    0x30,
-                    One,
-                    0xAF,
-                    0x02,
-                    0x25,
-                    0x02,
-                    0x12,
-                    0x1B,
-                    0xFF,
-                    0x6C,
-                    0xF6,
-                    0x0F,
-                    0x08
+                    IRQNoFlags ()
+                        {12}
                 })
             }

-            Name (_FDE, Buffer (0x14)  // _FDE: Floppy Disk Enumerate
+            Device (FDC0)
             {
-                /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  
// ........
-                /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  
// ........
-                /* 0010 */  0x02, 0x00, 0x00, 0x00                           
// ....
-            })
-        }
+                Name (_HID, EisaId ("PNP0700"))  // _HID: Hardware ID
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x03F2,             // Range Minimum
+                        0x03F2,             // Range Maximum
+                        0x00,               // Alignment
+                        0x04,               // Length
+                        )
+                    IO (Decode16,
+                        0x03F7,             // Range Minimum
+                        0x03F7,             // Range Maximum
+                        0x00,               // Alignment
+                        0x01,               // Length
+                        )
+                    IRQNoFlags ()
+                        {6}
+                    DMA (Compatibility, NotBusMaster, Transfer8, )
+                        {2}
+                })
+                Device (FLPA)
+                {
+                    Name (_ADR, Zero)  // _ADR: Address
+                    Name (_FDI, Package (0x10)  // _FDI: Floppy Drive 
Information
+                    {
+                        Zero,
+                        0x05,
+                        0x4F,
+                        0x30,
+                        One,
+                        0xAF,
+                        0x02,
+                        0x25,
+                        0x02,
+                        0x12,
+                        0x1B,
+                        0xFF,
+                        0x6C,
+                        0xF6,
+                        0x0F,
+                        0x08
+                    })
+                }

-        Device (LPT1)
-        {
-            Name (_HID, EisaId ("PNP0400") /* Standard LPT Parallel Port */)  
// _HID: Hardware ID
-            Name (_UID, One)  // _UID: Unique ID
-            Name (_STA, 0x0F)  // _STA: Status
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+                Name (_FDE, Buffer (0x14)  // _FDE: Floppy Disk Enumerate
+                {
+                    /* 0000 */  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00,  // ........
+                    /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
0x00,  // ........
+                    /* 0010 */  0x02, 0x00, 0x00, 0x00                         
  // ....
+                })
+            }
+
+            Device (LPT1)
             {
-                IO (Decode16,
-                    0x0378,             // Range Minimum
-                    0x0378,             // Range Maximum
-                    0x08,               // Alignment
-                    0x08,               // Length
-                    )
-                IRQNoFlags ()
-                    {7}
-            })
-        }
+                Name (_HID, EisaId ("PNP0400") /* Standard LPT Parallel Port 
*/)  // _HID: Hardware ID
+                Name (_UID, One)  // _UID: Unique ID
+                Name (_STA, 0x0F)  // _STA: Status
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x0378,             // Range Minimum
+                        0x0378,             // Range Maximum
+                        0x08,               // Alignment
+                        0x08,               // Length
+                        )
+                    IRQNoFlags ()
+                        {7}
+                })
+            }

-        Device (COM1)
-        {
-            Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial 
Port */)  // _HID: Hardware ID
-            Name (_UID, One)  // _UID: Unique ID
-            Name (_STA, 0x0F)  // _STA: Status
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+            Device (COM1)
             {
-                IO (Decode16,
-                    0x03F8,             // Range Minimum
-                    0x03F8,             // Range Maximum
-                    0x00,               // Alignment
-                    0x08,               // Length
-                    )
-                IRQNoFlags ()
-                    {4}
-            })
-        }
+                Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial 
Port */)  // _HID: Hardware ID
+                Name (_UID, One)  // _UID: Unique ID
+                Name (_STA, 0x0F)  // _STA: Status
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x03F8,             // Range Minimum
+                        0x03F8,             // Range Maximum
+                        0x00,               // Alignment
+                        0x08,               // Length
+                        )
+                    IRQNoFlags ()
+                        {4}
+                })
+            }

-        Device (RTC)
-        {
-            Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // _HID: 
Hardware ID
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+            Device (RTC)
             {
-                IO (Decode16,
-                    0x0070,             // Range Minimum
-                    0x0070,             // Range Maximum
-                    0x01,               // Alignment
-                    0x08,               // Length
-                    )
-                IRQNoFlags ()
-                    {8}
-            })
+                Name (_HID, EisaId ("PNP0B00") /* AT Real-Time Clock */)  // 
_HID: Hardware ID
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x0070,             // Range Minimum
+                        0x0070,             // Range Maximum
+                        0x01,               // Alignment
+                        0x08,               // Length
+                        )
+                    IRQNoFlags ()
+                        {8}
+                })
+            }
         }
     }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220609115113.3478093-1-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 39728badab1aadd3a269614da2d42b4f7f09cb0a
      
https://github.com/qemu/qemu/commit/39728badab1aadd3a269614da2d42b4f7f09cb0a
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    A tests/data/acpi/q35/DSDT.applesmc
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: add and white-list DSDT.applesmc expected blob

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-23-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: cde55744e9bcaefe1fbce6194a21bb3b7b9c2ae7
      
https://github.com/qemu/qemu/commit/cde55744e9bcaefe1fbce6194a21bb3b7b9c2ae7
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test.c

  Log Message:
  -----------
  tests: acpi: add applesmc testcase

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-24-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1d7ea915003a2064dc542ffee8d02104a2dee728
      
https://github.com/qemu/qemu/commit/1d7ea915003a2064dc542ffee8d02104a2dee728
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/misc/applesmc.c
    M include/hw/isa/isa.h

  Log Message:
  -----------
  acpi: applesmc: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML

  .. and clean up not longer needed conditionals in DSTD build
code. applesmc AML will be fetched and included when ISA bridge
will build its own AML code (incl. attached devices).

Expected AML change:
the device under separate _SB.PCI0.ISA scope is moved directly
under Device(ISA) node.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-25-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ec66dbc75381ad6c3ac62c907b014d847ece4580
      
https://github.com/qemu/qemu/commit/ec66dbc75381ad6c3ac62c907b014d847ece4580
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/DSDT.applesmc
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

@@ -145,6 +145,23 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         {
             Name (_ADR, 0x001F0000)  // _ADR: Address
             OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C)
+            Device (SMC)
+            {
+                Name (_HID, EisaId ("APP0001"))  // _HID: Hardware ID
+                Name (_STA, 0x0B)  // _STA: Status
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x0300,             // Range Minimum
+                        0x0300,             // Range Maximum
+                        0x01,               // Alignment
+                        0x20,               // Length
+                        )
+                    IRQNoFlags ()
+                        {6}
+                })
+            }
+
             Device (KBD)
             {
                 Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard 
(101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
@@ -3246,26 +3263,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         }
     }

-    Scope (\_SB.PCI0.ISA)
-    {
-        Device (SMC)
-        {
-            Name (_HID, EisaId ("APP0001"))  // _HID: Hardware ID
-            Name (_STA, 0x0B)  // _STA: Status
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
-            {
-                IO (Decode16,
-                    0x0300,             // Range Minimum
-                    0x0300,             // Range Maximum
-                    0x01,               // Alignment
-                    0x20,               // Length
-                    )
-                IRQNoFlags ()
-                    {6}
-            })
-        }
-    }
-
     Scope (\_SB)
     {
         Scope (PCI0)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-26-imammedo@redhat.com>


  Commit: 7a3048d59648405cbc42c2c6a9b2084a70b8fe52
      
https://github.com/qemu/qemu/commit/7a3048d59648405cbc42c2c6a9b2084a70b8fe52
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    A tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: white-lists expected DSDT.pvpanic-isa blob

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-27-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: fd7bcffe5988d799f37e4ad92cfd1480ce7a9ce6
      
https://github.com/qemu/qemu/commit/fd7bcffe5988d799f37e4ad92cfd1480ce7a9ce6
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test.c

  Log Message:
  -----------
  tests: acpi: add pvpanic-isa: testcase

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-28-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ff36e90e7c12c0bfdb43737614f8ef7c3bc35bd1
      
https://github.com/qemu/qemu/commit/ff36e90e7c12c0bfdb43737614f8ef7c3bc35bd1
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/misc/pvpanic-isa.c
    M include/hw/misc/pvpanic.h

  Log Message:
  -----------
  acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML

.. and clean up not longer needed conditionals in DSTD build code
pvpanic-isa AML will be fetched and included when ISA bridge will
build its own AML code (including attached devices).

Expected AML change:
   the device under separate _SB.PCI0.ISA scope is moved directly
   under Device(ISA) node.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-29-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d09ac1167ef05519fcf94ea98734614d8aade7a4
      
https://github.com/qemu/qemu/commit/d09ac1167ef05519fcf94ea98734614d8aade7a4
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected DSDT.pvpanic-isa blob

@@ -145,6 +145,37 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         {
             Name (_ADR, 0x001F0000)  // _ADR: Address
             OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C)
+            Device (PEVT)
+            {
+                Name (_HID, "QEMU0001")  // _HID: Hardware ID
+                Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource 
Settings
+                {
+                    IO (Decode16,
+                        0x0505,             // Range Minimum
+                        0x0505,             // Range Maximum
+                        0x01,               // Alignment
+                        0x01,               // Length
+                        )
+                })
+                OperationRegion (PEOR, SystemIO, 0x0505, One)
+                Field (PEOR, ByteAcc, NoLock, Preserve)
+                {
+                    PEPT,   8
+                }
+
+                Name (_STA, 0x0F)  // _STA: Status
+                Method (RDPT, 0, NotSerialized)
+                {
+                    Local0 = PEPT /* \_SB_.PCI0.ISA_.PEVT.PEPT */
+                    Return (Local0)
+                }
+
+                Method (WRPT, 1, NotSerialized)
+                {
+                    PEPT = Arg0
+                }
+            }
+
             Device (KBD)
             {
                 Name (_HID, EisaId ("PNP0303") /* IBM Enhanced Keyboard 
(101/102-key, PS/2 Mouse) */)  // _HID: Hardware ID
@@ -3246,40 +3277,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         }
     }

-    Scope (\_SB.PCI0.ISA)
-    {
-        Device (PEVT)
-        {
-            Name (_HID, "QEMU0001")  // _HID: Hardware ID
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
-            {
-                IO (Decode16,
-                    0x0505,             // Range Minimum
-                    0x0505,             // Range Maximum
-                    0x01,               // Alignment
-                    0x01,               // Length
-                    )
-            })
-            OperationRegion (PEOR, SystemIO, 0x0505, One)
-            Field (PEOR, ByteAcc, NoLock, Preserve)
-            {
-                PEPT,   8
-            }
-
-            Name (_STA, 0x0F)  // _STA: Status
-            Method (RDPT, 0, NotSerialized)
-            {
-                Local0 = PEPT /* \_SB_.PCI0.ISA_.PEVT.PEPT */
-                Return (Local0)
-            }
-
-            Method (WRPT, 1, NotSerialized)
-            {
-                PEPT = Arg0
-            }
-        }
-    }
-
     Scope (\_SB)
     {
         Scope (PCI0)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220608135340.3304695-30-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a5bf52d21c9137517cb00f006949b45b076ec80e
      
https://github.com/qemu/qemu/commit/a5bf52d21c9137517cb00f006949b45b076ec80e
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: white-list DSDT.tis.tpm2/DSDT.tis.tpm12 expected blobs

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20220608135340.3304695-31-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5198d7939cc1b5076e0d673f93e6074f0235f2ff
      
https://github.com/qemu/qemu/commit/5198d7939cc1b5076e0d673f93e6074f0235f2ff
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: pc/q35: tpm-tis: fix TPM device scope

tpm-tis 2.0, is not a PCI device but ISA one, move it
under ISA scope to fix incorrect placement.

Fixes: 24cf5413aa0 (acpi: Make TPM 2.0 with TIS available as MSFT0101)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-32-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d3ecb22c939ebbf92aa9d28b912a3b8a947a54f1
      
https://github.com/qemu/qemu/commit/d3ecb22c939ebbf92aa9d28b912a3b8a947a54f1
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: pc/q35: remove not needed 'if' condition on pci bus

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-33-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 168e3aa7acdf128fb8176616dfe099d6ef3c2182
      
https://github.com/qemu/qemu/commit/168e3aa7acdf128fb8176616dfe099d6ef3c2182
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c
    M hw/tpm/tpm_tis_isa.c

  Log Message:
  -----------
  acpi: tpm-tis: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML

.. and clean up not longer needed conditionals in DSTD build code
tpm-tis AML will be fetched and included when ISA bridge will
build its own AML code (including attached devices).

Expected AML change:
    the device under separate _SB.PCI0.ISA scope is moved directly
    under Device(ISA) node.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-34-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f3115cdd9cb8cb6ffba5b9d3e37f096724c77099
      
https://github.com/qemu/qemu/commit/f3115cdd9cb8cb6ffba5b9d3e37f096724c77099
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected DSDT.tis.tpm2/DSDT.tis.tpm12 blobs

expected move of tmp-tis device description directly under
Device(ISA) node.

for tpm-tis 2.0:

  @@ -145,6 +145,189 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
           {
               Name (_ADR, 0x001F0000)  // _ADR: Address
               OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C)
  +            Device (TPM)
  +            {
  +                Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */)  // 
_HID: Hardware ID
  +                Name (_STR, "TPM 2.0 Device")  // _STR: Description String
  +                Name (_UID, One)  // _UID: Unique ID
  +                Name (_STA, 0x0F)  // _STA: Status
    ...
  +            }

  @@ -3281,189 +3464,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
               Method (PCNT, 0, NotSerialized)
               {
               }
  -
  -            Device (TPM)
  -            {
  -                Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */)  // 
_HID: Hardware ID
  -                Name (_STR, "TPM 2.0 Device")  // _STR: Description String
  -                Name (_UID, One)  // _UID: Unique ID
  -                Name (_STA, 0x0F)  // _STA: Status
    ...
  -            }

for tpm-tis 1.2:

  @@ -145,6 +145,188 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
           {
               Name (_ADR, 0x001F0000)  // _ADR: Address
               OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C)
  +            Device (TPM)
  +            {
  +                Name (_HID, EisaId ("PNP0C31"))  // _HID: Hardware ID
  +                Name (_UID, One)  // _UID: Unique ID
  +                Name (_STA, 0x0F)  // _STA: Status
    ...
  +            }

  @@ -3281,188 +3463,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
               Method (PCNT, 0, NotSerialized)
               {
               }
  -
  -            Device (ISA.TPM)
  -            {
  -                Name (_HID, EisaId ("PNP0C31"))  // _HID: Hardware ID
  -                Name (_UID, One)  // _UID: Unique ID
  -                Name (_STA, 0x0F)  // _STA: Status
    ...
  -            }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
Message-Id: <20220608135340.3304695-35-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 92344e76b867883a023b2b51123a1ca58c5bb714
      
https://github.com/qemu/qemu/commit/92344e76b867883a023b2b51123a1ca58c5bb714
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: acpi-build: do not include hw/isa/isa.h directly

the last remaining dependency on ISA in acpi-build.c
is iapc_boot_arch_8042() which pulls in in isa.h
in its own header hw/input/i8042.h. Clean up
not longer needed direct inclusion of isa.h in
acpi-build.c

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20220608135340.3304695-36-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 03b39fcf64bc958e3223e1d696f9de06de904fc6
      
https://github.com/qemu/qemu/commit/03b39fcf64bc958e3223e1d696f9de06de904fc6
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M docs/system/devices/cxl.rst
    M hw/core/machine.c
    M hw/cxl/cxl-host-stubs.c
    M hw/cxl/cxl-host.c
    M hw/i386/pc.c
    M hw/pci-bridge/pci_expander_bridge.c
    M include/hw/boards.h
    M include/hw/cxl/cxl.h
    A include/hw/cxl/cxl_host.h
    M qapi/machine.json
    M qemu-options.hx
    M softmmu/vl.c
    M tests/qtest/bios-tables-test.c
    M tests/qtest/cxl-test.c

  Log Message:
  -----------
  hw/cxl: Make the CXL fixed memory window setup a machine parameter.

Paolo Bonzini requested this change to simplify the ongoing
effort to allow machine setup entirely via RPC.

Includes shortening the command line form cxl-fixed-memory-window
to cxl-fmw as the command lines are extremely long even with this
change.

The json change is needed to ensure that there is
a CXLFixedMemoryWindowOptionsList even though the actual
element in the json is never used. Similar to existing
SgxEpcProperties.

Update qemu-options.hx to reflect that this is now a -machine
parameter.  The bulk of -M / -machine parameters are documented
under machine, so use that in preference to M.

Update cxl-test and bios-tables-test to reflect new parameters.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Message-Id: <20220608145440.26106-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 513598050ad12641b2dde6cf27471faca65be48f
      
https://github.com/qemu/qemu/commit/513598050ad12641b2dde6cf27471faca65be48f
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/cxl.c
    M hw/i386/acpi-build.c
    M include/hw/acpi/cxl.h

  Log Message:
  -----------
  hw/acpi/cxl: Pass in the CXLState directly rather than MachineState

Refactoring step on path to moving all CXL state out of
MachineState.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: dab390ff2454134486c934c8f2677f3ed7c8463c
      
https://github.com/qemu/qemu/commit/dab390ff2454134486c934c8f2677f3ed7c8463c
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/cxl/cxl-host-stubs.c
    M hw/cxl/cxl-host.c
    M hw/i386/pc.c
    M include/hw/cxl/cxl.h
    M include/hw/cxl/cxl_host.h
    M softmmu/vl.c

  Log Message:
  -----------
  hw/cxl: Push linking of CXL targets into i386/pc rather than in machine.c

Whilst here take the oportunity to shorten the function name.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 96f7da1711348758f9919ffdfe1e984012ef7acd
      
https://github.com/qemu/qemu/commit/96f7da1711348758f9919ffdfe1e984012ef7acd
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: Allow modification of q35 CXL CEDT table.

Needed to allow memory address changes as a result of next patch.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-5-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 7bd1900b365b5e7ae498cf9c915867fcaa5296fc
      
https://github.com/qemu/qemu/commit/7bd1900b365b5e7ae498cf9c915867fcaa5296fc
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/cxl/cxl-host-stubs.c
    M hw/cxl/cxl-host.c
    M hw/i386/pc.c
    M hw/pci-bridge/meson.build
    M hw/pci-bridge/pci_expander_bridge.c
    A hw/pci-bridge/pci_expander_bridge_stubs.c
    M include/hw/cxl/cxl_host.h
    A include/hw/pci-bridge/pci_expander_bridge.h

  Log Message:
  -----------
  pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup.

As the CXLState will no long be accessible via MachineState
at time of PXB_CXL realization, come back later from the machine specific
code to fill in the missing memory region setup. Only at this stage
is it possible to check if cxl=on, so that check is moved to this
later point.

Note that for multiple host bridges, the allocation order of the
register spaces is changed. This will be reflected in ACPI CEDT.

Stubs are added to handle case of CONFIG_PXB=n for machines that
call these functions.

The bus walking logic is common to all machines so add a utility
function + stub to cxl-host*.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-6-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3546b0529a5799d1a13397fa3586711b3da52190
      
https://github.com/qemu/qemu/commit/3546b0529a5799d1a13397fa3586711b3da52190
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/CEDT.cxl
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: Update q35/CEDT.cxl for new memory addresses.

The CEDT table includes addreses of host bridge registers.
There are allocated in a different order due to the previous
patch, so update to the table is needed.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-7-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1ebf9001fb2701e3c00b401334c8f3900a46adaa
      
https://github.com/qemu/qemu/commit/1ebf9001fb2701e3c00b401334c8f3900a46adaa
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/core/machine.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M include/hw/boards.h
    M include/hw/i386/pc.h

  Log Message:
  -----------
  hw/cxl: Move the CXLState from MachineState to machine type specific state.

This removes the last of the CXL code from the MachineState where it
is visible to all Machines to only those that support CXL (currently i386/pc)
As i386/pc always support CXL now, stop allocating the state independently.

Note the pxb register hookup code runs even if cxl=off in order to detect
pxb_cxl host bridges and fail to start if any are present as they won't
have the control registers available.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-8-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 518f5f6ad6edfb17a35cc13368c4c5205fe75839
      
https://github.com/qemu/qemu/commit/518f5f6ad6edfb17a35cc13368c4c5205fe75839
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/i386/pc.c
    M include/hw/boards.h

  Log Message:
  -----------
  hw/machine: Drop cxl_supported flag as no longer useful

As all the CXL elements have moved to boards that support
CXL, there is no need to maintain a top level flag.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608145440.26106-9-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 36f18c6989a3d1ff1d7a0e50b0868ef3958299b4
      
https://github.com/qemu/qemu/commit/36f18c6989a3d1ff1d7a0e50b0868ef3958299b4
  Author: Claudio Fontana <cfontana@suse.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  pci: fix overflow in snprintf string formatting

the code in pcibus_get_fw_dev_path contained the potential for a
stack buffer overflow of 1 byte, potentially writing to the stack an
extra NUL byte.

This overflow could happen if the PCI slot is >= 0x10000000,
and the PCI function is >= 0x10000000, due to the size parameter
of snprintf being incorrectly calculated in the call:

    if (PCI_FUNC(d->devfn))
        snprintf(path + off, sizeof(path) + off, ",%x", PCI_FUNC(d->devfn));

since the off obtained from a previous call to snprintf is added
instead of subtracted from the total available size of the buffer.

Without the accurate size guard from snprintf, we end up writing in the
worst case:

name (32) + "@" (1) + SLOT (8) + "," (1) + FUNC (8) + term NUL (1) = 51 bytes

In order to provide something more robust, replace all of the code in
pcibus_get_fw_dev_path with a single call to g_strdup_printf,
so there is no need to rely on manual calculations.

Found by compiling QEMU with FORTIFY_SOURCE=3 as the error:

*** buffer overflow detected ***: terminated

Thread 1 "qemu-system-x86" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff642c380 (LWP 121307)]
0x00007ffff71ff55c in __pthread_kill_implementation () from /lib64/libc.so.6
(gdb) bt
 #0  0x00007ffff71ff55c in __pthread_kill_implementation () at /lib64/libc.so.6
 #1  0x00007ffff71ac6f6 in raise () at /lib64/libc.so.6
 #2  0x00007ffff7195814 in abort () at /lib64/libc.so.6
 #3  0x00007ffff71f279e in __libc_message () at /lib64/libc.so.6
 #4  0x00007ffff729767a in __fortify_fail () at /lib64/libc.so.6
 #5  0x00007ffff7295c36 in  () at /lib64/libc.so.6
 #6  0x00007ffff72957f5 in __snprintf_chk () at /lib64/libc.so.6
 #7  0x0000555555b1c1fd in pcibus_get_fw_dev_path ()
 #8  0x0000555555f2bde4 in qdev_get_fw_dev_path_helper.constprop ()
 #9  0x0000555555f2bd86 in qdev_get_fw_dev_path_helper.constprop ()
 #10 0x00005555559a6e5d in get_boot_device_path ()
 #11 0x00005555559a712c in get_boot_devices_list ()
 #12 0x0000555555b1a3d0 in fw_cfg_machine_reset ()
 #13 0x0000555555bf4c2d in pc_machine_reset ()
 #14 0x0000555555c66988 in qemu_system_reset ()
 #15 0x0000555555a6dff6 in qdev_machine_creation_done ()
 #16 0x0000555555c79186 in qmp_x_exit_preconfig.part ()
 #17 0x0000555555c7b459 in qemu_init ()
 #18 0x0000555555960a29 in main ()

Found-by: Dario Faggioli <Dario Faggioli <dfaggioli@suse.com>
Found-by: Martin Liška <martin.liska@suse.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20220531114707.18830-1-cfontana@suse.de>
Reviewed-by: Ani Sinha <ani@anisinha.ca>


  Commit: f824f5294711ffc17c642dff3d898043d420d336
      
https://github.com/qemu/qemu/commit/f824f5294711ffc17c642dff3d898043d420d336
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/cxl/cxl-component-utils.c

  Log Message:
  -----------
  hw/cxl: Fix missing write mask for HDM decoder target list registers

Without being able to write these registers, no interleaving is possible.
More refined checks of HDM register state on commit to follow.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Message-Id: <20220608130804.25795-1-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 6164a1110448d4e2e13963b69093950acdd2348c
      
https://github.com/qemu/qemu/commit/6164a1110448d4e2e13963b69093950acdd2348c
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/viot.c

  Log Message:
  -----------
  hw/acpi/viot: rename build_pci_range_node() to enumerate_pci_host_bridges()

This is in preparation for separating out the VIOT ACPI table build from the
PCI host bridge numeration.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-2-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1b805ab560d3c020377680742ae2a49c7eb417d0
      
https://github.com/qemu/qemu/commit/1b805ab560d3c020377680742ae2a49c7eb417d0
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/viot.c

  Log Message:
  -----------
  hw/acpi/viot: move the individual PCI host bridge entry generation to a new 
function

Instead of generating each table entry inline, move the individual PCI host 
bridge
table entry generation to a separate build_pci_host_range() function.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-3-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e5f73c8397dddef8fc4b2fca76ffc153070a5db1
      
https://github.com/qemu/qemu/commit/e5f73c8397dddef8fc4b2fca76ffc153070a5db1
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/viot.c

  Log Message:
  -----------
  hw/acpi/viot: build array of PCI host bridges before generating VIOT ACPI 
table

Perform the generation of the VIOT ACPI table in 2 separate passes: the first 
pass
enumerates all of the PCI host bridges and adds the min_bus and max_bus 
information
to an array.

Once this is done the VIOT table header is generated using the size of the array
to calculate the node count, which means it is no longer necessary to use a
sub-array to hold the PCI host bridge range information along with viommu_off.

Finally the PCI host bridge array is iterated again to add the required entries
to the final VIOT ACPI table.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-4-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4c8f2ffff1bffcf4649c5373a50f2475c598eb0e
      
https://github.com/qemu/qemu/commit/4c8f2ffff1bffcf4649c5373a50f2475c598eb0e
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: virt: allow VIOT acpi table changes

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-5-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 68f14a87291343bcec2bfcec7fdc0c8a3c01f66c
      
https://github.com/qemu/qemu/commit/68f14a87291343bcec2bfcec7fdc0c8a3c01f66c
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/acpi/viot.c

  Log Message:
  -----------
  hw/acpi/viot: sort VIOT ACPI table entries by PCI host bridge min_bus

This ensures that the VIOT ACPI table output is always stable for a given PCI
topology by ensuring that entries are ordered according to min_bus.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-6-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5060004c303ce564e6ddb87d8255b7741870f9d6
      
https://github.com/qemu/qemu/commit/5060004c303ce564e6ddb87d8255b7741870f9d6
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M tests/data/acpi/q35/VIOT.viot
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: virt: update golden masters for VIOT

Differences between disassembled ASL files for VIOT:

+++ /tmp/asl-V69GM1.dsl 2022-05-18 10:22:27.239796759 +0100
@@ -36,11 +36,11 @@
 [041h 0065   1]                     Reserved : 00
 [042h 0066   2]                       Length : 0018

-[044h 0068   4]               Endpoint start : 00003000
+[044h 0068   4]               Endpoint start : 00001000
 [048h 0072   2]            PCI Segment start : 0000
 [04Ah 0074   2]              PCI Segment end : 0000
-[04Ch 0076   2]                PCI BDF start : 3000
-[04Eh 0078   2]                  PCI BDF end : 30FF
+[04Ch 0076   2]                PCI BDF start : 1000
+[04Eh 0078   2]                  PCI BDF end : 10FF
 [050h 0080   2]                  Output node : 0030
 [052h 0082   6]                     Reserved : 000000000000

@@ -48,11 +48,11 @@
 [059h 0089   1]                     Reserved : 00
 [05Ah 0090   2]                       Length : 0018

-[05Ch 0092   4]               Endpoint start : 00001000
+[05Ch 0092   4]               Endpoint start : 00003000
 [060h 0096   2]            PCI Segment start : 0000
 [062h 0098   2]              PCI Segment end : 0000
-[064h 0100   2]                PCI BDF start : 1000
-[066h 0102   2]                  PCI BDF end : 10FF
+[064h 0100   2]                PCI BDF start : 3000
+[066h 0102   2]                  PCI BDF end : 30FF
 [068h 0104   2]                  Output node : 0030
 [06Ah 0106   6]                     Reserved : 000000000000

@@ -62,6 +62,6 @@
     0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    ....BXPC
     0020: 01 00 00 00 03 00 30 00 00 00 00 00 00 00 00 00  // ......0.........
     0030: 03 00 10 00 00 00 10 00 00 00 00 00 00 00 00 00  // ................
-    0040: 01 00 18 00 00 30 00 00 00 00 00 00 00 30 FF 30  // .....0.......0.0
-    0050: 30 00 00 00 00 00 00 00 01 00 18 00 00 10 00 00  // 0...............
-    0060: 00 00 00 00 00 10 FF 10 30 00 00 00 00 00 00 00  // ........0.......
+    0040: 01 00 18 00 00 10 00 00 00 00 00 00 00 10 FF 10  // ................
+    0050: 30 00 00 00 00 00 00 00 01 00 18 00 00 30 00 00  // 0............0..
+    0060: 00 00 00 00 00 30 FF 30 30 00 00 00 00 00 00 00  // .....0.00.......

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220525173232.31429-7-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: fb38d0c97dd665f7e0c1cb8176090500ce2275e1
      
https://github.com/qemu/qemu/commit/fb38d0c97dd665f7e0c1cb8176090500ce2275e1
  Author: Changpeng Liu <changpeng.liu@intel.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio/vhost-user: don't use uninitialized variable

Variable `vdev` in `struct vhost_dev` will not be ready
until start the device, so let's not use it for the error
output here.

Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when supported")

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Message-Id: <20220525125540.50979-1-changpeng.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when supported")
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when supported")
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>


  Commit: 06cb5c82ebf5fd0f7b3c3de24d650e1259ca6ce4
      
https://github.com/qemu/qemu/commit/06cb5c82ebf5fd0f7b3c3de24d650e1259ca6ce4
  Author: Changpeng Liu <changpeng.liu@intel.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M hw/block/vhost-user-blk.c
    M hw/scsi/vhost-user-scsi.c

  Log Message:
  -----------
  hw/vhost-user-scsi|blk: set `supports_config` flag correctly

Currently vhost-user-scsi driver doesn't allow to change
the configuration space of virtio_scsi, while vhost-user-blk
support that, so here we set the flag in vhost-user-blk driver
and unset it in vhost-user-scsi.

Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Message-Id: <20220525125540.50979-2-changpeng.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>


  Commit: 397c2901bfd9ee531243b38b6a318edccb88ed65
      
https://github.com/qemu/qemu/commit/397c2901bfd9ee531243b38b6a318edccb88ed65
  Author: zhenwei pi <pizhenwei@bytedance.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M backends/cryptodev-builtin.c
    M backends/cryptodev-vhost-user.c
    M backends/cryptodev.c
    M hw/virtio/virtio-crypto.c
    M include/hw/virtio/virtio-crypto.h
    M include/sysemu/cryptodev.h

  Log Message:
  -----------
  crypto: Introduce RSA algorithm

There are two parts in this patch:
1, support akcipher service by cryptodev-builtin driver
2, virtio-crypto driver supports akcipher service

In principle, we should separate this into two patches, to avoid
compiling error, merge them into one.

Then virtio-crypto gets request from guest side, and forwards the
request to builtin driver to handle it.

Test with a guest linux:
1, The self-test framework of crypto layer works fine in guest kernel
2, Test with Linux guest(with asym support), the following script
test(note that pkey_XXX is supported only in a newer version of keyutils):
  - both public key & private key
  - create/close session
  - encrypt/decrypt/sign/verify basic driver operation
  - also test with kernel crypto layer(pkey add/query)

All the cases work fine.

Run script in guest:
rm -rf *.der *.pem *.pfx
modprobe pkcs8_key_parser # if CONFIG_PKCS8_PRIVATE_KEY_PARSER=m
rm -rf /tmp/data
dd if=/dev/random of=/tmp/data count=1 bs=20

openssl req -nodes -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -subj 
"/C=CN/ST=BJ/L=HD/O=qemu/OU=dev/CN=qemu/emailAddress=qemu@qemu.org"
openssl pkcs8 -in key.pem -topk8 -nocrypt -outform DER -out key.der
openssl x509 -in cert.pem -inform PEM -outform DER -out cert.der

PRIV_KEY_ID=`cat key.der | keyctl padd asymmetric test_priv_key @s`
echo "priv key id = "$PRIV_KEY_ID
PUB_KEY_ID=`cat cert.der | keyctl padd asymmetric test_pub_key @s`
echo "pub key id = "$PUB_KEY_ID

keyctl pkey_query $PRIV_KEY_ID 0
keyctl pkey_query $PUB_KEY_ID 0

echo "Enc with priv key..."
keyctl pkey_encrypt $PRIV_KEY_ID 0 /tmp/data enc=pkcs1 >/tmp/enc.priv
echo "Dec with pub key..."
keyctl pkey_decrypt $PRIV_KEY_ID 0 /tmp/enc.priv enc=pkcs1 >/tmp/dec
cmp /tmp/data /tmp/dec

echo "Sign with priv key..."
keyctl pkey_sign $PRIV_KEY_ID 0 /tmp/data enc=pkcs1 hash=sha1 > /tmp/sig
echo "Verify with pub key..."
keyctl pkey_verify $PRIV_KEY_ID 0 /tmp/data /tmp/sig enc=pkcs1 hash=sha1

echo "Enc with pub key..."
keyctl pkey_encrypt $PUB_KEY_ID 0 /tmp/data enc=pkcs1 >/tmp/enc.pub
echo "Dec with priv key..."
keyctl pkey_decrypt $PRIV_KEY_ID 0 /tmp/enc.pub enc=pkcs1 >/tmp/dec
cmp /tmp/data /tmp/dec

echo "Verify with pub key..."
keyctl pkey_verify $PUB_KEY_ID 0 /tmp/data /tmp/sig enc=pkcs1 hash=sha1

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: lei he <helei.sig11@bytedance.com
Message-Id: <20220527084734.2649594-2-pizhenwei@bytedance.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ffa1deeca3ff8db389a6ef781936fc922625cdc1
      
https://github.com/qemu/qemu/commit/ffa1deeca3ff8db389a6ef781936fc922625cdc1
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-06-10 (Fri, 10 Jun 2022)

  Changed paths:
    M backends/cryptodev-builtin.c
    M backends/cryptodev-vhost-user.c
    M backends/cryptodev.c
    M docs/system/devices/cxl.rst
    M hw/acpi/acpi_interface.c
    M hw/acpi/cxl.c
    M hw/acpi/ipmi-stub.c
    M hw/acpi/ipmi.c
    M hw/acpi/meson.build
    M hw/acpi/viot.c
    M hw/block/fdc-isa.c
    M hw/block/vhost-user-blk.c
    M hw/char/parallel.c
    M hw/char/serial-isa.c
    M hw/core/machine.c
    M hw/cxl/cxl-component-utils.c
    M hw/cxl/cxl-host-stubs.c
    M hw/cxl/cxl-host.c
    M hw/i2c/smbus_ich9.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/input/pckbd.c
    M hw/ipmi/isa_ipmi_bt.c
    M hw/ipmi/isa_ipmi_kcs.c
    M hw/ipmi/smbus_ipmi.c
    M hw/isa/isa-bus.c
    M hw/isa/lpc_ich9.c
    M hw/isa/piix3.c
    M hw/misc/applesmc.c
    M hw/misc/pvpanic-isa.c
    M hw/pci-bridge/meson.build
    M hw/pci-bridge/pci_expander_bridge.c
    A hw/pci-bridge/pci_expander_bridge_stubs.c
    M hw/pci/pci.c
    M hw/rtc/mc146818rtc.c
    M hw/scsi/vhost-user-scsi.c
    M hw/tpm/tpm_tis_isa.c
    M hw/virtio/vhost-user.c
    M hw/virtio/virtio-crypto.c
    A include/hw/acpi/acpi_aml_interface.h
    M include/hw/acpi/cxl.h
    M include/hw/acpi/ipmi.h
    M include/hw/boards.h
    M include/hw/cxl/cxl.h
    A include/hw/cxl/cxl_host.h
    M include/hw/i386/pc.h
    M include/hw/isa/isa.h
    M include/hw/misc/pvpanic.h
    A include/hw/pci-bridge/pci_expander_bridge.h
    M include/hw/virtio/virtio-crypto.h
    M include/sysemu/cryptodev.h
    M qapi/machine.json
    M qemu-options.hx
    M softmmu/vl.c
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.hpbrroot
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/CEDT.cxl
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpierst
    M tests/data/acpi/q35/DSDT.acpihmat
    A tests/data/acpi/q35/DSDT.applesmc
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.cxl
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    A tests/data/acpi/q35/DSDT.ipmismbus
    M tests/data/acpi/q35/DSDT.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    A tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.viot
    M tests/data/acpi/q35/DSDT.xapic
    M tests/data/acpi/q35/VIOT.viot
    M tests/qtest/bios-tables-test.c
    M tests/qtest/cxl-test.c

  Log Message:
  -----------
  Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu 
into staging

virtio,pc,pci: fixes,cleanups,features

more CXL patches
VIOT
Igor's huge AML rework
fixes, cleanups all over the place

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmKi2rEPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpnaIIAJv5EIfcRVtbRayEulvKSX4aXYYJomL2jEKH
# AzkuuBrVcT582KTRXxIhaYeiuJg7Vl4Ekdt1wjOG9NyUCyJIyPTNkiMXhB9P3kDk
# s2xAVvHP3v7dOyd/yETV7JBEh/hti3vn85R0819n05qUF2LVfJdUP4kjBFOM/vg7
# I8UPHzTzamKm7fZLGJh4JLuetsAlke46ZuE0R6nnxJe9OjQb/mqLZ83WZtKx/a3s
# pqTy3/A1JnLkgT+5N7BgCZXrNxtMPhgZ3USIspHKY8mFdq5uJrXsZzRQ+RV8FRUG
# zgJl2DpgIHyXydf2tbAbiRiEAXODQbuh+VJtGsp9q8tm/9S1BGg=
# =94ae
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 09 Jun 2022 10:46:25 PM PDT
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (54 
commits)
  crypto: Introduce RSA algorithm
  hw/vhost-user-scsi|blk: set `supports_config` flag correctly
  hw/virtio/vhost-user: don't use uninitialized variable
  tests/acpi: virt: update golden masters for VIOT
  hw/acpi/viot: sort VIOT ACPI table entries by PCI host bridge min_bus
  tests/acpi: virt: allow VIOT acpi table changes
  hw/acpi/viot: build array of PCI host bridges before generating VIOT ACPI 
table
  hw/acpi/viot: move the individual PCI host bridge entry generation to a new 
function
  hw/acpi/viot: rename build_pci_range_node() to enumerate_pci_host_bridges()
  hw/cxl: Fix missing write mask for HDM decoder target list registers
  pci: fix overflow in snprintf string formatting
  hw/machine: Drop cxl_supported flag as no longer useful
  hw/cxl: Move the CXLState from MachineState to machine type specific state.
  tests/acpi: Update q35/CEDT.cxl for new memory addresses.
  pci/pci_expander_bridge: For CXL HB delay the HB register memory region setup.
  tests/acpi: Allow modification of q35 CXL CEDT table.
  hw/cxl: Push linking of CXL targets into i386/pc rather than in machine.c
  hw/acpi/cxl: Pass in the CXLState directly rather than MachineState
  hw/cxl: Make the CXL fixed memory window setup a machine parameter.
  x86: acpi-build: do not include hw/isa/isa.h directly
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/b3cd3b5a66f0...ffa1deeca3ff



reply via email to

[Prev in Thread] Current Thread [Next in Thread]