diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-09-17 20:40:59 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-09-17 20:40:59 +0100 |
commit | a6a0c8394c5b0ce4cee2a1597d235d9b2b9af3c2 (patch) | |
tree | c8ea53fc15098d0e08ac06ce2ee22b190e4e6f02 /tests | |
parent | 3af984709398d61ecdcd32fb61295e6332d94392 (diff) | |
parent | 63bcfe7be09787ad6425afcaab5501b53bc26095 (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/microvm-20200917-pull-request' into staging
microvm: add acpi support
# gpg: Signature made Thu 17 Sep 2020 14:53:06 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-20200917-pull-request: (21 commits)
microvm: enable ramfb
tests/acpi: update expected data files for microvm
tests/acpi: add microvm test
tests/acpi: allow override blkdev
tests/acpi: allow microvm test data updates.
microvm: wire up hotplug
x86: move cpu hotplug from pc to x86
x86: move acpi_dev from pc/microvm
x86: constify x86_machine_is_*_enabled
microvm/acpi: disable virtio-mmio cmdline hack
microvm/acpi: use seabios with acpi=on
microvm/acpi: use GSI 16-23 for virtio
microvm/acpi: add acpi_dsdt_add_virtio() for x86
microvm/acpi: add minimal acpi support
microvm: make virtio irq base runtime configurable
acpi: move acpi_dsdt_add_power_button() to ged
acpi: ged: add x86 device variant.
acpi: ged: add control regs
seabios: add bios-microvm.bin binary
seabios: add microvm config, update build rules
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/acpi/microvm/APIC | bin | 0 -> 70 bytes | |||
-rw-r--r-- | tests/data/acpi/microvm/DSDT | bin | 0 -> 365 bytes | |||
-rw-r--r-- | tests/data/acpi/microvm/FACP | bin | 0 -> 268 bytes | |||
-rw-r--r-- | tests/qtest/bios-tables-test.c | 21 |
4 files changed, 19 insertions, 2 deletions
diff --git a/tests/data/acpi/microvm/APIC b/tests/data/acpi/microvm/APIC Binary files differnew file mode 100644 index 0000000000..7472c7e830 --- /dev/null +++ b/tests/data/acpi/microvm/APIC diff --git a/tests/data/acpi/microvm/DSDT b/tests/data/acpi/microvm/DSDT Binary files differnew file mode 100644 index 0000000000..b43f427a22 --- /dev/null +++ b/tests/data/acpi/microvm/DSDT diff --git a/tests/data/acpi/microvm/FACP b/tests/data/acpi/microvm/FACP Binary files differnew file mode 100644 index 0000000000..0ba5795d62 --- /dev/null +++ b/tests/data/acpi/microvm/FACP diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 504b810af5..a9c8d478ae 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -72,6 +72,7 @@ typedef struct { const char *variant; const char *uefi_fl1; const char *uefi_fl2; + const char *blkdev; const char *cd; const uint64_t ram_start; const uint64_t scan_len; @@ -666,9 +667,10 @@ static void test_acpi_one(const char *params, test_data *data) args = g_strdup_printf("-machine %s,kernel-irqchip=off %s -accel tcg " "-net none -display none %s " "-drive id=hd0,if=none,file=%s,format=raw " - "-device ide-hd,drive=hd0 ", + "-device %s,drive=hd0 ", data->machine, data->tcg_only ? "" : "-accel kvm", - params ? params : "", disk); + params ? params : "", disk, + data->blkdev ?: "ide-hd"); } data->qts = qtest_init(args); @@ -1042,6 +1044,20 @@ static void test_acpi_virt_tcg_memhp(void) } +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_one(" -machine microvm,acpi=on,rtc=off", + &data); + free_test_data(&data); +} + static void test_acpi_virt_tcg_numamem(void) { test_data data = { @@ -1159,6 +1175,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm); 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); } 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); |