diff options
author | Fuad Tabba <tabba@google.com> | 2021-08-17 11:11:27 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-20 13:12:17 +0300 |
commit | cd496228fd8de2e82b6636d3d89105631ea2b69c (patch) | |
tree | 6e1671ed2139ea66403066f5c0f7feb7fef0fdc1 /arch/arm64/kvm/arm.c | |
parent | 12849badc6d2456f15f8f2c93037628d5176810b (diff) | |
download | linux-cd496228fd8de2e82b6636d3d89105631ea2b69c.tar.xz |
KVM: arm64: Track value of cptr_el2 in struct kvm_vcpu_arch
Track the baseline guest value for cptr_el2 in struct
kvm_vcpu_arch, similar to the other registers that control traps.
Use this value when setting cptr_el2 for the guest.
Currently this value is unchanged (CPTR_EL2_DEFAULT), but future
patches will set trapping bits based on features supported for
the guest.
No functional change intended.
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210817081134.2918285-9-tabba@google.com
Diffstat (limited to 'arch/arm64/kvm/arm.c')
-rw-r--r-- | arch/arm64/kvm/arm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index e9a2b8f27792..14b12f2c08c0 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -1104,6 +1104,7 @@ static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu, } vcpu_reset_hcr(vcpu); + vcpu->arch.cptr_el2 = CPTR_EL2_DEFAULT; /* * Handle the "start in power-off" case. |