]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Add accessors to track guest/host only counters
authorAndrew Murray <andrew.murray@arm.com>
Tue, 9 Apr 2019 19:22:12 +0000 (20:22 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 24 Apr 2019 14:35:30 +0000 (15:35 +0100)
commitd043e3657ddeeee66be832c7cd5c09d728bec06c
treec96096fc7b28a5d0d5969e882a9cd39d946544b1
parente61e1f74e1dc47b8af201b1f40ea2438e4c584e2
arm64: KVM: Add accessors to track guest/host only counters

In order to effeciently switch events_{guest,host} perf counters at
guest entry/exit we add bitfields to kvm_cpu_context for guest and host
events as well as accessors for updating them.

A function is also provided which allows the PMU driver to determine
if a counter should start counting when it is enabled. With exclude_host,
we may only start counting when entering the guest.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/pmu.c [new file with mode: 0644]