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

[PATCH 0/5] x86/vlapic: implement EOI callbacks


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 12 Aug 2020 14:47:04 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Wed, 12 Aug 2020 12:47:47 +0000
  • Ironport-sdr: eQF8/pzrQcNFuF6uJe2x0NvD3NslssVOzSaYIGeejvp0pJr7qNHkfYYMe1jMYB9SLgszFr13vJ xRpSI6z3GNIFpdrflqNkLzOIdaDxoBiyD2jsIrDTxwKR4wfhXSpcDCRvFITpJDzU7T05YJjqr4 2RPc1R3y3uyuWk+WJCnq/1gDjAhCOBw0+Qqc6NQpXd4Q7XUf44vmkW4bJRjNn50zlgSTGCqXuf hCkFHLbG7kptRIekcRDhv8oIyeawjt1/bugvwcBuqX2yBgDn5RQIS95Xnii7SGNkVKbAiENbaT LBU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

The following series attempts to implement EOI callbacks for vlapic
injected vectors, this allows to remove the hardcoded callbacks in
vlapic_handle_EOI. Instead a new vlapic vector injection helper is
provided, that takes two extra parameters in order to pass a callback and
an opaque data blob that will be called once the vector is EOI'ed by the
guest.

My plan with this is to be able to provide EOI callbacks for all
interrupt types that we inject to the guest, this is only the first step
of that work by changing the emulated lapic to use this model. The
IO-APIC and PIC still need to be switched to a similar model.

Long term having such callbacks would greatly simplify the virtual
periodic timers code, as being able to get a callback when the injected
interrupt is EOI'ed simplifies the handling of missed ticks, as we would
no longer need to check at each vmentry whether a virtual interrupt
timer is being injected.

Thanks, Roger.

Roger Pau Monne (5):
  x86/hvm: change EOI exit bitmap helper parameter
  x86/vlapic: introduce an EOI callback mechanism
  x86/vmsi: use the newly introduced EOI callbacks
  x86/viridian: switch synic to use the new EOI callback
  x86/vioapic: switch to use the EOI callback mechanism

 xen/arch/x86/hvm/vioapic.c         | 90 +++++++++++++++---------------
 xen/arch/x86/hvm/viridian/synic.c  | 28 +++++-----
 xen/arch/x86/hvm/vlapic.c          | 61 ++++++++++++++++----
 xen/arch/x86/hvm/vmsi.c            | 36 +++++++-----
 xen/arch/x86/hvm/vmx/vmx.c         |  4 +-
 xen/drivers/passthrough/io.c       |  4 +-
 xen/include/asm-x86/hvm/hvm.h      |  2 +-
 xen/include/asm-x86/hvm/io.h       |  2 +-
 xen/include/asm-x86/hvm/viridian.h |  1 -
 xen/include/asm-x86/hvm/vlapic.h   | 10 ++++
 10 files changed, 150 insertions(+), 88 deletions(-)

-- 
2.28.0




 


Rackspace

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