diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-02-05 15:27:02 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-02-05 15:27:02 +0000 |
commit | d0dddab40e472ba62b5f43f11cc7dba085dabe71 (patch) | |
tree | 249639b15b62ad4f5c38a5de81193fb1360d741e /tests | |
parent | e2c5093c993ef646e4e28f7aa78429853bcc06ac (diff) | |
parent | 277a582bf88a3058fa094e078a5310a2deb37da6 (diff) |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio,pci: fixes, features,code removal
Fixes all over the place.
Ability to control ACPI OEM ID's.
Ability to control rom BAR size.
Removal of deprecated pc machine types.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 05 Feb 2021 13:54:32 GMT
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# 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
* remotes/mst/tags/for_upstream:
tests/acpi: disallow updates for expected data files
tests/acpi: update expected data files
tests/acpi: add OEM ID and OEM TABLE ID test
acpi: use constants as strncpy limit
acpi: Permit OEM ID and OEM table ID fields to be changed
tests/acpi: allow updates for expected data files
vhost: Check for valid vdev in vhost_backend_handle_iotlb_msg
hw/virtio/virtio-balloon: Remove the "class" property
hw/i386: Remove the deprecated pc-1.x machine types
vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support
virtio-pmem: add trace events
virtio: Add corresponding memory_listener_unregister to unrealize
virtio-mmio: fix guest kernel crash with SHM regions
virtio: move 'use-disabled-flag' property to hw_compat_4_2
pci: add romsize property
pci: reject too large ROMs
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
92 files changed, 146 insertions, 24 deletions
diff --git a/tests/data/acpi/microvm/APIC b/tests/data/acpi/microvm/APIC Binary files differindex 7472c7e830..68dbd44a7e 100644 --- a/tests/data/acpi/microvm/APIC +++ b/tests/data/acpi/microvm/APIC diff --git a/tests/data/acpi/microvm/APIC.ioapic2 b/tests/data/acpi/microvm/APIC.ioapic2 Binary files differindex a305f89d99..3063c52cd3 100644 --- a/tests/data/acpi/microvm/APIC.ioapic2 +++ b/tests/data/acpi/microvm/APIC.ioapic2 diff --git a/tests/data/acpi/microvm/APIC.pcie b/tests/data/acpi/microvm/APIC.pcie Binary files differindex 6c51081b50..4e8f6ed8d6 100644 --- a/tests/data/acpi/microvm/APIC.pcie +++ b/tests/data/acpi/microvm/APIC.pcie diff --git a/tests/data/acpi/microvm/DSDT b/tests/data/acpi/microvm/DSDT Binary files differindex b43f427a22..f477668f2e 100644 --- a/tests/data/acpi/microvm/DSDT +++ b/tests/data/acpi/microvm/DSDT diff --git a/tests/data/acpi/microvm/DSDT.ioapic2 b/tests/data/acpi/microvm/DSDT.ioapic2 Binary files differindex aee44dd3de..e5924a4996 100644 --- a/tests/data/acpi/microvm/DSDT.ioapic2 +++ b/tests/data/acpi/microvm/DSDT.ioapic2 diff --git a/tests/data/acpi/microvm/DSDT.pcie b/tests/data/acpi/microvm/DSDT.pcie Binary files differindex e590b98f99..3fb373fd97 100644 --- a/tests/data/acpi/microvm/DSDT.pcie +++ b/tests/data/acpi/microvm/DSDT.pcie diff --git a/tests/data/acpi/microvm/DSDT.rtc b/tests/data/acpi/microvm/DSDT.rtc Binary files differindex 5960d6929a..e375473b5f 100644 --- a/tests/data/acpi/microvm/DSDT.rtc +++ b/tests/data/acpi/microvm/DSDT.rtc diff --git a/tests/data/acpi/microvm/DSDT.usb b/tests/data/acpi/microvm/DSDT.usb Binary files differindex 14423381ea..d63fd84620 100644 --- a/tests/data/acpi/microvm/DSDT.usb +++ b/tests/data/acpi/microvm/DSDT.usb diff --git a/tests/data/acpi/microvm/FACP b/tests/data/acpi/microvm/FACP Binary files differindex 0ba5795d62..f12cef5cb6 100644 --- a/tests/data/acpi/microvm/FACP +++ b/tests/data/acpi/microvm/FACP diff --git a/tests/data/acpi/pc/APIC b/tests/data/acpi/pc/APIC Binary files differindex 84509e0ae4..208331db53 100644 --- a/tests/data/acpi/pc/APIC +++ b/tests/data/acpi/pc/APIC diff --git a/tests/data/acpi/pc/APIC.acpihmat b/tests/data/acpi/pc/APIC.acpihmat Binary files differindex a21f164699..812c4603f2 100644 --- a/tests/data/acpi/pc/APIC.acpihmat +++ b/tests/data/acpi/pc/APIC.acpihmat diff --git a/tests/data/acpi/pc/APIC.cphp b/tests/data/acpi/pc/APIC.cphp Binary files differindex 1bf8a0a63b..65cc4f4a9a 100644 --- a/tests/data/acpi/pc/APIC.cphp +++ b/tests/data/acpi/pc/APIC.cphp diff --git a/tests/data/acpi/pc/APIC.dimmpxm b/tests/data/acpi/pc/APIC.dimmpxm Binary files differindex 427bb08248..d904d4a70d 100644 --- a/tests/data/acpi/pc/APIC.dimmpxm +++ b/tests/data/acpi/pc/APIC.dimmpxm diff --git a/tests/data/acpi/pc/DSDT b/tests/data/acpi/pc/DSDT Binary files differindex f6173df1d5..11ef89bd32 100644 --- a/tests/data/acpi/pc/DSDT +++ b/tests/data/acpi/pc/DSDT diff --git a/tests/data/acpi/pc/DSDT.acpihmat b/tests/data/acpi/pc/DSDT.acpihmat Binary files differindex 67f3f7249e..c561e91be7 100644 --- a/tests/data/acpi/pc/DSDT.acpihmat +++ b/tests/data/acpi/pc/DSDT.acpihmat diff --git a/tests/data/acpi/pc/DSDT.bridge b/tests/data/acpi/pc/DSDT.bridge Binary files differindex 643390f4c4..a234075518 100644 --- a/tests/data/acpi/pc/DSDT.bridge +++ b/tests/data/acpi/pc/DSDT.bridge diff --git a/tests/data/acpi/pc/DSDT.cphp b/tests/data/acpi/pc/DSDT.cphp Binary files differindex 1ddcf7d881..6ac47a7d10 100644 --- a/tests/data/acpi/pc/DSDT.cphp +++ b/tests/data/acpi/pc/DSDT.cphp diff --git a/tests/data/acpi/pc/DSDT.dimmpxm b/tests/data/acpi/pc/DSDT.dimmpxm Binary files differindex c44385cc01..d24377279c 100644 --- a/tests/data/acpi/pc/DSDT.dimmpxm +++ b/tests/data/acpi/pc/DSDT.dimmpxm diff --git a/tests/data/acpi/pc/DSDT.hpbridge b/tests/data/acpi/pc/DSDT.hpbridge Binary files differindex 4ecf1eb13b..9dfac45eab 100644 --- a/tests/data/acpi/pc/DSDT.hpbridge +++ b/tests/data/acpi/pc/DSDT.hpbridge diff --git a/tests/data/acpi/pc/DSDT.hpbrroot b/tests/data/acpi/pc/DSDT.hpbrroot Binary files differindex a3046226ec..6ff6f198c7 100644 --- a/tests/data/acpi/pc/DSDT.hpbrroot +++ b/tests/data/acpi/pc/DSDT.hpbrroot diff --git a/tests/data/acpi/pc/DSDT.ipmikcs b/tests/data/acpi/pc/DSDT.ipmikcs Binary files differindex f1638c5d07..1814f291b7 100644 --- a/tests/data/acpi/pc/DSDT.ipmikcs +++ b/tests/data/acpi/pc/DSDT.ipmikcs diff --git a/tests/data/acpi/pc/DSDT.memhp b/tests/data/acpi/pc/DSDT.memhp Binary files differindex 4c19e45e66..3c81339d39 100644 --- a/tests/data/acpi/pc/DSDT.memhp +++ b/tests/data/acpi/pc/DSDT.memhp diff --git a/tests/data/acpi/pc/DSDT.numamem b/tests/data/acpi/pc/DSDT.numamem Binary files differindex 40cfd93325..195f8da900 100644 --- a/tests/data/acpi/pc/DSDT.numamem +++ b/tests/data/acpi/pc/DSDT.numamem diff --git a/tests/data/acpi/pc/DSDT.roothp b/tests/data/acpi/pc/DSDT.roothp Binary files differindex 078fc8031b..1d0a2c2f3c 100644 --- a/tests/data/acpi/pc/DSDT.roothp +++ b/tests/data/acpi/pc/DSDT.roothp diff --git a/tests/data/acpi/pc/FACP b/tests/data/acpi/pc/FACP Binary files differindex 261ebdc5d1..5fe21a5967 100644 --- a/tests/data/acpi/pc/FACP +++ b/tests/data/acpi/pc/FACP diff --git a/tests/data/acpi/pc/HMAT.acpihmat b/tests/data/acpi/pc/HMAT.acpihmat Binary files differindex c00f7ba6cd..a9d8e5cd47 100644 --- a/tests/data/acpi/pc/HMAT.acpihmat +++ b/tests/data/acpi/pc/HMAT.acpihmat diff --git a/tests/data/acpi/pc/HPET b/tests/data/acpi/pc/HPET Binary files differindex df689b8f99..19f704abdd 100644 --- a/tests/data/acpi/pc/HPET +++ b/tests/data/acpi/pc/HPET diff --git a/tests/data/acpi/pc/NFIT.dimmpxm b/tests/data/acpi/pc/NFIT.dimmpxm Binary files differindex 598d331b75..02d23385bc 100644 --- a/tests/data/acpi/pc/NFIT.dimmpxm +++ b/tests/data/acpi/pc/NFIT.dimmpxm diff --git a/tests/data/acpi/pc/SLIT.cphp b/tests/data/acpi/pc/SLIT.cphp Binary files differindex 74ec3b4b46..67f00813af 100644 --- a/tests/data/acpi/pc/SLIT.cphp +++ b/tests/data/acpi/pc/SLIT.cphp diff --git a/tests/data/acpi/pc/SLIT.memhp b/tests/data/acpi/pc/SLIT.memhp Binary files differindex 74ec3b4b46..67f00813af 100644 --- a/tests/data/acpi/pc/SLIT.memhp +++ b/tests/data/acpi/pc/SLIT.memhp diff --git a/tests/data/acpi/pc/SRAT.acpihmat b/tests/data/acpi/pc/SRAT.acpihmat Binary files differindex 1dcae90aec..e0b36e97f6 100644 --- a/tests/data/acpi/pc/SRAT.acpihmat +++ b/tests/data/acpi/pc/SRAT.acpihmat diff --git a/tests/data/acpi/pc/SRAT.cphp b/tests/data/acpi/pc/SRAT.cphp Binary files differindex ff2137642f..d8ce4f5a9c 100644 --- a/tests/data/acpi/pc/SRAT.cphp +++ b/tests/data/acpi/pc/SRAT.cphp diff --git a/tests/data/acpi/pc/SRAT.dimmpxm b/tests/data/acpi/pc/SRAT.dimmpxm Binary files differindex 5a13c61b90..7eed48cf2d 100644 --- a/tests/data/acpi/pc/SRAT.dimmpxm +++ b/tests/data/acpi/pc/SRAT.dimmpxm diff --git a/tests/data/acpi/pc/SRAT.memhp b/tests/data/acpi/pc/SRAT.memhp Binary files differindex e508b4ae3c..a5b5f9adef 100644 --- a/tests/data/acpi/pc/SRAT.memhp +++ b/tests/data/acpi/pc/SRAT.memhp diff --git a/tests/data/acpi/pc/SRAT.numamem b/tests/data/acpi/pc/SRAT.numamem Binary files differindex 119922f497..56da58e269 100644 --- a/tests/data/acpi/pc/SRAT.numamem +++ b/tests/data/acpi/pc/SRAT.numamem diff --git a/tests/data/acpi/pc/SSDT.dimmpxm b/tests/data/acpi/pc/SSDT.dimmpxm Binary files differindex ac55387d57..a50a961fa1 100644 --- a/tests/data/acpi/pc/SSDT.dimmpxm +++ b/tests/data/acpi/pc/SSDT.dimmpxm diff --git a/tests/data/acpi/pc/WAET b/tests/data/acpi/pc/WAET Binary files differindex c2240f58df..ac0db59183 100644 --- a/tests/data/acpi/pc/WAET +++ b/tests/data/acpi/pc/WAET diff --git a/tests/data/acpi/q35/APIC b/tests/data/acpi/q35/APIC Binary files differindex 84509e0ae4..208331db53 100644 --- a/tests/data/acpi/q35/APIC +++ b/tests/data/acpi/q35/APIC diff --git a/tests/data/acpi/q35/APIC.acpihmat b/tests/data/acpi/q35/APIC.acpihmat Binary files differindex a21f164699..812c4603f2 100644 --- a/tests/data/acpi/q35/APIC.acpihmat +++ b/tests/data/acpi/q35/APIC.acpihmat diff --git a/tests/data/acpi/q35/APIC.cphp b/tests/data/acpi/q35/APIC.cphp Binary files differindex 1bf8a0a63b..65cc4f4a9a 100644 --- a/tests/data/acpi/q35/APIC.cphp +++ b/tests/data/acpi/q35/APIC.cphp diff --git a/tests/data/acpi/q35/APIC.dimmpxm b/tests/data/acpi/q35/APIC.dimmpxm Binary files differindex 427bb08248..d904d4a70d 100644 --- a/tests/data/acpi/q35/APIC.dimmpxm +++ b/tests/data/acpi/q35/APIC.dimmpxm diff --git a/tests/data/acpi/q35/DSDT b/tests/data/acpi/q35/DSDT Binary files differindex d25cd70729..008a3d7d0f 100644 --- a/tests/data/acpi/q35/DSDT +++ b/tests/data/acpi/q35/DSDT diff --git a/tests/data/acpi/q35/DSDT.acpihmat b/tests/data/acpi/q35/DSDT.acpihmat Binary files differindex 722e06af83..2723b69008 100644 --- a/tests/data/acpi/q35/DSDT.acpihmat +++ b/tests/data/acpi/q35/DSDT.acpihmat diff --git a/tests/data/acpi/q35/DSDT.bridge b/tests/data/acpi/q35/DSDT.bridge Binary files differindex 06bac139d6..8671145557 100644 --- a/tests/data/acpi/q35/DSDT.bridge +++ b/tests/data/acpi/q35/DSDT.bridge diff --git a/tests/data/acpi/q35/DSDT.cphp b/tests/data/acpi/q35/DSDT.cphp Binary files differindex 2b933ac482..42b7819ea8 100644 --- a/tests/data/acpi/q35/DSDT.cphp +++ b/tests/data/acpi/q35/DSDT.cphp diff --git a/tests/data/acpi/q35/DSDT.dimmpxm b/tests/data/acpi/q35/DSDT.dimmpxm Binary files differindex bd8f8305b0..7c3526d967 100644 --- a/tests/data/acpi/q35/DSDT.dimmpxm +++ b/tests/data/acpi/q35/DSDT.dimmpxm diff --git a/tests/data/acpi/q35/DSDT.ipmibt b/tests/data/acpi/q35/DSDT.ipmibt Binary files differindex a8f868e23c..8d3ccc3e75 100644 --- a/tests/data/acpi/q35/DSDT.ipmibt +++ b/tests/data/acpi/q35/DSDT.ipmibt diff --git a/tests/data/acpi/q35/DSDT.memhp b/tests/data/acpi/q35/DSDT.memhp Binary files differindex 9a802e4c67..f1c545d94b 100644 --- a/tests/data/acpi/q35/DSDT.memhp +++ b/tests/data/acpi/q35/DSDT.memhp diff --git a/tests/data/acpi/q35/DSDT.mmio64 b/tests/data/acpi/q35/DSDT.mmio64 Binary files differindex 948c2dc726..4fb285f2ef 100644 --- a/tests/data/acpi/q35/DSDT.mmio64 +++ b/tests/data/acpi/q35/DSDT.mmio64 diff --git a/tests/data/acpi/q35/DSDT.numamem b/tests/data/acpi/q35/DSDT.numamem Binary files differindex 44ec1b0af4..dd9dc9d025 100644 --- a/tests/data/acpi/q35/DSDT.numamem +++ b/tests/data/acpi/q35/DSDT.numamem diff --git a/tests/data/acpi/q35/DSDT.tis b/tests/data/acpi/q35/DSDT.tis Binary files differindex 30da3ec279..b8e3803402 100644 --- a/tests/data/acpi/q35/DSDT.tis +++ b/tests/data/acpi/q35/DSDT.tis diff --git a/tests/data/acpi/q35/FACP b/tests/data/acpi/q35/FACP Binary files differindex 72c9d97902..f6a864cc86 100644 --- a/tests/data/acpi/q35/FACP +++ b/tests/data/acpi/q35/FACP diff --git a/tests/data/acpi/q35/HMAT.acpihmat b/tests/data/acpi/q35/HMAT.acpihmat Binary files differindex c00f7ba6cd..a9d8e5cd47 100644 --- a/tests/data/acpi/q35/HMAT.acpihmat +++ b/tests/data/acpi/q35/HMAT.acpihmat diff --git a/tests/data/acpi/q35/HPET b/tests/data/acpi/q35/HPET Binary files differindex df689b8f99..19f704abdd 100644 --- a/tests/data/acpi/q35/HPET +++ b/tests/data/acpi/q35/HPET diff --git a/tests/data/acpi/q35/MCFG b/tests/data/acpi/q35/MCFG Binary files differindex 79ceb27a03..696bc969f2 100644 --- a/tests/data/acpi/q35/MCFG +++ b/tests/data/acpi/q35/MCFG diff --git a/tests/data/acpi/q35/NFIT.dimmpxm b/tests/data/acpi/q35/NFIT.dimmpxm Binary files differindex 598d331b75..02d23385bc 100644 --- a/tests/data/acpi/q35/NFIT.dimmpxm +++ b/tests/data/acpi/q35/NFIT.dimmpxm diff --git a/tests/data/acpi/q35/SLIT.cphp b/tests/data/acpi/q35/SLIT.cphp Binary files differindex 74ec3b4b46..67f00813af 100644 --- a/tests/data/acpi/q35/SLIT.cphp +++ b/tests/data/acpi/q35/SLIT.cphp diff --git a/tests/data/acpi/q35/SLIT.memhp b/tests/data/acpi/q35/SLIT.memhp Binary files differindex 74ec3b4b46..67f00813af 100644 --- a/tests/data/acpi/q35/SLIT.memhp +++ b/tests/data/acpi/q35/SLIT.memhp diff --git a/tests/data/acpi/q35/SRAT.acpihmat b/tests/data/acpi/q35/SRAT.acpihmat Binary files differindex 1dcae90aec..e0b36e97f6 100644 --- a/tests/data/acpi/q35/SRAT.acpihmat +++ b/tests/data/acpi/q35/SRAT.acpihmat diff --git a/tests/data/acpi/q35/SRAT.cphp b/tests/data/acpi/q35/SRAT.cphp Binary files differindex ff2137642f..d8ce4f5a9c 100644 --- a/tests/data/acpi/q35/SRAT.cphp +++ b/tests/data/acpi/q35/SRAT.cphp diff --git a/tests/data/acpi/q35/SRAT.dimmpxm b/tests/data/acpi/q35/SRAT.dimmpxm Binary files differindex 5a13c61b90..7eed48cf2d 100644 --- a/tests/data/acpi/q35/SRAT.dimmpxm +++ b/tests/data/acpi/q35/SRAT.dimmpxm diff --git a/tests/data/acpi/q35/SRAT.memhp b/tests/data/acpi/q35/SRAT.memhp Binary files differindex e508b4ae3c..a5b5f9adef 100644 --- a/tests/data/acpi/q35/SRAT.memhp +++ b/tests/data/acpi/q35/SRAT.memhp diff --git a/tests/data/acpi/q35/SRAT.mmio64 b/tests/data/acpi/q35/SRAT.mmio64 Binary files differindex ac35f3dac4..f5e1e3932a 100644 --- a/tests/data/acpi/q35/SRAT.mmio64 +++ b/tests/data/acpi/q35/SRAT.mmio64 diff --git a/tests/data/acpi/q35/SRAT.numamem b/tests/data/acpi/q35/SRAT.numamem Binary files differindex 119922f497..56da58e269 100644 --- a/tests/data/acpi/q35/SRAT.numamem +++ b/tests/data/acpi/q35/SRAT.numamem diff --git a/tests/data/acpi/q35/SSDT.dimmpxm b/tests/data/acpi/q35/SSDT.dimmpxm Binary files differindex 98e6f0e3f3..617a1c911c 100644 --- a/tests/data/acpi/q35/SSDT.dimmpxm +++ b/tests/data/acpi/q35/SSDT.dimmpxm diff --git a/tests/data/acpi/q35/TPM2.tis b/tests/data/acpi/q35/TPM2.tis Binary files differindex 7878a6e79a..fe0f05987b 100644 --- a/tests/data/acpi/q35/TPM2.tis +++ b/tests/data/acpi/q35/TPM2.tis diff --git a/tests/data/acpi/q35/WAET b/tests/data/acpi/q35/WAET Binary files differindex c2240f58df..ac0db59183 100644 --- a/tests/data/acpi/q35/WAET +++ b/tests/data/acpi/q35/WAET diff --git a/tests/data/acpi/virt/APIC b/tests/data/acpi/virt/APIC Binary files differindex 797dfde284..023f15f12e 100644 --- a/tests/data/acpi/virt/APIC +++ b/tests/data/acpi/virt/APIC diff --git a/tests/data/acpi/virt/APIC.memhp b/tests/data/acpi/virt/APIC.memhp Binary files differindex 797dfde284..023f15f12e 100644 --- a/tests/data/acpi/virt/APIC.memhp +++ b/tests/data/acpi/virt/APIC.memhp diff --git a/tests/data/acpi/virt/APIC.numamem b/tests/data/acpi/virt/APIC.numamem Binary files differindex 797dfde284..023f15f12e 100644 --- a/tests/data/acpi/virt/APIC.numamem +++ b/tests/data/acpi/virt/APIC.numamem diff --git a/tests/data/acpi/virt/DSDT b/tests/data/acpi/virt/DSDT Binary files differindex ea8a0869af..134d8ae5b6 100644 --- a/tests/data/acpi/virt/DSDT +++ b/tests/data/acpi/virt/DSDT diff --git a/tests/data/acpi/virt/DSDT.memhp b/tests/data/acpi/virt/DSDT.memhp Binary files differindex 897648637c..140976b23e 100644 --- a/tests/data/acpi/virt/DSDT.memhp +++ b/tests/data/acpi/virt/DSDT.memhp diff --git a/tests/data/acpi/virt/DSDT.numamem b/tests/data/acpi/virt/DSDT.numamem Binary files differindex ea8a0869af..134d8ae5b6 100644 --- a/tests/data/acpi/virt/DSDT.numamem +++ b/tests/data/acpi/virt/DSDT.numamem diff --git a/tests/data/acpi/virt/DSDT.pxb b/tests/data/acpi/virt/DSDT.pxb Binary files differindex ce3b67dff2..eaa507b4bb 100644 --- a/tests/data/acpi/virt/DSDT.pxb +++ b/tests/data/acpi/virt/DSDT.pxb diff --git a/tests/data/acpi/virt/FACP b/tests/data/acpi/virt/FACP Binary files differindex 27de99f51b..1f764220f8 100644 --- a/tests/data/acpi/virt/FACP +++ b/tests/data/acpi/virt/FACP diff --git a/tests/data/acpi/virt/FACP.memhp b/tests/data/acpi/virt/FACP.memhp Binary files differindex 27de99f51b..1f764220f8 100644 --- a/tests/data/acpi/virt/FACP.memhp +++ b/tests/data/acpi/virt/FACP.memhp diff --git a/tests/data/acpi/virt/FACP.numamem b/tests/data/acpi/virt/FACP.numamem Binary files differindex 27de99f51b..1f764220f8 100644 --- a/tests/data/acpi/virt/FACP.numamem +++ b/tests/data/acpi/virt/FACP.numamem diff --git a/tests/data/acpi/virt/GTDT b/tests/data/acpi/virt/GTDT Binary files differindex 10107a65e9..9408b71b59 100644 --- a/tests/data/acpi/virt/GTDT +++ b/tests/data/acpi/virt/GTDT diff --git a/tests/data/acpi/virt/GTDT.memhp b/tests/data/acpi/virt/GTDT.memhp Binary files differindex 10107a65e9..9408b71b59 100644 --- a/tests/data/acpi/virt/GTDT.memhp +++ b/tests/data/acpi/virt/GTDT.memhp diff --git a/tests/data/acpi/virt/GTDT.numamem b/tests/data/acpi/virt/GTDT.numamem Binary files differindex 10107a65e9..9408b71b59 100644 --- a/tests/data/acpi/virt/GTDT.numamem +++ b/tests/data/acpi/virt/GTDT.numamem diff --git a/tests/data/acpi/virt/MCFG b/tests/data/acpi/virt/MCFG Binary files differindex e8987e1af0..f4ae3203a4 100644 --- a/tests/data/acpi/virt/MCFG +++ b/tests/data/acpi/virt/MCFG diff --git a/tests/data/acpi/virt/MCFG.memhp b/tests/data/acpi/virt/MCFG.memhp Binary files differindex e8987e1af0..f4ae3203a4 100644 --- a/tests/data/acpi/virt/MCFG.memhp +++ b/tests/data/acpi/virt/MCFG.memhp diff --git a/tests/data/acpi/virt/MCFG.numamem b/tests/data/acpi/virt/MCFG.numamem Binary files differindex e8987e1af0..f4ae3203a4 100644 --- a/tests/data/acpi/virt/MCFG.numamem +++ b/tests/data/acpi/virt/MCFG.numamem diff --git a/tests/data/acpi/virt/NFIT.memhp b/tests/data/acpi/virt/NFIT.memhp Binary files differindex 738c6f74c0..203db8c7be 100644 --- a/tests/data/acpi/virt/NFIT.memhp +++ b/tests/data/acpi/virt/NFIT.memhp diff --git a/tests/data/acpi/virt/SLIT.memhp b/tests/data/acpi/virt/SLIT.memhp Binary files differindex 74ec3b4b46..67f00813af 100644 --- a/tests/data/acpi/virt/SLIT.memhp +++ b/tests/data/acpi/virt/SLIT.memhp diff --git a/tests/data/acpi/virt/SPCR b/tests/data/acpi/virt/SPCR Binary files differindex 377271a0e7..24e0a579e7 100644 --- a/tests/data/acpi/virt/SPCR +++ b/tests/data/acpi/virt/SPCR diff --git a/tests/data/acpi/virt/SPCR.memhp b/tests/data/acpi/virt/SPCR.memhp Binary files differindex 377271a0e7..24e0a579e7 100644 --- a/tests/data/acpi/virt/SPCR.memhp +++ b/tests/data/acpi/virt/SPCR.memhp diff --git a/tests/data/acpi/virt/SPCR.numamem b/tests/data/acpi/virt/SPCR.numamem Binary files differindex 377271a0e7..24e0a579e7 100644 --- a/tests/data/acpi/virt/SPCR.numamem +++ b/tests/data/acpi/virt/SPCR.numamem diff --git a/tests/data/acpi/virt/SRAT.memhp b/tests/data/acpi/virt/SRAT.memhp Binary files differindex 9a35adb40c..01294cc892 100644 --- a/tests/data/acpi/virt/SRAT.memhp +++ b/tests/data/acpi/virt/SRAT.memhp diff --git a/tests/data/acpi/virt/SRAT.numamem b/tests/data/acpi/virt/SRAT.numamem Binary files differindex 9526e5a28e..d45f40338c 100644 --- a/tests/data/acpi/virt/SRAT.numamem +++ b/tests/data/acpi/virt/SRAT.numamem diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.memhp Binary files differindex 375d7b6fc8..e8b850ae22 100644 --- a/tests/data/acpi/virt/SSDT.memhp +++ b/tests/data/acpi/virt/SSDT.memhp diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 669202fc95..77053975aa 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -64,13 +64,17 @@ #include "boot-sector.h" #include "tpm-emu.h" #include "hw/acpi/tpm.h" - +#include "qemu/cutils.h" #define MACHINE_PC "pc" #define MACHINE_Q35 "q35" #define ACPI_REBUILD_EXPECTED_AML "TEST_ACPI_REBUILD_AML" +#define OEM_ID "TEST" +#define OEM_TABLE_ID "OEM" +#define OEM_TEST_ARGS "-machine oem-id="OEM_ID",oem-table-id="OEM_TABLE_ID + typedef struct { bool tcg_only; const char *machine; @@ -654,17 +658,28 @@ static void test_smbios_structs(test_data *data) } } -static void test_acpi_one(const char *params, test_data *data) +static void test_acpi_load_tables(test_data *data, bool use_uefi) { - char *args; - bool use_uefi = data->uefi_fl1 && data->uefi_fl2; - -#ifndef CONFIG_TCG - if (data->tcg_only) { - g_test_skip("TCG disabled, skipping ACPI tcg_only test"); - return; + if (use_uefi) { + g_assert(data->scan_len); + data->rsdp_addr = acpi_find_rsdp_address_uefi(data->qts, + data->ram_start, data->scan_len); + } else { + boot_sector_test(data->qts); + data->rsdp_addr = acpi_find_rsdp_address(data->qts); + g_assert_cmphex(data->rsdp_addr, <, 0x100000); } -#endif /* CONFIG_TCG */ + + data->tables = g_array_new(false, true, sizeof(AcpiSdtTable)); + test_acpi_rsdp_table(data); + test_acpi_rxsdt_table(data); + test_acpi_fadt_table(data); +} + +static char *test_acpi_create_args(test_data *data, const char *params, + bool use_uefi) +{ + char *args; if (use_uefi) { /* @@ -695,23 +710,24 @@ static void test_acpi_one(const char *params, test_data *data) params ? params : "", disk, data->blkdev ?: "ide-hd"); } + return args; +} - data->qts = qtest_init(args); +static void test_acpi_one(const char *params, test_data *data) +{ + char *args; + bool use_uefi = data->uefi_fl1 && data->uefi_fl2; - if (use_uefi) { - g_assert(data->scan_len); - data->rsdp_addr = acpi_find_rsdp_address_uefi(data->qts, - data->ram_start, data->scan_len); - } else { - boot_sector_test(data->qts); - data->rsdp_addr = acpi_find_rsdp_address(data->qts); - g_assert_cmphex(data->rsdp_addr, <, 0x100000); +#ifndef CONFIG_TCG + if (data->tcg_only) { + g_test_skip("TCG disabled, skipping ACPI tcg_only test"); + return; } +#endif /* CONFIG_TCG */ - data->tables = g_array_new(false, true, sizeof(AcpiSdtTable)); - test_acpi_rsdp_table(data); - test_acpi_rxsdt_table(data); - test_acpi_fadt_table(data); + args = test_acpi_create_args(data, params, use_uefi); + data->qts = qtest_init(args); + test_acpi_load_tables(data, use_uefi); if (getenv(ACPI_REBUILD_EXPECTED_AML)) { dump_aml_files(data, true); @@ -1292,6 +1308,109 @@ static void test_acpi_virt_tcg(void) free_test_data(&data); } +static void test_oem_fields(test_data *data) +{ + int i; + char oem_id[6]; + char oem_table_id[8]; + + strpadcpy(oem_id, sizeof oem_id, OEM_ID, ' '); + strpadcpy(oem_table_id, sizeof oem_table_id, OEM_TABLE_ID, ' '); + for (i = 0; i < data->tables->len; ++i) { + AcpiSdtTable *sdt; + + sdt = &g_array_index(data->tables, AcpiSdtTable, i); + /* FACS doesn't have OEMID and OEMTABLEID fields */ + if (compare_signature(sdt, "FACS")) { + continue; + } + + g_assert(memcmp(sdt->aml + 10, oem_id, 6) == 0); + g_assert(memcmp(sdt->aml + 16, oem_table_id, 8) == 0); + } +} + +static void test_acpi_oem_fields_pc(void) +{ + test_data data; + char *args; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + + args = test_acpi_create_args(&data, + OEM_TEST_ARGS, false); + data.qts = qtest_init(args); + test_acpi_load_tables(&data, false); + test_oem_fields(&data); + qtest_quit(data.qts); + free_test_data(&data); + g_free(args); +} + +static void test_acpi_oem_fields_q35(void) +{ + test_data data; + char *args; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_Q35; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + + args = test_acpi_create_args(&data, + OEM_TEST_ARGS, false); + data.qts = qtest_init(args); + test_acpi_load_tables(&data, false); + test_oem_fields(&data); + qtest_quit(data.qts); + free_test_data(&data); + g_free(args); +} + +static void test_acpi_oem_fields_microvm(void) +{ + test_data data; + char *args; + + test_acpi_microvm_prepare(&data); + + args = test_acpi_create_args(&data, + OEM_TEST_ARGS",acpi=on", false); + data.qts = qtest_init(args); + test_acpi_load_tables(&data, false); + test_oem_fields(&data); + qtest_quit(data.qts); + free_test_data(&data); + g_free(args); +} + +static void test_acpi_oem_fields_virt(void) +{ + test_data data = { + .machine = "virt", + .tcg_only = true, + .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd", + .uefi_fl2 = "pc-bios/edk2-arm-vars.fd", + .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2", + .ram_start = 0x40000000ULL, + .scan_len = 128ULL * 1024 * 1024, + }; + char *args; + + args = test_acpi_create_args(&data, + "-cpu cortex-a57 "OEM_TEST_ARGS, true); + data.qts = qtest_init(args); + test_acpi_load_tables(&data, true); + test_oem_fields(&data); + qtest_quit(data.qts); + free_test_data(&data); + g_free(args); +} + + int main(int argc, char *argv[]) { const char *arch = qtest_get_arch(); @@ -1304,9 +1423,10 @@ int main(int argc, char *argv[]) if (ret) { return ret; } - + qtest_add_func("acpi/q35/oem-fields", test_acpi_oem_fields_q35); qtest_add_func("acpi/q35/tpm-tis", test_acpi_q35_tcg_tpm_tis); qtest_add_func("acpi/piix4", test_acpi_piix4_tcg); + qtest_add_func("acpi/oem-fields", test_acpi_oem_fields_pc); qtest_add_func("acpi/piix4/bridge", test_acpi_piix4_tcg_bridge); qtest_add_func("acpi/piix4/pci-hotplug/no_root_hotplug", test_acpi_piix4_no_root_hotplug); @@ -1333,6 +1453,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/microvm/usb", test_acpi_microvm_usb_tcg); qtest_add_func("acpi/microvm/rtc", test_acpi_microvm_rtc_tcg); qtest_add_func("acpi/microvm/ioapic2", test_acpi_microvm_ioapic2_tcg); + qtest_add_func("acpi/microvm/oem-fields", test_acpi_oem_fields_microvm); if (strcmp(arch, "x86_64") == 0) { qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg); } @@ -1341,6 +1462,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem); qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp); qtest_add_func("acpi/virt/pxb", test_acpi_virt_tcg_pxb); + qtest_add_func("acpi/virt/oem-fields", test_acpi_oem_fields_virt); } ret = g_test_run(); boot_sector_cleanup(disk); |