All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] KVM: arm/arm64: vgic: Improvements and optimizations
@ 2017-03-20 10:58 ` Christoffer Dall
  0 siblings, 0 replies; 56+ messages in thread
From: Christoffer Dall @ 2017-03-20 10:58 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel
  Cc: Marc Zyngier, Andre Przywara, Christoffer Dall, kvm

We can improve the performance of our VGIC implementation a bit and
clean up a lot of the implementation while we're at it.

At first, patch 1 may seem excessive for a single register, the VMCR,
but whlie it adds complexity it does move logic out of the critical path
and into the vcpu_load/put hooks, which are executed much more rarely.
It also provides an infrastructure to move more things into the
vgic_load/put functions later one.

Avoiding the need to take a spinlock in the common case where there are
no virtual interrupts in flight are actually measurable and well worth
the effort.

The implementation cleanups boil down to maintaining a single count of
the used lrs instead of an additional bitmap, avoiding the need to deel
with the MISR and EISR fields, and doing an early init of the VGIC to
avoid a number of vgic_initialized() checks.

Tested on Mustang and TC2, and Thunder-X.

Patches also available on:
git://git.kernel.org/pub/scm/linux/kernel/git/cdall/linux.git gic-optimize

Thanks,
-Christoffer

Christoffer Dall (8):
  KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put
  KVM: arm/arm64: vgic: Get rid of live_lrs
  KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance
    operation
  KVM: arm/arm64: vgic: Get rid of unnecessary save_maint_int_state
  KVM: arm/arm64: vgic: Get rid of MISR and EISR fields
  KVM: arm/arm64: vgic: Implement early VGIC init functionality
  KVM: arm/arm64: vgic: Don't check vgic_initialized in flush_hwstate
  KVM: arm/arm64: vgic: Improve sync_hwstate performance

Shih-Wei Li (1):
  KVM: arm/arm64: vgic: Avoid flushing vgic state when there's no
    pending IRQ

 arch/arm/include/asm/kvm_asm.h   |   3 ++
 arch/arm/kvm/arm.c               |  11 ++--
 arch/arm64/include/asm/kvm_asm.h |   2 +
 include/kvm/arm_vgic.h           |   9 ++--
 virt/kvm/arm/hyp/vgic-v2-sr.c    |  78 +++-------------------------
 virt/kvm/arm/hyp/vgic-v3-sr.c    |  79 +++++++---------------------
 virt/kvm/arm/vgic/vgic-init.c    | 108 ++++++++++++++++++++++++---------------
 virt/kvm/arm/vgic/vgic-v2.c      | 101 ++++++++++++++++++++----------------
 virt/kvm/arm/vgic/vgic-v3.c      |  89 +++++++++++++++++++-------------
 virt/kvm/arm/vgic/vgic.c         |  44 +++++++++++++---
 virt/kvm/arm/vgic/vgic.h         |  10 +++-
 11 files changed, 261 insertions(+), 273 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 56+ messages in thread

end of thread, other threads:[~2017-03-21 14:13 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 10:58 [PATCH 0/9] KVM: arm/arm64: vgic: Improvements and optimizations Christoffer Dall
2017-03-20 10:58 ` Christoffer Dall
2017-03-20 10:58 ` [PATCH 1/9] KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 10:29   ` Marc Zyngier
2017-03-21 10:29     ` Marc Zyngier
2017-03-21 11:16     ` Christoffer Dall
2017-03-21 11:16       ` Christoffer Dall
2017-03-20 10:58 ` [PATCH 2/9] KVM: arm/arm64: vgic: Avoid flushing vgic state when there's no pending IRQ Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 10:57   ` Marc Zyngier
2017-03-21 10:57     ` Marc Zyngier
2017-03-21 11:17     ` Christoffer Dall
2017-03-21 11:17       ` Christoffer Dall
2017-03-20 10:58 ` [PATCH 3/9] KVM: arm/arm64: vgic: Get rid of live_lrs Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 11:06   ` Marc Zyngier
2017-03-21 11:06     ` Marc Zyngier
2017-03-20 10:58 ` [PATCH 4/9] KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance operation Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 11:36   ` Marc Zyngier
2017-03-21 11:36     ` Marc Zyngier
2017-03-21 12:26     ` [PATCH 4/9] KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance operationjjjj Christoffer Dall
2017-03-21 12:26       ` Christoffer Dall
2017-03-21 13:26       ` Marc Zyngier
2017-03-21 13:26         ` Marc Zyngier
2017-03-21 14:10         ` Christoffer Dall
2017-03-21 14:10           ` Christoffer Dall
2017-03-20 10:58 ` [PATCH 5/9] KVM: arm/arm64: vgic: Get rid of unnecessary save_maint_int_state Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 11:44   ` Marc Zyngier
2017-03-21 11:44     ` Marc Zyngier
2017-03-20 10:58 ` [PATCH 6/9] KVM: arm/arm64: vgic: Get rid of MISR and EISR fields Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 11:45   ` Marc Zyngier
2017-03-21 11:45     ` Marc Zyngier
2017-03-20 10:58 ` [PATCH 7/9] KVM: arm/arm64: vgic: Implement early VGIC init functionality Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 12:05   ` Marc Zyngier
2017-03-21 12:05     ` Marc Zyngier
2017-03-21 12:29     ` Christoffer Dall
2017-03-21 12:29       ` Christoffer Dall
2017-03-21 13:30       ` Marc Zyngier
2017-03-21 13:30         ` Marc Zyngier
2017-03-20 10:58 ` [PATCH 8/9] KVM: arm/arm64: vgic: Don't check vgic_initialized in flush_hwstate Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 12:08   ` Marc Zyngier
2017-03-21 12:08     ` Marc Zyngier
2017-03-21 12:30     ` Christoffer Dall
2017-03-21 12:30       ` Christoffer Dall
2017-03-20 10:58 ` [PATCH 9/9] KVM: arm/arm64: vgic: Improve sync_hwstate performance Christoffer Dall
2017-03-20 10:58   ` Christoffer Dall
2017-03-21 13:29   ` Marc Zyngier
2017-03-21 13:29     ` Marc Zyngier
2017-03-21 14:13     ` Christoffer Dall
2017-03-21 14:13       ` Christoffer Dall

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.