From: Klaus Jensen <its@irrelevant.dk>
To: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Cc: qemu-devel@nongnu.org, Keith Busch <kbusch@kernel.org>,
qemu-block@nongnu.org, stefanha@gmail.com,
Klaus Jensen <k.jensen@samsung.com>
Subject: Re: [PATCH v3 0/2] hw/nvme: add irqfd support
Date: Fri, 26 Aug 2022 08:50:16 +0200 [thread overview]
Message-ID: <YwhtKH2/emkJssUG@apples> (raw)
In-Reply-To: <22035CA1-E374-4DB7-809C-569E5BC41DC0@ict.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
On Aug 26 10:03, Jinhao Fan wrote:
> at 4:14 AM, Klaus Jensen <its@irrelevant.dk> wrote:
>
> > From: Klaus Jensen <k.jensen@samsung.com>
> >
> > This is a re-spin of Jinhao's irqfd support series that fixes msix
> > vector masking/unmasking to work correctly.
> >
> > I kept being bugged out about that msi route not getting updated, so I
> > hit the code into submission with a hammer.
> >
> > I finally noticed the core issue:
> >
> > 1. The vector notifiers was never set because msix is not enabled at
> > the point where nvme_init_pci() is called.
> >
> > Move this call to nvme_start_ctrl().
> >
> > Since the unmask callback was suddenly getting called now, another fix
> > was needed:
> >
> > 2. Call kvm_irqchip_add_irqfd_notifier_gsi() in the unmask handler -
> > not in nvme_init_irq_notifier(). The vectors may potentially be
> > masked/unmasked and shall cause a pair of add_irqfd and
> > remove_irqfd calls. Removing it from nvme_init_irq_notifier() makes
> > sure we do not try to double add.
> >
> > Now it does what it is supposed to; no hacks required :)
> >
> > Jinhao Fan (2):
> > hw/nvme: support irq(de)assertion with eventfd
> > hw/nvme: use KVM irqfd when available
> >
> > hw/nvme/ctrl.c | 261 ++++++++++++++++++++++++++++++++++++++++---
> > hw/nvme/nvme.h | 6 +
> > hw/nvme/trace-events | 3 +
> > 3 files changed, 253 insertions(+), 17 deletions(-)
> >
> > --
> > 2.37.2
>
> This patch series works well on my machine without a vIOMMU.
>
> Just to confirm my understanding, the workflow of updating msi route is:
> Host driver update MSI msg and addr -> unmask callback get called ->
> kvm_irqchip_update_msi_route() does the work. Right?
>
Yes :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-08-26 6:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 20:14 [PATCH v3 0/2] hw/nvme: add irqfd support Klaus Jensen
2022-08-25 20:14 ` [PATCH v3 1/2] hw/nvme: support irq(de)assertion with eventfd Klaus Jensen
2022-08-25 20:14 ` [PATCH v3 2/2] hw/nvme: use KVM irqfd when available Klaus Jensen
2022-08-26 2:03 ` [PATCH v3 0/2] hw/nvme: add irqfd support Jinhao Fan
2022-08-26 6:50 ` Klaus Jensen [this message]
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=YwhtKH2/emkJssUG@apples \
--to=its@irrelevant.dk \
--cc=fanjinhao21s@ict.ac.cn \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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.