]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - arch/arm/kvm/arm.c
arm64: KVM: Add PMU overflow interrupt routing
authorShannon Zhao <shannon.zhao@linaro.org>
Fri, 26 Feb 2016 11:29:19 +0000 (19:29 +0800)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:21 +0000 (18:34 +0000)
commitb02386eb7dac7555a208d81aef2a0e5c6f0f8085
treea3a06d842810134ac014da93fe78a161918cf2d1
parentd692b8ad6ec4814ddd9a37ce5c9c9d971e741088
arm64: KVM: Add PMU overflow interrupt routing

When calling perf_event_create_kernel_counter to create perf_event,
assign a overflow handler. Then when the perf event overflows, set the
corresponding bit of guest PMOVSSET register. If this counter is enabled
and its interrupt is enabled as well, kick the vcpu to sync the
interrupt.

On VM entry, if there is counter overflowed and interrupt level is
changed, inject the interrupt with corresponding level. On VM exit, sync
the interrupt level as well if it has been changed.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kvm/arm.c
include/kvm/arm_pmu.h
virt/kvm/arm/pmu.c