From: David Woodhouse <dwmw2@infradead.org>
To: Peter Xu <peterx@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update
Date: Fri, 10 Mar 2023 17:52:57 +0000 [thread overview]
Message-ID: <e8d8950b45cf35f16f3e9d3af979af1ea2ccead6.camel@infradead.org> (raw)
In-Reply-To: <ZAoPlRMlcO4fm5rJ@x1n>
[-- Attachment #1: Type: text/plain, Size: 993 bytes --]
On Thu, 2023-03-09 at 11:55 -0500, Peter Xu wrote:
>
> There're four devices that can hook onto this, IIUC. Besides IOAPIC and
> VFIO, there's also ivshmem and vhost. IIUC we'll need to change all the
> four devices to implement this.
If you grep for kvm_irqchip_add_irqfd_notifier() there are more than that.
There's a bunch of largely duplicated code, with different code paths
for kvm_irqfds_enabled() and other variants. In code that I don't think
should even have to *know* about KVM, should it?
I think I'd like to provide a generic set of helpers which just allow
callers to register a virtual IRQ and then trigger it manually and/or
attach an irqfd (and a resamplefd, qv) to it.
This new helper code can then cope with listening in userspace on that
fd if/when it needs to, and can even work for the non-KVM case. The
actual devices get a *lot* simpler.
It'll *broadly* look like the existing kvm_irqchip_* functions but be a
lot simpler to use.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]
next prev parent reply other threads:[~2023-03-10 17:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-05 18:43 [PATCH] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update David Woodhouse
2023-03-05 22:36 ` Peter Xu
2023-03-06 6:51 ` David Woodhouse
2023-03-06 9:25 ` David Woodhouse
2023-03-06 16:39 ` Peter Xu
2023-03-06 17:28 ` David Woodhouse
2023-03-08 23:09 ` Peter Xu
2023-03-09 9:16 ` David Woodhouse
2023-03-09 16:55 ` Peter Xu
2023-03-09 19:56 ` David Woodhouse
2023-03-10 17:52 ` David Woodhouse [this message]
2023-03-10 20:13 ` Peter Xu
2023-03-11 10:40 ` David Woodhouse
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=e8d8950b45cf35f16f3e9d3af979af1ea2ccead6.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@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 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).