]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Hide PMU registers from userspace when not available
authorMarc Zyngier <maz@kernel.org>
Wed, 6 Jan 2021 17:22:27 +0000 (17:22 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 14 Jan 2021 11:02:51 +0000 (11:02 +0000)
commit0f271584b2979ad7f573aaf507d7d62485ab54d4
treefbc93a72c8d17e9b3305a9ce31a11246634b66eb
parent986e45d8867a0ef36c26e56c11ac912da1675127
KVM: arm64: Hide PMU registers from userspace when not available

It appears that while we are now able to properly hide PMU
registers from the guest when a PMU isn't available (either
because none has been configured, the host doesn't have
the PMU support compiled in, or that the HW doesn't have
one at all), we are still exposing more than we should to
userspace.

Introduce a visibility callback gating all the PMU registers,
which covers both usrespace and guest.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c