From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>,
Paul Durrant <paul@xen.org>
Subject: Re: [PATCH 3/5] x86/vmsi: use the newly introduced EOI callbacks
Date: Mon, 24 Aug 2020 16:44:40 +0200 [thread overview]
Message-ID: <20200824144440.GD1587@Air-de-Roger> (raw)
In-Reply-To: <0d3afbb2-a2a8-f570-6f59-fd3c3d56e6dd@suse.com>
On Mon, Aug 24, 2020 at 04:06:31PM +0200, Jan Beulich wrote:
> On 12.08.2020 14:47, Roger Pau Monne wrote:
> > Remove the unconditional call to hvm_dpci_msi_eoi in vlapic_handle_EOI
> > and instead use the newly introduced EOI callback mechanism in order
> > to register a callback for MSI vectors injected from passed through
> > devices.
>
> In patch 2 you merely invoke the callback when the EOI arrived,
> but you don't clear the callback (unless I've missed something).
> Here you register the callback once per triggering of the IRQ,
> without clearing it from the callback itself either.
It gets cleared on the next call to vlapic_set_irq_callback, or set to
a new callback value if the passed callback is not NULL.
> Why is it
> correct / safe to keep the callback registered?
The next vector injected is going to clear it, so should be safe, as
no vector can be injected without calling vlapic_set_irq_callback.
> What about
> conflicting callbacks for shared vectors?
In this callback model for vlapic only the last injected vector
callback would get executed. It's my understanding that lapic
vectors cannot be safely shared unless there's a higher level
interrupt controller (ie: an IO-APIC) that does the sharing.
I have further patches that also add EOI callbacks to vIO-APIC and
8259A PICs, so that all interrupt controllers can handle EOI
callbacks.
Thanks, Roger.
next prev parent reply other threads:[~2020-08-24 14:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 12:47 [PATCH 0/5] x86/vlapic: implement EOI callbacks Roger Pau Monne
2020-08-12 12:47 ` [PATCH 1/5] x86/hvm: change EOI exit bitmap helper parameter Roger Pau Monne
2020-08-13 14:12 ` Andrew Cooper
2020-08-14 5:56 ` Tian, Kevin
2020-08-12 12:47 ` [PATCH 2/5] x86/vlapic: introduce an EOI callback mechanism Roger Pau Monne
2020-08-13 14:33 ` Andrew Cooper
2020-08-13 17:41 ` Roger Pau Monné
2020-08-25 5:56 ` Jan Beulich
2020-08-12 12:47 ` [PATCH 3/5] x86/vmsi: use the newly introduced EOI callbacks Roger Pau Monne
2020-08-13 8:19 ` Paul Durrant
2020-08-13 8:50 ` Roger Pau Monné
2020-08-24 14:06 ` Jan Beulich
2020-08-24 14:44 ` Roger Pau Monné [this message]
2020-08-24 16:07 ` Jan Beulich
2020-08-24 16:39 ` Roger Pau Monné
2020-08-25 5:47 ` Jan Beulich
2020-08-12 12:47 ` [PATCH 4/5] x86/viridian: switch synic to use the new EOI callback Roger Pau Monne
2020-08-13 8:33 ` Paul Durrant
2020-08-13 8:57 ` Roger Pau Monné
2020-08-13 9:36 ` Paul Durrant
2020-08-12 12:47 ` [PATCH 5/5] x86/vioapic: switch to use the EOI callback mechanism Roger Pau Monne
2020-08-25 8:35 ` Jan Beulich
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=20200824144440.GD1587@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=paul@xen.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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 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.