public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org, mtosatti@redhat.com,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route()
Date: Mon, 25 Jun 2012 22:28:58 +0200	[thread overview]
Message-ID: <4FE8CA0A.7000005@web.de> (raw)
In-Reply-To: <20120625154024.3598.7168.stgit@bling.home>

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

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 <alex.williamson@redhat.com>
> ---
> 
>  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 <jan.kiszka@siemens.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2012-06-25 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 15:40 [PATCH] kvm: Don't abort on kvm_irqchip_add_msi_route() Alex Williamson
2012-06-25 20:28 ` Jan Kiszka [this message]
2012-06-29 23:02 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE8CA0A.7000005@web.de \
    --to=jan.kiszka@web.de \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox