All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Ladi Prosek <lprosek@redhat.com>
Cc: qemu-devel@nongnu.org, geoff@hostfission.com,
	pbonzini@redhat.com, marcandre.lureau@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/3] ivshmem: Don't update non-existent MSI routes
Date: Mon, 13 Nov 2017 15:22:40 +0100	[thread overview]
Message-ID: <8760aeb6mn.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20171110173421.17904-2-lprosek@redhat.com> (Ladi Prosek's message of "Fri, 10 Nov 2017 18:34:19 +0100")

Ladi Prosek <lprosek@redhat.com> writes:

> As of commit 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications"),
> QEMU crashes with:
>
>   kvm_irqchip_commit_routes: Assertion `ret == 0' failed.
>
> if the ivshmem device is configured with more vectors than what the server
> supports. This is caused by the ivshmem_vector_unmask() being called on
> vectors that have not been initialized by ivshmem_add_kvm_msi_virq().
>
> This commit fixes it by adding a simple check to the mask and unmask
> callbacks.
>
> Note that the opposite mismatch, if the server supplies more vectors than
> what the device is configured for, is already handled and leads to output
> like:
>
>   Too many eventfd received, device has 1 vectors
>
> Fixes: 660c97eef6f8 ("ivshmem: use kvm irqfd for msi notifications")
> Signed-off-by: Ladi Prosek <lprosek@redhat.com>

I think I understand your description of what's wrong.  Not obvious to
me is how it can happen.  The cover letter mentions a Windows ivshmem
driver.  Is this a device bug a driver can trigger?  If yes, how?

  parent reply	other threads:[~2017-11-13 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 17:34 [Qemu-devel] [PATCH 0/3] ivshmem: MSI bug fixes Ladi Prosek
2017-11-10 17:34 ` [Qemu-devel] [PATCH 1/3] ivshmem: Don't update non-existent MSI routes Ladi Prosek
2017-11-10 18:10   ` Marc-André Lureau
2017-11-10 20:04   ` geoff
2017-11-13 14:22   ` Markus Armbruster [this message]
2017-11-13 14:38     ` Ladi Prosek
2017-11-13 17:26       ` Markus Armbruster
2017-11-10 17:34 ` [Qemu-devel] [PATCH 2/3] ivshmem: Always remove irqfd notifiers Ladi Prosek
2017-11-13 14:36   ` Markus Armbruster
2017-11-13 14:40     ` Ladi Prosek
2017-11-10 17:34 ` [Qemu-devel] [PATCH 3/3] ivshmem: Improve MSI irqfd error handling Ladi Prosek
2017-11-13 17:27   ` Markus Armbruster
2017-11-13 17:47     ` geoff
2017-11-14  7:37       ` Markus Armbruster

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=8760aeb6mn.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=geoff@hostfission.com \
    --cc=lprosek@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@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 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.