KVM: arm64: Delay the polling of the GICR_VPENDBASER.Dirty bit
authorShenming Lu <lushenming@huawei.com>
Sat, 28 Nov 2020 14:18:57 +0000 (22:18 +0800)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Nov 2020 11:18:29 +0000 (11:18 +0000)
commit57e3cebd022fbc035dcf190ac789fd2ffc747f5b
treea566c7a05f60d395cc47e072fdd8e1d600bb535e
parentbf118a5cb7e6d17e7ec9492e4dc676e7e7b69d01
KVM: arm64: Delay the polling of the GICR_VPENDBASER.Dirty bit

In order to reduce the impact of the VPT parsing happening on the GIC,
we can split the vcpu reseidency in two phases:

- programming GICR_VPENDBASER: this still happens in vcpu_load()
- checking for the VPT parsing to be complete: this can happen
  on vcpu entry (in kvm_vgic_flush_hwstate())

This allows the GIC and the CPU to work in parallel, rewmoving some
of the entry overhead.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Shenming Lu <lushenming@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201128141857.983-3-lushenming@huawei.com
arch/arm64/kvm/vgic/vgic-v4.c
arch/arm64/kvm/vgic/vgic.c
drivers/irqchip/irq-gic-v3-its.c
drivers/irqchip/irq-gic-v4.c
include/kvm/arm_vgic.h
include/linux/irqchip/arm-gic-v4.h