1
0
Fork 0
alistair23-linux/arch/arm64
Marc Zyngier 2a5f1b67ec KVM: arm64: Don't access PMCR_EL0 when no PMU is available
We reset the guest's view of PMCR_EL0 unconditionally, based on
the host's view of this register. It is however legal for an
implementation not to provide any PMU, resulting in an UNDEF.

The obvious fix is to skip the reset of this shadow register
when no PMU is available, sidestepping the issue entirely.
If no PMU is available, the guest is not able to request
a virtual PMU anyway, so not doing nothing is the right thing
to do!

It is unlikely that this bug can hit any HW implementation
though, as they all provide a PMU. It has been found using nested
virt with the host KVM not implementing the PMU itself.

Fixes: ab9468340d ("arm64: KVM: Add access handler for PMCR register")
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201210083059.1277162-1-maz@kernel.org
2020-12-22 10:47:09 +00:00
..
boot arm64: dts: fsl-ls1028a-kontron-sl28: specify in-band mode for ENETC 2020-11-11 14:51:35 -08:00
configs arm64: defconfig: Build in CONFIG_GPIO_MXC by default 2020-10-26 15:48:58 +08:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07:00
include Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next 2020-12-09 10:00:24 +00:00
kernel Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next 2020-12-09 10:00:24 +00:00
kvm KVM: arm64: Don't access PMCR_EL0 when no PMU is available 2020-12-22 10:47:09 +00:00
lib arm64: uaccess cleanup macro naming 2020-12-02 19:49:11 +00:00
mm Merge remote-tracking branch 'origin/kvm-arm64/psci-relay' into kvmarm-master/next 2020-12-09 10:00:24 +00:00
net arm64: bpf: Fix branch offset in JIT 2020-09-17 12:05:36 +01:00
xen arm64: xen: Use modern annotations for assembly functions 2020-01-09 16:09:42 +00:00
Kbuild
Kconfig arm64: uaccess: remove vestigal UAO support 2020-12-02 19:49:11 +00:00
Kconfig.debug arm64: remove TEXT_OFFSET randomization 2020-06-15 13:10:59 +01:00
Kconfig.platforms arm64: berlin: Select DW_APB_TIMER_OF 2020-10-26 10:45:03 +01:00
Makefile More arm64 updates for 5.10 2020-10-23 09:46:16 -07:00