qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] xen: Fix xenpv machine initialisation


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH] xen: Fix xenpv machine initialisation
Date: Mon, 7 Nov 2016 12:53:29 -0800 (PST)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

On Mon, 7 Nov 2016, Anthony PERARD wrote:
> 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>

What about moving the acpi_build_enabled initialization to
xen_hvm_init?


> 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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]