From dced4d2fcb3961358b12ec3a191dd04505f333af Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 14 Jan 2016 16:09:38 +0100 Subject: xen-hvm: Clean up xen_hvm_init() error handling xen_hvm_init() returns -1 without cleaning up on some errors (harmless long as the caller exit()s on error), dies with hw_error() on others. hw_error() isn't approprate here. Clean up to exit() on all errors. Signed-off-by: Markus Armbruster Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- hw/i386/pc_piix.c | 5 ++--- hw/i386/pc_q35.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'hw/i386') diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df2b824385..db0ae9cc91 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -121,9 +121,8 @@ static void pc_init1(MachineState *machine, pcms->below_4g_mem_size = machine->ram_size; } - if (xen_enabled() && xen_hvm_init(pcms, &ram_memory) != 0) { - fprintf(stderr, "xen hardware virtual machine initialisation failed\n"); - exit(1); + if (xen_enabled()) { + xen_hvm_init(pcms, &ram_memory); } pc_cpus_init(pcms); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 412b3cd375..abbcbf9e86 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -111,9 +111,8 @@ static void pc_q35_init(MachineState *machine) pcms->below_4g_mem_size = machine->ram_size; } - if (xen_enabled() && xen_hvm_init(pcms, &ram_memory) != 0) { - fprintf(stderr, "xen hardware virtual machine initialisation failed\n"); - exit(1); + if (xen_enabled()) { + xen_hvm_init(pcms, &ram_memory); } pc_cpus_init(pcms); -- cgit v1.2.3