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

[Xen-changelog] [qemu-xen master] xen: Fix xenpv machine initialisation



commit 4220231eb22235e757d269722b9f6a594fbcb70f
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Tue Nov 8 14:07:22 2016 +0000
Commit:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Thu Nov 24 12:24:26 2016 +0000

    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. Moving the code
    to xen_hvm_init() fix the issue.
    
    This fix 021746c131cdfeab9d82ff918795a9f18d20d7ae.
    
    upstream-commit-id: 804ba7c10bbc66bb8a8aa73ecc60f620da7423d5
    
    Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
    Reviewed-by: Eduardo Habkost <ehabkost@xxxxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen-common.c | 6 ------
 xen-hvm.c    | 4 ++++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/xen-common.c b/xen-common.c
index b1858d7..e641ad1 100644
--- a/xen-common.c
+++ b/xen-common.c
@@ -9,7 +9,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/i386/pc.h"
 #include "hw/xen/xen_backend.h"
 #include "qmp-commands.h"
 #include "sysemu/char.h"
@@ -115,11 +114,6 @@ static void xen_change_state_handler(void *opaque, int 
running,
 
 static int xen_init(MachineState *ms)
 {
-    PCMachineState *pcms = PC_MACHINE(ms);
-
-    /* Disable ACPI build because Xen handles it */
-    pcms->acpi_build_enabled = false;
-
     xen_xc = xc_interface_open(0, 0, 0);
     if (xen_xc == NULL) {
         xen_be_printf(NULL, 0, "can't open xen interface\n");
diff --git a/xen-hvm.c b/xen-hvm.c
index 097007d..99b8ee8 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -1330,6 +1330,10 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion 
**ram_memory)
     }
     xen_be_register_common();
     xen_read_physmap(state);
+
+    /* Disable ACPI build because Xen handles it */
+    pcms->acpi_build_enabled = false;
+
     return;
 
 err:
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.