[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/5] x86/vmsi: use the newly introduced EOI callbacks


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 24 Aug 2020 16:44:40 +0200
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Mon, 24 Aug 2020 14:45:07 +0000
  • Ironport-sdr: 2GrgPmNRa7AoNBmtjhM3rGhUGXhQIAAFGhH0nNr1DlSchTOq3sir1QyKaY1M70+PIiVfkTziLE afN+YlkuQCpNDONFcAgubEVS7Yj+fu6h5oEolRWDr8dEQ80K9eQxlpgirW+nkx8iJlhN11V8xO /ETXKLjlAYy+1zSBT8oRljTafTQkdLCD/cq0HyBr6z9bGFJzELteVKO577Z5/utULnEcnCqZj2 NN7KddSc+erh9+LP+cMYsRqcIisXcIMwXudZCbNG3yx2gN7cV6xFUoAOdzgy/G7l0kMJnoV+Bw Lj8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.