diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2024-10-25 20:23:44 +0200 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2024-10-31 20:00:39 +0100 |
commit | 4ee5d5ff4b4dd0e08d0424aeec62f25d1d66bb04 (patch) | |
tree | 093aeb4e973691475c0e43d92477a410397e68a8 /arch/arm64/kvm | |
parent | KVM: arm64: nv: Reinject traps that take effect in Host EL0 (diff) | |
download | linux-4ee5d5ff4b4dd0e08d0424aeec62f25d1d66bb04.tar.xz linux-4ee5d5ff4b4dd0e08d0424aeec62f25d1d66bb04.zip |
KVM: arm64: nv: Honor MDCR_EL2.{TPM, TPMCR} in Host EL0
TPM and TPMCR trap bits also affect Host EL0. How fun.
Mark these two trap bits as such and take advantage of the new
infrastructure for dealing w/ EL0 traps.
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241025182354.3364124-10-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm')
-rw-r--r-- | arch/arm64/kvm/emulate-nested.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c index b072098ee44e..4f14fa47df8e 100644 --- a/arch/arm64/kvm/emulate-nested.c +++ b/arch/arm64/kvm/emulate-nested.c @@ -304,13 +304,15 @@ static const struct trap_bits coarse_trap_bits[] = { .index = MDCR_EL2, .value = MDCR_EL2_TPMCR, .mask = MDCR_EL2_TPMCR, - .behaviour = BEHAVE_FORWARD_RW, + .behaviour = BEHAVE_FORWARD_RW | + BEHAVE_FORWARD_IN_HOST_EL0, }, [CGT_MDCR_TPM] = { .index = MDCR_EL2, .value = MDCR_EL2_TPM, .mask = MDCR_EL2_TPM, - .behaviour = BEHAVE_FORWARD_RW, + .behaviour = BEHAVE_FORWARD_RW | + BEHAVE_FORWARD_IN_HOST_EL0, }, [CGT_MDCR_TDE] = { .index = MDCR_EL2, |