[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route() |
Date: |
Mon, 25 Jun 2012 22:28:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-06-25 17:40, Alex Williamson wrote:
> 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: Alex Williamson <address@hidden>
> ---
>
> kvm-all.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 45d00cd..b2ed702 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1146,7 +1146,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)
>
Acked-by: Jan Kiszka <address@hidden>
signature.asc
Description: OpenPGP digital signature