1
0
Fork 0
alistair23-linux/arch
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
..
alpha arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
arc ARC: [plat-hsdk] Remap CCMs super early in asm boot trampoline 2020-11-02 11:45:09 -08:00
arm A set of fixes for perf: 2020-11-15 09:46:36 -08:00
arm64 KVM: arm64: Don't access PMCR_EL0 when no PMU is available 2020-12-22 10:47:09 +00:00
c6x arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
csky perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
h8300 arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
hexagon arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
ia64 treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
m68k arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
microblaze treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
mips treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
nds32 arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
nios2 arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
openrisc arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
parisc treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
powerpc A set of fixes for perf: 2020-11-15 09:46:36 -08:00
riscv A set of fixes for perf: 2020-11-15 09:46:36 -08:00
s390 perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
sh treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
sparc treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
um um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb() 2020-11-10 21:49:32 +01:00
x86 Fixes for ARM and x86, the latter especially for old processors 2020-11-15 09:57:58 -08:00
xtensa ARM, xtensa: highmem: avoid clobbering non-page aligned memory reservations 2020-11-04 10:42:57 +02:00
.gitignore
Kconfig Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00