[PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35

Ani Sinha posted 3 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/20211007135750.1277213-1-ani@anisinha.ca
Maintainers: Igor Mammedov <imammedo@redhat.com>, Ani Sinha <ani@anisinha.ca>, "Michael S. Tsirkin" <mst@redhat.com>
tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
2 files changed, 18 insertions(+)
create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge
[PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Ani Sinha 2 years, 6 months ago
changelist:
v3: removed "nodefaults" from the command line and rebased the patchset.
v2: incorporated some of the feedbacks from Igor.
v1 : initial RFC patch.

This patchset adds a unit test to exercize acpi hotplug support for multifunction
bridges on q35 machines. This support was added with the commit:

d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction bridges")

Ani Sinha (3):
  tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT
    table blob
  tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges
    for q35
  tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge
    test

 tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
 tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge

-- 
2.25.1


Re: [PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Michael S. Tsirkin 2 years, 6 months ago
On Thu, Oct 07, 2021 at 07:27:47PM +0530, Ani Sinha wrote:
> changelist:
> v3: removed "nodefaults" from the command line and rebased the patchset.
> v2: incorporated some of the feedbacks from Igor.
> v1 : initial RFC patch.

This seems to break on s390 hosts for people. Likely an
endian-ness bug somewhere. Dropped for now - care tracking that down
and fixing so I can pick up the test again?

Thanks!

> This patchset adds a unit test to exercize acpi hotplug support for multifunction
> bridges on q35 machines. This support was added with the commit:
> 
> d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction bridges")
> 
> Ani Sinha (3):
>   tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT
>     table blob
>   tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges
>     for q35
>   tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge
>     test
> 
>  tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
>  tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
>  2 files changed, 18 insertions(+)
>  create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge
> 
> -- 
> 2.25.1


Re: [PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Ani Sinha 2 years, 6 months ago
On Wed, Oct 20, 2021 at 2:09 PM Michael S. Tsirkin <mst@redhat.com> wrote:

> On Thu, Oct 07, 2021 at 07:27:47PM +0530, Ani Sinha wrote:
> > changelist:
> > v3: removed "nodefaults" from the command line and rebased the patchset.
> > v2: incorporated some of the feedbacks from Igor.
> > v1 : initial RFC patch.
>
> This seems to break on s390 hosts for people. Likely an
> endian-ness bug somewhere. Dropped for now - care tracking that down
> and fixing so I can pick up the test again?
>
> Thanks!


So I take it this patch wasn't causing the issue since this has been merged
to master now?


>
> > This patchset adds a unit test to exercize acpi hotplug support for
> multifunction
> > bridges on q35 machines. This support was added with the commit:
> >
> > d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction
> bridges")
> >
> > Ani Sinha (3):
> >   tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT
> >     table blob
> >   tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges
> >     for q35
> >   tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge
> >     test
> >
> >  tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
> >  tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
> >  2 files changed, 18 insertions(+)
> >  create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge
> >
> > --
> > 2.25.1
>
>
Re: [PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Michael S. Tsirkin 2 years, 6 months ago
On Thu, Oct 21, 2021 at 07:18:43AM +0530, Ani Sinha wrote:
> 
> 
> On Wed, Oct 20, 2021 at 2:09 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> 
>     On Thu, Oct 07, 2021 at 07:27:47PM +0530, Ani Sinha wrote:
>     > changelist:
>     > v3: removed "nodefaults" from the command line and rebased the patchset.
>     > v2: incorporated some of the feedbacks from Igor.
>     > v1 : initial RFC patch.
> 
>     This seems to break on s390 hosts for people. Likely an
>     endian-ness bug somewhere. Dropped for now - care tracking that down
>     and fixing so I can pick up the test again?
> 
>     Thanks!
> 
> 
> So I take it this patch wasn't causing the issue since this has been merged to
> master now?
> 
> 

Yes, we knew the bug is in the tested functionality not the test of
course. With help from Thomas I was able to fix the original bug.
The fix with more detail is here:

commit 0e464f7d993113119f0fd17b890831440734ce15
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Wed Oct 20 05:48:54 2021 -0400

    pci: fix PCI resource reserve capability on BE



> 
>     > This patchset adds a unit test to exercize acpi hotplug support for
>     multifunction
>     > bridges on q35 machines. This support was added with the commit:
>     >
>     > d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction
>     bridges")
>     >
>     > Ani Sinha (3):
>     >   tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT
>     >     table blob
>     >   tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges
>     >     for q35
>     >   tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge
>     >     test
>     >
>     >  tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
>     >  tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
>     >  2 files changed, 18 insertions(+)
>     >  create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge
>     >
>     > --
>     > 2.25.1
> 
> 


Re: [PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Ani Sinha 2 years, 6 months ago

On Thu, 21 Oct 2021, Michael S. Tsirkin wrote:

> On Thu, Oct 21, 2021 at 07:18:43AM +0530, Ani Sinha wrote:
> >
> >
> > On Wed, Oct 20, 2021 at 2:09 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> >     On Thu, Oct 07, 2021 at 07:27:47PM +0530, Ani Sinha wrote:
> >     > changelist:
> >     > v3: removed "nodefaults" from the command line and rebased the patchset.
> >     > v2: incorporated some of the feedbacks from Igor.
> >     > v1 : initial RFC patch.
> >
> >     This seems to break on s390 hosts for people. Likely an
> >     endian-ness bug somewhere. Dropped for now - care tracking that down
> >     and fixing so I can pick up the test again?
> >
> >     Thanks!
> >
> >
> > So I take it this patch wasn't causing the issue since this has been merged to
> > master now?
> >
> >
>
> Yes, we knew the bug is in the tested functionality not the test of
> course. With help from Thomas I was able to fix the original bug.
> The fix with more detail is here:
>
> commit 0e464f7d993113119f0fd17b890831440734ce15
> Author: Michael S. Tsirkin <mst@redhat.com>
> Date:   Wed Oct 20 05:48:54 2021 -0400
>
>     pci: fix PCI resource reserve capability on BE

BUG is quite old, since the time the function was actually written -

70e1ee59bb94 ("hw/pci: introduce bridge-only vendor-specific capability to
provide some hints to firmware")

I doubt in BE systems it ever worked.



Re: [PATCH v3 0/3] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35
Posted by Ani Sinha 2 years, 6 months ago

On Thu, 21 Oct 2021, Michael S. Tsirkin wrote:

> On Thu, Oct 21, 2021 at 07:18:43AM +0530, Ani Sinha wrote:
> >
> >
> > On Wed, Oct 20, 2021 at 2:09 PM Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> >     On Thu, Oct 07, 2021 at 07:27:47PM +0530, Ani Sinha wrote:
> >     > changelist:
> >     > v3: removed "nodefaults" from the command line and rebased the patchset.
> >     > v2: incorporated some of the feedbacks from Igor.
> >     > v1 : initial RFC patch.
> >
> >     This seems to break on s390 hosts for people. Likely an
> >     endian-ness bug somewhere. Dropped for now - care tracking that down
> >     and fixing so I can pick up the test again?
> >
> >     Thanks!
> >
> >
> > So I take it this patch wasn't causing the issue since this has been merged to
> > master now?
> >
> >
>
> Yes, we knew the bug is in the tested functionality not the test of
> course.

Yes which is why I was confused as well since the test would not
introduce regression in the product!

> With help from Thomas I was able to fix the original bug.

Ok good. wanted to take a look at it with a clear mind in the morning but
since this is fixed, all is good.

> The fix with more detail is here:
>
> commit 0e464f7d993113119f0fd17b890831440734ce15
> Author: Michael S. Tsirkin <mst@redhat.com>
> Date:   Wed Oct 20 05:48:54 2021 -0400
>
>     pci: fix PCI resource reserve capability on BE
>
>
>
> >
> >     > This patchset adds a unit test to exercize acpi hotplug support for
> >     multifunction
> >     > bridges on q35 machines. This support was added with the commit:
> >     >
> >     > d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction
> >     bridges")
> >     >
> >     > Ani Sinha (3):
> >     >   tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT
> >     >     table blob
> >     >   tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges
> >     >     for q35
> >     >   tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge
> >     >     test
> >     >
> >     >  tests/data/acpi/q35/DSDT.multi-bridge | Bin 0 -> 8583 bytes
> >     >  tests/qtest/bios-tables-test.c        |  18 ++++++++++++++++++
> >     >  2 files changed, 18 insertions(+)
> >     >  create mode 100644 tests/data/acpi/q35/DSDT.multi-bridge
> >     >
> >     > --
> >     > 2.25.1
> >
> >
>
>