From: Klaus Jensen <its@irrelevant.dk>
To: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
Keith Busch <kbusch@kernel.org>
Subject: Re: [RFC] hw/nvme: Use irqfd to send interrupts
Date: Tue, 2 Aug 2022 07:29:55 +0200 [thread overview]
Message-ID: <Yui2Uz8Gwdt8XZ6f@apples> (raw)
In-Reply-To: <732EF0E5-C936-43C0-8619-E8B6E565716F@ict.ac.cn>
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
On Aug 2 12:03, Jinhao Fan wrote:
> at 6:21 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
> > What happens when the MSI-X vector is masked?
> >
> > I remember the VIRTIO code having masking support. I'm on my phone and can't check now, but I think it registers a temporary eventfd and buffers irqs while the vector is masked.
>
> Hi Stefan,
>
> While implementing interrupt masking support, I found it hard to test this
> feature on the host. Keith told me that no NVMe drivers are currently using
> this feature. Do you remember how you tested interrupt masking?
>
You can probably do this with qtest. I don't see a helper for masking
the vectors, but qpci_msix_masked() should be usable as a base for just
changing that readl to a writel and mask it out.
This should allow you to do a relatively simple test case where you
1. bootstrap the device as simple as possible (forget about I/O
queues) - I *think* you just need to use guest_alloc for the admin
queue memory, use qpci_msix_enable() etc.
2. setup a simple admin command in the queue
3. mask the interrupt
4. ring the doorbell (a writel)
5. check that the vector remains in pending state
(qpci_msix_pending()).
This *could* be a potential way to do this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-08-02 5:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 4:35 [RFC] hw/nvme: Use irqfd to send interrupts Jinhao Fan
2022-07-12 12:26 ` Klaus Jensen
2022-07-14 4:18 ` Klaus Jensen
2022-07-14 14:31 ` Jinhao Fan
2022-07-20 9:19 ` Jinhao Fan
2022-07-20 10:21 ` Stefan Hajnoczi
2022-07-21 2:36 ` Jinhao Fan
2022-07-21 13:29 ` Stefan Hajnoczi
2022-07-24 15:20 ` Jinhao Fan
2022-07-24 19:36 ` Stefan Hajnoczi
2022-07-25 2:48 ` Jinhao Fan
2022-07-27 7:18 ` Klaus Jensen
2022-07-27 15:18 ` Stefan Hajnoczi
2022-07-28 15:34 ` Jinhao Fan
2022-07-28 15:38 ` Stefan Hajnoczi
2022-08-02 4:03 ` Jinhao Fan
2022-08-02 5:29 ` Klaus Jensen [this message]
2022-08-08 2:23 ` Jinhao Fan
2022-08-09 15:31 ` 樊金昊
2022-08-09 16:21 ` Keith Busch
2022-08-09 16:40 ` 樊金昊
2022-08-09 16:48 ` 樊金昊
2022-08-09 17:01 ` Keith Busch
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=Yui2Uz8Gwdt8XZ6f@apples \
--to=its@irrelevant.dk \
--cc=fanjinhao21s@ict.ac.cn \
--cc=kbusch@kernel.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).