[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen: Fix xenpv machine initialisation
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 <anthony.perard@xxxxxxxxxx> --- CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Eduardo Habkost <ehabkost@xxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |