]> 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)
commit07258a07d77ab11a41c7a5eb99a49fa388752c6d
treefbc93a72c8d17e9b3305a9ce31a11246634b66eb
parentf8bd62541485f3c545d8aec084a66c20a4150dda
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