[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] xen: Fix xenpv machine initialisation
From: |
Anthony PERARD |
Subject: |
[Qemu-devel] [PATCH] xen: Fix xenpv machine initialisation |
Date: |
Mon, 7 Nov 2016 15:05:04 +0000 |
When using QEMU for Xen PV guest, QEMU abort with:
xen-common.c:118:xen_init: Object 0x7f2b8325dcb0 is not an instance of type
generic-pc-machine
This is because the machine 'xenpv' also use accel=xen.
This fix 021746c131cdfeab9d82ff918795a9f18d20d7ae
Signed-off-by: Anthony PERARD <address@hidden>
---
CC: Wei Liu <address@hidden>
CC: Eduardo Habkost <address@hidden>
---
xen-common.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/xen-common.c b/xen-common.c
index bacf962..22683b0 100644
--- a/xen-common.c
+++ b/xen-common.c
@@ -115,10 +115,12 @@ static void xen_change_state_handler(void *opaque, int
running,
static int xen_init(MachineState *ms)
{
- PCMachineState *pcms = PC_MACHINE(ms);
+ if (object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE)) {
+ PCMachineState *pcms = PC_MACHINE(ms);
- /* Disable ACPI build because Xen handles it */
- pcms->acpi_build_enabled = false;
+ /* Disable ACPI build because Xen handles it */
+ pcms->acpi_build_enabled = false;
+ }
xen_xc = xc_interface_open(0, 0, 0);
if (xen_xc == NULL) {
--
Anthony PERARD
- [Qemu-devel] [PATCH] xen: Fix xenpv machine initialisation,
Anthony PERARD <=