From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: avi@redhat.com, kvm@vger.kernel.org, amit.shah@redhat.com
Subject: Re: [PATCH] qemu-kvm: fix error handling in msix vector add
Date: Sat, 25 Jul 2009 12:30:52 -0300 [thread overview]
Message-ID: <20090725153052.GB4429@amt.cnet> (raw)
In-Reply-To: <20090723133413.GA12944@redhat.com>
On Thu, Jul 23, 2009 at 04:34:13PM +0300, Michael S. Tsirkin wrote:
> When adding a vector fails, the used counter should
> not be incremented, otherwise on vector change we will
> try to update the routing entry.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Applied, thanks.
> ---
> hw/msix.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/msix.c b/hw/msix.c
> index 5f77dc9..47cbdc7 100644
> --- a/hw/msix.c
> +++ b/hw/msix.c
> @@ -502,13 +502,19 @@ void msix_reset(PCIDevice *dev)
> /* Mark vector as used. */
> int msix_vector_use(PCIDevice *dev, unsigned vector)
> {
> + int ret;
> if (vector >= dev->msix_entries_nr)
> return -EINVAL;
> - if (dev->msix_entry_used[vector]++)
> + if (dev->msix_entry_used[vector]) {
> return 0;
> + }
> if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
> - return kvm_msix_add(dev, vector);
> + ret = kvm_msix_add(dev, vector);
> + if (ret) {
> + return ret;
> + }
> }
> + ++dev->msix_entry_used[vector];
> return 0;
> }
>
> --
> 1.6.2.5
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-07-25 15:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 13:34 [PATCH] qemu-kvm: fix error handling in msix vector add Michael S. Tsirkin
2009-07-25 15:30 ` Marcelo Tosatti [this message]
2009-07-28 13:22 ` Michael S. Tsirkin
2009-07-28 13:31 ` Marcelo Tosatti
2009-09-07 7:05 ` Mark McLoughlin
2009-09-09 12:08 ` Avi Kivity
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=20090725153052.GB4429@amt.cnet \
--to=mtosatti@redhat.com \
--cc=amit.shah@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.