[PATCH for 6.2 v2 0/5] Fix Q35 ACPI PCI Hot-plug I/O issues

Igor Mammedov posted 5 patches 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211110211140.3057199-1-imammedo@redhat.com
Maintainers: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Igor Mammedov <imammedo@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Ani Sinha <ani@anisinha.ca>, Eduardo Habkost <ehabkost@redhat.com>
There is a newer version of this series
include/hw/acpi/ich9.h                    |   1 +
hw/acpi/ich9.c                            |  18 ++++++++++++++++++
hw/i386/acpi-build.c                      |  12 ++++++++----
hw/i386/pc.c                              |   2 ++
hw/i386/pc_q35.c                          |   9 +++++++--
hw/pci/pcie_port.c                        |   2 +-
tests/data/acpi/q35/DSDT                  | Bin 8289 -> 8289 bytes
tests/data/acpi/q35/DSDT.acpihmat         | Bin 9614 -> 9614 bytes
tests/data/acpi/q35/DSDT.bridge           | Bin 11003 -> 11003 bytes
tests/data/acpi/q35/DSDT.cphp             | Bin 8753 -> 8753 bytes
tests/data/acpi/q35/DSDT.dimmpxm          | Bin 9943 -> 9943 bytes
tests/data/acpi/q35/DSDT.dmar             | Bin 0 -> 8289 bytes
tests/data/acpi/q35/DSDT.ipmibt           | Bin 8364 -> 8364 bytes
tests/data/acpi/q35/DSDT.ivrs             | Bin 8306 -> 8306 bytes
tests/data/acpi/q35/DSDT.memhp            | Bin 9648 -> 9648 bytes
tests/data/acpi/q35/DSDT.mmio64           | Bin 9419 -> 9419 bytes
tests/data/acpi/q35/DSDT.multi-bridge     | Bin 8583 -> 8583 bytes
tests/data/acpi/q35/DSDT.nohpet           | Bin 8147 -> 8147 bytes
tests/data/acpi/q35/DSDT.nosmm            | Bin 0 -> 8289 bytes
tests/data/acpi/q35/DSDT.numamem          | Bin 8295 -> 8295 bytes
tests/data/acpi/q35/DSDT.smm-compat       | Bin 0 -> 8289 bytes
tests/data/acpi/q35/DSDT.smm-compat-nosmm | Bin 0 -> 8289 bytes
tests/data/acpi/q35/DSDT.tis.tpm12        | Bin 8894 -> 8894 bytes
tests/data/acpi/q35/DSDT.tis.tpm2         | Bin 8894 -> 8894 bytes
tests/data/acpi/q35/DSDT.xapic            | Bin 35652 -> 35652 bytes
25 files changed, 37 insertions(+), 7 deletions(-)
create mode 100644 tests/data/acpi/q35/DSDT.dmar
create mode 100644 tests/data/acpi/q35/DSDT.nosmm
create mode 100644 tests/data/acpi/q35/DSDT.smm-compat
create mode 100644 tests/data/acpi/q35/DSDT.smm-compat-nosmm
[PATCH for 6.2 v2 0/5] Fix Q35 ACPI PCI Hot-plug I/O issues
Posted by Igor Mammedov 2 years, 6 months ago
Changelog:
  v2:
    * simplify [1/5] and rename property to x-native-hotplug (CC stable)
    * [4/5]
       - rename function parameter to reflect actual action
       - drop local 'hotplug' variable and opencode statement 
    * test with SeaBIOS/OVMF and Linux guest,
      Windows also works with SeaBIOS, can't install it in EFI
      mode on current master (it's stuck when formatting disk/or
      copying files to hdd).

Attempt [1] to fix I/O allocation with the 'reserve-io' hint on each
pcie-root-port resulted in regression [2-3]. This patchset aims to fix
it by addressing the root cause of the problem - the disabled PCIe
Slot HPC bit.

[1] 'hw/pcie-root-port: Fix hotplug for PCI devices requiring IO'
[2] https://gitlab.com/qemu-project/qemu/-/issues/641
[3] https://bugzilla.redhat.com/show_bug.cgi?id=2006409

CC: kraxel@redhat.com

Igor Mammedov (1):
  pcie: rename 'native-hotplug' to 'x-native-hotplug'

Julia Suvorova (4):
  hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type
  bios-tables-test: Allow changes in DSDT ACPI tables
  hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC
  bios-tables-test: Update golden binaries

 include/hw/acpi/ich9.h                    |   1 +
 hw/acpi/ich9.c                            |  18 ++++++++++++++++++
 hw/i386/acpi-build.c                      |  12 ++++++++----
 hw/i386/pc.c                              |   2 ++
 hw/i386/pc_q35.c                          |   9 +++++++--
 hw/pci/pcie_port.c                        |   2 +-
 tests/data/acpi/q35/DSDT                  | Bin 8289 -> 8289 bytes
 tests/data/acpi/q35/DSDT.acpihmat         | Bin 9614 -> 9614 bytes
 tests/data/acpi/q35/DSDT.bridge           | Bin 11003 -> 11003 bytes
 tests/data/acpi/q35/DSDT.cphp             | Bin 8753 -> 8753 bytes
 tests/data/acpi/q35/DSDT.dimmpxm          | Bin 9943 -> 9943 bytes
 tests/data/acpi/q35/DSDT.dmar             | Bin 0 -> 8289 bytes
 tests/data/acpi/q35/DSDT.ipmibt           | Bin 8364 -> 8364 bytes
 tests/data/acpi/q35/DSDT.ivrs             | Bin 8306 -> 8306 bytes
 tests/data/acpi/q35/DSDT.memhp            | Bin 9648 -> 9648 bytes
 tests/data/acpi/q35/DSDT.mmio64           | Bin 9419 -> 9419 bytes
 tests/data/acpi/q35/DSDT.multi-bridge     | Bin 8583 -> 8583 bytes
 tests/data/acpi/q35/DSDT.nohpet           | Bin 8147 -> 8147 bytes
 tests/data/acpi/q35/DSDT.nosmm            | Bin 0 -> 8289 bytes
 tests/data/acpi/q35/DSDT.numamem          | Bin 8295 -> 8295 bytes
 tests/data/acpi/q35/DSDT.smm-compat       | Bin 0 -> 8289 bytes
 tests/data/acpi/q35/DSDT.smm-compat-nosmm | Bin 0 -> 8289 bytes
 tests/data/acpi/q35/DSDT.tis.tpm12        | Bin 8894 -> 8894 bytes
 tests/data/acpi/q35/DSDT.tis.tpm2         | Bin 8894 -> 8894 bytes
 tests/data/acpi/q35/DSDT.xapic            | Bin 35652 -> 35652 bytes
 25 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 tests/data/acpi/q35/DSDT.dmar
 create mode 100644 tests/data/acpi/q35/DSDT.nosmm
 create mode 100644 tests/data/acpi/q35/DSDT.smm-compat
 create mode 100644 tests/data/acpi/q35/DSDT.smm-compat-nosmm

-- 
2.27.0


Re: [PATCH for 6.2 v2 0/5] Fix Q35 ACPI PCI Hot-plug I/O issues
Posted by Michael S. Tsirkin 2 years, 6 months ago
On Wed, Nov 10, 2021 at 04:11:35PM -0500, Igor Mammedov wrote:
> Changelog:
>   v2:
>     * simplify [1/5] and rename property to x-native-hotplug (CC stable)
>     * [4/5]
>        - rename function parameter to reflect actual action
>        - drop local 'hotplug' variable and opencode statement 
>     * test with SeaBIOS/OVMF and Linux guest,
>       Windows also works with SeaBIOS, can't install it in EFI
>       mode on current master (it's stuck when formatting disk/or
>       copying files to hdd).
> 
> Attempt [1] to fix I/O allocation with the 'reserve-io' hint on each
> pcie-root-port resulted in regression [2-3]. This patchset aims to fix
> it by addressing the root cause of the problem - the disabled PCIe
> Slot HPC bit.
> 
> [1] 'hw/pcie-root-port: Fix hotplug for PCI devices requiring IO'
> [2] https://gitlab.com/qemu-project/qemu/-/issues/641
> [3] https://bugzilla.redhat.com/show_bug.cgi?id=2006409
> 
> CC: kraxel@redhat.com

Igor are you going to post v3 with a fixup of the expected tables?
Thanks!

> Igor Mammedov (1):
>   pcie: rename 'native-hotplug' to 'x-native-hotplug'
> 
> Julia Suvorova (4):
>   hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type
>   bios-tables-test: Allow changes in DSDT ACPI tables
>   hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC
>   bios-tables-test: Update golden binaries
> 
>  include/hw/acpi/ich9.h                    |   1 +
>  hw/acpi/ich9.c                            |  18 ++++++++++++++++++
>  hw/i386/acpi-build.c                      |  12 ++++++++----
>  hw/i386/pc.c                              |   2 ++
>  hw/i386/pc_q35.c                          |   9 +++++++--
>  hw/pci/pcie_port.c                        |   2 +-
>  tests/data/acpi/q35/DSDT                  | Bin 8289 -> 8289 bytes
>  tests/data/acpi/q35/DSDT.acpihmat         | Bin 9614 -> 9614 bytes
>  tests/data/acpi/q35/DSDT.bridge           | Bin 11003 -> 11003 bytes
>  tests/data/acpi/q35/DSDT.cphp             | Bin 8753 -> 8753 bytes
>  tests/data/acpi/q35/DSDT.dimmpxm          | Bin 9943 -> 9943 bytes
>  tests/data/acpi/q35/DSDT.dmar             | Bin 0 -> 8289 bytes
>  tests/data/acpi/q35/DSDT.ipmibt           | Bin 8364 -> 8364 bytes
>  tests/data/acpi/q35/DSDT.ivrs             | Bin 8306 -> 8306 bytes
>  tests/data/acpi/q35/DSDT.memhp            | Bin 9648 -> 9648 bytes
>  tests/data/acpi/q35/DSDT.mmio64           | Bin 9419 -> 9419 bytes
>  tests/data/acpi/q35/DSDT.multi-bridge     | Bin 8583 -> 8583 bytes
>  tests/data/acpi/q35/DSDT.nohpet           | Bin 8147 -> 8147 bytes
>  tests/data/acpi/q35/DSDT.nosmm            | Bin 0 -> 8289 bytes
>  tests/data/acpi/q35/DSDT.numamem          | Bin 8295 -> 8295 bytes
>  tests/data/acpi/q35/DSDT.smm-compat       | Bin 0 -> 8289 bytes
>  tests/data/acpi/q35/DSDT.smm-compat-nosmm | Bin 0 -> 8289 bytes
>  tests/data/acpi/q35/DSDT.tis.tpm12        | Bin 8894 -> 8894 bytes
>  tests/data/acpi/q35/DSDT.tis.tpm2         | Bin 8894 -> 8894 bytes
>  tests/data/acpi/q35/DSDT.xapic            | Bin 35652 -> 35652 bytes
>  25 files changed, 37 insertions(+), 7 deletions(-)
>  create mode 100644 tests/data/acpi/q35/DSDT.dmar
>  create mode 100644 tests/data/acpi/q35/DSDT.nosmm
>  create mode 100644 tests/data/acpi/q35/DSDT.smm-compat
>  create mode 100644 tests/data/acpi/q35/DSDT.smm-compat-nosmm
> 
> -- 
> 2.27.0


Re: [PATCH for 6.2 v2 0/5] Fix Q35 ACPI PCI Hot-plug I/O issues
Posted by Igor Mammedov 2 years, 6 months ago
On Fri, 12 Nov 2021 04:47:05 -0500
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Wed, Nov 10, 2021 at 04:11:35PM -0500, Igor Mammedov wrote:
> > Changelog:
> >   v2:
> >     * simplify [1/5] and rename property to x-native-hotplug (CC stable)
> >     * [4/5]
> >        - rename function parameter to reflect actual action
> >        - drop local 'hotplug' variable and opencode statement 
> >     * test with SeaBIOS/OVMF and Linux guest,
> >       Windows also works with SeaBIOS, can't install it in EFI
> >       mode on current master (it's stuck when formatting disk/or
> >       copying files to hdd).
> > 
> > Attempt [1] to fix I/O allocation with the 'reserve-io' hint on each
> > pcie-root-port resulted in regression [2-3]. This patchset aims to fix
> > it by addressing the root cause of the problem - the disabled PCIe
> > Slot HPC bit.
> > 
> > [1] 'hw/pcie-root-port: Fix hotplug for PCI devices requiring IO'
> > [2] https://gitlab.com/qemu-project/qemu/-/issues/641
> > [3] https://bugzilla.redhat.com/show_bug.cgi?id=2006409
> > 
> > CC: kraxel@redhat.com  
> 
> Igor are you going to post v3 with a fixup of the expected tables?
> Thanks!

I'll post in a short while,
it seems going ahead with this is less risky as it resolves remaining
issues (hotplug with edk2 and seabios boot loop) than just
reverting to native and bringing back old issues.

> > Igor Mammedov (1):
> >   pcie: rename 'native-hotplug' to 'x-native-hotplug'
> > 
> > Julia Suvorova (4):
> >   hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type
> >   bios-tables-test: Allow changes in DSDT ACPI tables
> >   hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC
> >   bios-tables-test: Update golden binaries
> > 
> >  include/hw/acpi/ich9.h                    |   1 +
> >  hw/acpi/ich9.c                            |  18 ++++++++++++++++++
> >  hw/i386/acpi-build.c                      |  12 ++++++++----
> >  hw/i386/pc.c                              |   2 ++
> >  hw/i386/pc_q35.c                          |   9 +++++++--
> >  hw/pci/pcie_port.c                        |   2 +-
> >  tests/data/acpi/q35/DSDT                  | Bin 8289 -> 8289 bytes
> >  tests/data/acpi/q35/DSDT.acpihmat         | Bin 9614 -> 9614 bytes
> >  tests/data/acpi/q35/DSDT.bridge           | Bin 11003 -> 11003 bytes
> >  tests/data/acpi/q35/DSDT.cphp             | Bin 8753 -> 8753 bytes
> >  tests/data/acpi/q35/DSDT.dimmpxm          | Bin 9943 -> 9943 bytes
> >  tests/data/acpi/q35/DSDT.dmar             | Bin 0 -> 8289 bytes
> >  tests/data/acpi/q35/DSDT.ipmibt           | Bin 8364 -> 8364 bytes
> >  tests/data/acpi/q35/DSDT.ivrs             | Bin 8306 -> 8306 bytes
> >  tests/data/acpi/q35/DSDT.memhp            | Bin 9648 -> 9648 bytes
> >  tests/data/acpi/q35/DSDT.mmio64           | Bin 9419 -> 9419 bytes
> >  tests/data/acpi/q35/DSDT.multi-bridge     | Bin 8583 -> 8583 bytes
> >  tests/data/acpi/q35/DSDT.nohpet           | Bin 8147 -> 8147 bytes
> >  tests/data/acpi/q35/DSDT.nosmm            | Bin 0 -> 8289 bytes
> >  tests/data/acpi/q35/DSDT.numamem          | Bin 8295 -> 8295 bytes
> >  tests/data/acpi/q35/DSDT.smm-compat       | Bin 0 -> 8289 bytes
> >  tests/data/acpi/q35/DSDT.smm-compat-nosmm | Bin 0 -> 8289 bytes
> >  tests/data/acpi/q35/DSDT.tis.tpm12        | Bin 8894 -> 8894 bytes
> >  tests/data/acpi/q35/DSDT.tis.tpm2         | Bin 8894 -> 8894 bytes
> >  tests/data/acpi/q35/DSDT.xapic            | Bin 35652 -> 35652 bytes
> >  25 files changed, 37 insertions(+), 7 deletions(-)
> >  create mode 100644 tests/data/acpi/q35/DSDT.dmar
> >  create mode 100644 tests/data/acpi/q35/DSDT.nosmm
> >  create mode 100644 tests/data/acpi/q35/DSDT.smm-compat
> >  create mode 100644 tests/data/acpi/q35/DSDT.smm-compat-nosmm
> > 
> > -- 
> > 2.27.0  
>