@@ -785,7 +785,10 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
acpi_dsdt_add_uart(scope, &memmap[VIRT_UART],
(irqmap[VIRT_UART] + ARM_SPI_BASE));
acpi_dsdt_add_flash(scope, &memmap[VIRT_FLASH]);
- acpi_dsdt_add_pvpanic(scope, &memmap[VIRT_PVPANIC]);
+
+ if (vms->pvpanic) {
+ acpi_dsdt_add_pvpanic(scope, &memmap[VIRT_PVPANIC]);
+ }
acpi_dsdt_add_fw_cfg(scope, &memmap[VIRT_FW_CFG]);
acpi_dsdt_add_virtio(scope, &memmap[VIRT_MMIO],
(irqmap[VIRT_MMIO] + ARM_SPI_BASE), NUM_VIRTIO_TRANSPORTS);
@@ -198,6 +198,9 @@ static void create_pvpanic_device(const VirtMachineState *vms)
hwaddr base = vms->memmap[VIRT_PVPANIC].base;
hwaddr size = vms->memmap[VIRT_PVPANIC].size;
+ if (!vms->pvpanic) {
+ return;
+ }
sysbus_create_simple(TYPE_PVPANIC_MMIO, base, NULL);
nodename = g_strdup_printf("/pvpanic-mmio@%" PRIx64, base);
Use the configure interface for pvpanic-mmio. Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> --- hw/arm/virt-acpi-build.c | 5 ++++- hw/arm/virt.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)