From: Alex Williamson Date: Mon, 25 Jun 2012 15:40:39 +0000 (-0600) Subject: kvm: Don't abort on kvm_irqchip_add_msi_route() X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~3873^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df410675e5fad55e056fb505cba3a62cac13c411;p=sdk%2Femulator%2Fqemu.git kvm: Don't abort on kvm_irqchip_add_msi_route() Anyone using these functions has to be prepared that irqchip support may not be present. It shouldn't be up to the core code to determine whether this is a fatal error. Currently code written as: virq = kvm_irqchip_add_msi_route(...) if (virq < 0) { } else { } works on x86 with and without kvm irqchip enabled, works without kvm support compiled in, but aborts() on !x86 with kvm support. Signed-off-by: Alex Williamson Acked-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- diff --git a/kvm-all.c b/kvm-all.c index f8e4328..a0c33b3 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1142,7 +1142,7 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg) int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg) { - abort(); + return -ENOSYS; } static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)