qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Jinhao Fan <fanjinhao21s@ict.ac.cn>,
	qemu-devel@nongnu.org, stefanha@gmail.com,
	Klaus Jensen <k.jensen@samsung.com>,
	"open list:nvme" <qemu-block@nongnu.org>
Subject: Re: [PATCH v2 2/3] hw/nvme: use KVM irqfd when available
Date: Fri, 26 Aug 2022 17:58:29 +0200	[thread overview]
Message-ID: <YwjtpXaf0vfZVfSi@apples> (raw)
In-Reply-To: <YwjsuPTNd/1pOdjF@kbusch-mbp.dhcp.thefacebook.com>

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

On Aug 26 09:54, Keith Busch wrote:
> On Fri, Aug 26, 2022 at 05:45:21PM +0200, Klaus Jensen wrote:
> > On Aug 26 09:34, Keith Busch wrote:
> > > On Fri, Aug 26, 2022 at 11:12:04PM +0800, Jinhao Fan wrote:
> > > > Use KVM's irqfd to send interrupts when possible. This approach is
> > > > thread safe. Moreover, it does not have the inter-thread communication
> > > > overhead of plain event notifiers since handler callback are called
> > > > in the same system call as irqfd write.
> > > > 
> > > > Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
> > > > Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
> > > 
> > > No idea what's going on here... This one is causing the following assert
> > > failure with --enable-kvm:
> > > 
> > >   qemu-system-x86_64: ../accel/kvm/kvm-all.c:1781: kvm_irqchip_commit_routes: Assertion `ret == 0' failed.
> > > 
> > > I find it calls KVM_SET_GSI_ROUTING ioctl with gsi set to KVM_IRQ_ROUTING_MSI,
> > > and linux kernel returns EINVAL in that case. It's never set that way without
> > > this patch. Am I the only one seeing this?
> > 
> > Argh, sorry, I threw that patch together a bit too quickly. I was just
> > so pumped because I believed I had solved the issue hehe.
> > 
> > Are you missing the ioeventfd=on and irq-eventfd=on parameters by any
> > chance? Without those I'm also getting an assertion, but a different one
> 
> I had not enabled those yet. This was purely a regrsession test with my
> previously working paramaters for a sanity check.
> 

Yeah, sorry, I just threw it out there with tunnel vision on the kvm
irq part, not doing my due diligence ;)

I'll fix it up!

> If I enable those new nvme parameters, then it is successful.

Great :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-08-26 16:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26 15:12 [PATCH v2 0/3] iothread and irqfd support Jinhao Fan
2022-08-26 15:12 ` [PATCH v2 1/3] hw/nvme: support irq(de)assertion with eventfd Jinhao Fan
2022-08-26 15:12 ` [PATCH v2 2/3] hw/nvme: use KVM irqfd when available Jinhao Fan
2022-08-26 15:34   ` Keith Busch
2022-08-26 15:45     ` Klaus Jensen
2022-08-26 15:54       ` Keith Busch
2022-08-26 15:58         ` Klaus Jensen [this message]
2022-08-26 16:04     ` Jinhao Fan
2022-08-27  8:28     ` Jinhao Fan
2022-08-26 15:12 ` [PATCH v2 3/3] hw/nvme: add iothread support Jinhao Fan
  -- strict thread matches above, loose matches on Subject: below --
2022-08-25  7:47 [PATCH v2 0/3] hw/nvme: add irqfd support Jinhao Fan
2022-08-25  7:47 ` [PATCH v2 2/3] hw/nvme: use KVM irqfd when available Jinhao Fan

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=YwjtpXaf0vfZVfSi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).