]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
KVM: arm64: Disable guest access to trace filter controls
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 23 Mar 2021 12:06:30 +0000 (12:06 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 4 May 2021 14:11:20 +0000 (16:11 +0200)
commit74b74d4e09d078f60e2cb5f8ddd335bcfc24cec1
treeeb33ea15a685cbe13f96e1ea12e2da0068c1a0ec
parent05d77a685c04d3bfb8f332f2134b49d7cca56cb9
KVM: arm64: Disable guest access to trace filter controls

BugLink: https://bugs.launchpad.net/bugs/1926490
[ Upstream commit a354a64d91eec3e0f8ef0eed575b480fd75b999c ]

Disable guest access to the Trace Filter control registers.
We do not advertise the Trace filter feature to the guest
(ID_AA64DFR0_EL1: TRACE_FILT is cleared) already, but the guest
can still access the TRFCR_EL1 unless we trap it.

This will also make sure that the guest cannot fiddle with
the filtering controls set by a nvhe host.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210323120647.454211-3-suzuki.poulose@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/debug.c