[PATCH 0/2] KVM: arm64: Hide absent PMU registers from userspace

Marc Zyngier maz at kernel.org
Wed Jan 6 12:22:26 EST 2021


We're now able to hide PMU registers from the guest when no PMU is
available, but I just realised that we don't do the same thing for
userspace, which is pretty annoying (as it ends up with garbage).

The first patch introduces a visibility callback for all PMU regs,
which applies to both guest and userspace. That's what I should have
done the first place.

The second patch is only a cleanup, now that we are doing the right
thing.

This is a potential fix for 5.11, so shout if you spot something!

Thanks,

	M.

Marc Zyngier (2):
  KVM: arm64: Hide PMU registers from userspace when not available
  KVM: arm64: Simplify handling of absent PMU system registers

 arch/arm64/kvm/sys_regs.c | 76 +++++++++++++++++++++++++--------------
 1 file changed, 49 insertions(+), 27 deletions(-)

-- 
2.29.2




More information about the linux-arm-kernel mailing list