aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-10-01 15:28:55 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-10-01 15:28:55 +0100
commitb23317eec4715aa62de9a6e5490a01122c8eef0e (patch)
tree4c46752e3d1092ab006305b3ca8f845ea348a342 /tests
parent37a712a0f969ca2df7f01182409a6c4825cebfb5 (diff)
parent7f6c3d1a574bddcda6931eb00287089998725f71 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/microvm-20200930-pull-request' into staging
microvm: add pcie support. # gpg: Signature made Wed 30 Sep 2020 18:48:41 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/microvm-20200930-pull-request: tests/acpi: update expected data files acpi/gpex: no reason to use a method for _CRS tests/acpi: add microvm pcie test tests/acpi: factor out common microvm test setup tests/acpi: add empty tests/data/acpi/microvm/DSDT.pcie file tests/acpi: allow updates for expected data files microvm/pcie: add 64bit mmio window microvm: add pcie support microvm: add irq table arm: use acpi_dsdt_add_gpex acpi: add acpi_dsdt_add_gpex move MemMapEntry Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/data/acpi/microvm/DSDT.pciebin0 -> 3023 bytes
-rw-r--r--tests/data/acpi/virt/DSDTbin5200 -> 5196 bytes
-rw-r--r--tests/data/acpi/virt/DSDT.memhpbin6561 -> 6557 bytes
-rw-r--r--tests/data/acpi/virt/DSDT.numamembin5200 -> 5196 bytes
-rw-r--r--tests/qtest/bios-tables-test.c30
5 files changed, 25 insertions, 5 deletions
diff --git a/tests/data/acpi/microvm/DSDT.pcie b/tests/data/acpi/microvm/DSDT.pcie
new file mode 100644
index 0000000000..4b765541e3
--- /dev/null
+++ b/tests/data/acpi/microvm/DSDT.pcie
Binary files differ
diff --git a/tests/data/acpi/virt/DSDT b/tests/data/acpi/virt/DSDT
index 9b002836f3..bc519abff9 100644
--- a/tests/data/acpi/virt/DSDT
+++ b/tests/data/acpi/virt/DSDT
Binary files differ
diff --git a/tests/data/acpi/virt/DSDT.memhp b/tests/data/acpi/virt/DSDT.memhp
index 545a18c365..54728e2b4b 100644
--- a/tests/data/acpi/virt/DSDT.memhp
+++ b/tests/data/acpi/virt/DSDT.memhp
Binary files differ
diff --git a/tests/data/acpi/virt/DSDT.numamem b/tests/data/acpi/virt/DSDT.numamem
index 9b002836f3..bc519abff9 100644
--- a/tests/data/acpi/virt/DSDT.numamem
+++ b/tests/data/acpi/virt/DSDT.numamem
Binary files differ
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 67d1bed082..e15f36c8c7 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1086,20 +1086,37 @@ static void test_acpi_virt_tcg_memhp(void)
}
+static void test_acpi_microvm_prepare(test_data *data)
+{
+ memset(data, 0, sizeof(*data));
+ data->machine = "microvm";
+ data->required_struct_types = NULL; /* no smbios */
+ data->required_struct_types_len = 0;
+ data->blkdev = "virtio-blk-device";
+}
+
static void test_acpi_microvm_tcg(void)
{
test_data data;
- memset(&data, 0, sizeof(data));
- data.machine = "microvm";
- data.required_struct_types = NULL; /* no smbios */
- data.required_struct_types_len = 0;
- data.blkdev = "virtio-blk-device";
+ test_acpi_microvm_prepare(&data);
test_acpi_one(" -machine microvm,acpi=on,rtc=off",
&data);
free_test_data(&data);
}
+static void test_acpi_microvm_pcie_tcg(void)
+{
+ test_data data;
+
+ test_acpi_microvm_prepare(&data);
+ data.variant = ".pcie";
+ data.tcg_only = true; /* need constant host-phys-bits */
+ test_acpi_one(" -machine microvm,acpi=on,rtc=off,pcie=on",
+ &data);
+ free_test_data(&data);
+}
+
static void test_acpi_virt_tcg_numamem(void)
{
test_data data = {
@@ -1224,6 +1241,9 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat);
qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat);
qtest_add_func("acpi/microvm", test_acpi_microvm_tcg);
+ if (strcmp(arch, "x86_64") == 0) {
+ qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg);
+ }
} else if (strcmp(arch, "aarch64") == 0) {
qtest_add_func("acpi/virt", test_acpi_virt_tcg);
qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);