From: David Woodhouse <dwmw2@infradead.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eduardo Habkost <eduardo@habkost.net>,
Marcelo Tosatti <mtosatti@redhat.com>,
paul@xen.org
Subject: Re: [RFC] Notify IRQ sources of level interrupt ack/EOI
Date: Wed, 11 Jan 2023 19:50:15 +0000 [thread overview]
Message-ID: <790c6618cb25dd9b866fd1788ec4fa839134eba0.camel@infradead.org> (raw)
In-Reply-To: <20230111124319.405bf5ef.alex.williamson@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]
On Wed, 2023-01-11 at 12:43 -0700, Alex Williamson wrote:
> On Wed, 11 Jan 2023 19:08:44 +0000
> David Woodhouse <dwmw2@infradead.org> wrote:
>
> > On Wed, 2023-01-11 at 11:29 -0700, Alex Williamson wrote:
> > >
> > > Nice. IIRC, we ended up with the hack solution we have today in vfio
> > > because there was too much resistance to callbacks that were only
> > > necessary for vfio in the past. Once we had KVM resampling support,
> > > it simply wasn't worth the effort for a higher latency solution to
> > > fight that battle, so we implemented what could best be described as
> > > a universal workaround embedded in vfio.
> > >
> > > Clearly a callback is preferable, and yes, that's how we operate with
> > > KVM resampling and unmasking INTx, so in theory plumbing this to our
> > > existing eoi callback and removing the region toggling ought to do
> > > the right thing. Thanks,
> >
> > Well, I'm happy for the Xen support be a second use case which means
> > it's no longer "only necessary for VFIO", and keep prodding at it if
> > that's going to be useful...
>
> Welcome aboard. I take it from your cover letter than non-x86
> architectures would be on your todo list. Ideally the ack callback
> would simply be a requirement for any implementation of a new interrupt
> controller, but that's where we get into striking a balance of device
> assignment imposing requirements on arbitrary architectures that may or
> may not care, or even support, device assignment.
Right. We'd probably want to do it for those interrupt controllers
which could be behind PCI host controllers that might have VFIO devices
attached.
> This is the... dare I say, elegance of the region access hack. It's
> obviously not pretty or performant, but it universally provides an
> approximation of the behavior of an emulated device, ie. some form of
> guest access to the device is required to de-assert the interrupt.
>
> We probably need some way to detect the interrupt controller support
> for the callback mechanism so we can generate an appropriate user
> warning to encourage development of that support and fall back to our
> current hack for some degree of functionality. Thanks,
Yeah, I pondered that. It's not that hard to do; have the interrupt
controller indicate that a given qemu_irq supports EOI notifications,
and then when the VFIO or other event source calls
qemu_set_irq_ack_callback() it can get a failure which will cause it to
use the fallback mode.
Happy to look at wiring this up through the pci_set_irq() mechanisms if
it's not going to be rejected out of hand.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]
next prev parent reply other threads:[~2023-01-11 19:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 14:41 [RFC] Notify IRQ sources of level interrupt ack/EOI David Woodhouse
2023-01-11 16:25 ` Michael S. Tsirkin
2023-01-11 16:58 ` David Woodhouse
2023-01-11 18:29 ` Alex Williamson
2023-01-11 19:08 ` David Woodhouse
2023-01-11 19:43 ` Alex Williamson
2023-01-11 19:50 ` David Woodhouse [this message]
2023-01-11 20:00 ` Alex Williamson
2023-01-11 20:10 ` David Woodhouse
2023-01-12 8:05 ` 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=790c6618cb25dd9b866fd1788ec4fa839134eba0.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=alex.williamson@redhat.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).