[PATCH v2 00/15] tests: acpi: add x2apic and various iommu tests

Igor Mammedov posted 15 patches 2 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210902113551.461632-1-imammedo@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Juan Quintela <quintela@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Igor Mammedov <imammedo@redhat.com>
tests/qtest/libqos/libqtest.h  |   8 ++++
meson.build                    |   6 +++
tests/data/acpi/q35/APIC.xapic | Bin 0 -> 2686 bytes
tests/data/acpi/q35/DMAR.dmar  | Bin 0 -> 120 bytes
tests/data/acpi/q35/DSDT.ivrs  | Bin 0 -> 8306 bytes
tests/data/acpi/q35/DSDT.xapic | Bin 0 -> 35652 bytes
tests/data/acpi/q35/FACP.xapic | Bin 0 -> 244 bytes
tests/data/acpi/q35/IVRS.ivrs  | Bin 0 -> 104 bytes
tests/data/acpi/q35/SRAT.xapic | Bin 0 -> 5080 bytes
tests/qtest/acpi-utils.c       |  14 +++++++
tests/qtest/arm-cpu-features.c |  29 +++----------
tests/qtest/bios-tables-test.c |  72 +++++++++++++++++++++++++--------
tests/qtest/libqtest.c         |  27 +++++++++++++
tests/qtest/migration-test.c   |  15 ++-----
14 files changed, 119 insertions(+), 52 deletions(-)
create mode 100644 tests/data/acpi/q35/APIC.xapic
create mode 100644 tests/data/acpi/q35/DMAR.dmar
create mode 100644 tests/data/acpi/q35/DSDT.ivrs
create mode 100644 tests/data/acpi/q35/DSDT.xapic
create mode 100644 tests/data/acpi/q35/FACP.xapic
create mode 100644 tests/data/acpi/q35/IVRS.ivrs
create mode 100644 tests/data/acpi/q35/SRAT.xapic
[PATCH v2 00/15] tests: acpi: add x2apic and various iommu tests
Posted by Igor Mammedov 2 years, 7 months ago
Changelog:
  v2:
     * rebase and update expected blobs on top of 6.1
     * drop ARM/IORT test case, whihc with current master
       requires KVM, but we can't run ACPI tests since
       virt machine on KVM changes irqchip to match host
       and so ACPI tables chage as well. There is a series
       on list that add TCG SMMUv3 support and IORT ACPI
       test along with it, so it will be take care of IORT
       table when merged.

In preparation to ACPI refactoring, the series adds test-cases and
expected ACPI table blobs for:
  * configuration where x2APIC is used (i.e more than 255 cpus)
  * Intel/AMD IOMMUs ACPI tables

Also x2APIC test requires KVM to run, so series adds qtest_has_accel()
API and cleanups tests that used adhoc ways to check for KVM presence.

Series is split from a larger refactoring series:
 https://www.mail-archive.com/qemu-devel@nongnu.org/msg818845.html

gitlab repo for testing:
   https://gitlab.com/imammedo/qemu acpi-tests-v2 

CC: mst@redhat.com

Igor Mammedov (15):
  tests: acpi: dump table with failed checksum
  tests: qtest: add qtest_has_accel() to check if tested binary supports
    accelerator
  tests: acpi: whitelist expected tables for acpi/q35/xapic testcase
  tests: acpi: q35: test for x2APIC entries in SRAT
  tests: acpi: update expected tables blobs
  tests: acpi: whitelist new expected table
    tests/data/acpi/q35/DMAR.dmar
  tests: acpi: add testcase for intel_iommu (DMAR table)
  tests: acpi: add expected blob for DMAR table
  tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase
  tests: acpi: add testcase for amd-iommu (IVRS table)
  tests: acpi: update expected blobs
  tests: acpi: arm/virt: drop redundant test_acpi_one() in
    test_acpi_virt_tcg()
  tests: arm-cpu-features: use qtest_has_kvm() API
  tests: migration-test: use qtest_has_accel() API
  tests: bios-tables-test: use qtest_has_accel() API to register TCG
    only tests

 tests/qtest/libqos/libqtest.h  |   8 ++++
 meson.build                    |   6 +++
 tests/data/acpi/q35/APIC.xapic | Bin 0 -> 2686 bytes
 tests/data/acpi/q35/DMAR.dmar  | Bin 0 -> 120 bytes
 tests/data/acpi/q35/DSDT.ivrs  | Bin 0 -> 8306 bytes
 tests/data/acpi/q35/DSDT.xapic | Bin 0 -> 35652 bytes
 tests/data/acpi/q35/FACP.xapic | Bin 0 -> 244 bytes
 tests/data/acpi/q35/IVRS.ivrs  | Bin 0 -> 104 bytes
 tests/data/acpi/q35/SRAT.xapic | Bin 0 -> 5080 bytes
 tests/qtest/acpi-utils.c       |  14 +++++++
 tests/qtest/arm-cpu-features.c |  29 +++----------
 tests/qtest/bios-tables-test.c |  72 +++++++++++++++++++++++++--------
 tests/qtest/libqtest.c         |  27 +++++++++++++
 tests/qtest/migration-test.c   |  15 ++-----
 14 files changed, 119 insertions(+), 52 deletions(-)
 create mode 100644 tests/data/acpi/q35/APIC.xapic
 create mode 100644 tests/data/acpi/q35/DMAR.dmar
 create mode 100644 tests/data/acpi/q35/DSDT.ivrs
 create mode 100644 tests/data/acpi/q35/DSDT.xapic
 create mode 100644 tests/data/acpi/q35/FACP.xapic
 create mode 100644 tests/data/acpi/q35/IVRS.ivrs
 create mode 100644 tests/data/acpi/q35/SRAT.xapic

-- 
2.27.0


Re: [PATCH v2 00/15] tests: acpi: add x2apic and various iommu tests
Posted by Igor Mammedov 2 years, 6 months ago
On Thu,  2 Sep 2021 07:35:36 -0400
Igor Mammedov <imammedo@redhat.com> wrote:

ping

> Changelog:
>   v2:
>      * rebase and update expected blobs on top of 6.1
>      * drop ARM/IORT test case, whihc with current master
>        requires KVM, but we can't run ACPI tests since
>        virt machine on KVM changes irqchip to match host
>        and so ACPI tables chage as well. There is a series
>        on list that add TCG SMMUv3 support and IORT ACPI
>        test along with it, so it will be take care of IORT
>        table when merged.
> 
> In preparation to ACPI refactoring, the series adds test-cases and
> expected ACPI table blobs for:
>   * configuration where x2APIC is used (i.e more than 255 cpus)
>   * Intel/AMD IOMMUs ACPI tables
> 
> Also x2APIC test requires KVM to run, so series adds qtest_has_accel()
> API and cleanups tests that used adhoc ways to check for KVM presence.
> 
> Series is split from a larger refactoring series:
>  https://www.mail-archive.com/qemu-devel@nongnu.org/msg818845.html
> 
> gitlab repo for testing:
>    https://gitlab.com/imammedo/qemu acpi-tests-v2 
> 
> CC: mst@redhat.com
> 
> Igor Mammedov (15):
>   tests: acpi: dump table with failed checksum
>   tests: qtest: add qtest_has_accel() to check if tested binary supports
>     accelerator
>   tests: acpi: whitelist expected tables for acpi/q35/xapic testcase
>   tests: acpi: q35: test for x2APIC entries in SRAT
>   tests: acpi: update expected tables blobs
>   tests: acpi: whitelist new expected table
>     tests/data/acpi/q35/DMAR.dmar
>   tests: acpi: add testcase for intel_iommu (DMAR table)
>   tests: acpi: add expected blob for DMAR table
>   tests: acpi: whitelist expected blobs for new acpi/q35/ivrs testcase
>   tests: acpi: add testcase for amd-iommu (IVRS table)
>   tests: acpi: update expected blobs
>   tests: acpi: arm/virt: drop redundant test_acpi_one() in
>     test_acpi_virt_tcg()
>   tests: arm-cpu-features: use qtest_has_kvm() API
>   tests: migration-test: use qtest_has_accel() API
>   tests: bios-tables-test: use qtest_has_accel() API to register TCG
>     only tests
> 
>  tests/qtest/libqos/libqtest.h  |   8 ++++
>  meson.build                    |   6 +++
>  tests/data/acpi/q35/APIC.xapic | Bin 0 -> 2686 bytes
>  tests/data/acpi/q35/DMAR.dmar  | Bin 0 -> 120 bytes
>  tests/data/acpi/q35/DSDT.ivrs  | Bin 0 -> 8306 bytes
>  tests/data/acpi/q35/DSDT.xapic | Bin 0 -> 35652 bytes
>  tests/data/acpi/q35/FACP.xapic | Bin 0 -> 244 bytes
>  tests/data/acpi/q35/IVRS.ivrs  | Bin 0 -> 104 bytes
>  tests/data/acpi/q35/SRAT.xapic | Bin 0 -> 5080 bytes
>  tests/qtest/acpi-utils.c       |  14 +++++++
>  tests/qtest/arm-cpu-features.c |  29 +++----------
>  tests/qtest/bios-tables-test.c |  72 +++++++++++++++++++++++++--------
>  tests/qtest/libqtest.c         |  27 +++++++++++++
>  tests/qtest/migration-test.c   |  15 ++-----
>  14 files changed, 119 insertions(+), 52 deletions(-)
>  create mode 100644 tests/data/acpi/q35/APIC.xapic
>  create mode 100644 tests/data/acpi/q35/DMAR.dmar
>  create mode 100644 tests/data/acpi/q35/DSDT.ivrs
>  create mode 100644 tests/data/acpi/q35/DSDT.xapic
>  create mode 100644 tests/data/acpi/q35/FACP.xapic
>  create mode 100644 tests/data/acpi/q35/IVRS.ivrs
>  create mode 100644 tests/data/acpi/q35/SRAT.xapic
>