Commit df410675 authored by Alex Williamson's avatar Alex Williamson Committed by Marcelo Tosatti
Browse files

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) {
    <slow path>
} else {
    <fast path>
}

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: default avatarAlex Williamson <alex.williamson@redhat.com>
Acked-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 71ea2e01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)