Commit 6a31e426 authored by Fuad Tabba's avatar Fuad Tabba Committed by Will Deacon
Browse files

BACKPORT: KVM: arm64: Calculate cptr_el2 traps on activating traps



[ Upstream commit 2fd5b4b0 ]

Similar to VHE, calculate the value of cptr_el2 from scratch on
activate traps. This removes the need to store cptr_el2 in every
vcpu structure. Moreover, some traps, such as whether the guest
owns the fp registers, need to be set on every vcpu run.

[tabba@ Kept cptr_el2 as to not break the KMI.]

Bug: 411040189
Reported-by: default avatarJames Clark <james.clark@linaro.org>
Fixes: 5294afdb ("KVM: arm64: Exclude FP ownership from kvm_vcpu_arch")
Change-Id: Iba65e9bb65d8498007423dc5b137dedc602359de
Signed-off-by: default avatarFuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20241216105057.579031-13-tabba@google.com


Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 89720e9e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment