ANDROID: KVM: arm64: pkvm: Don't init pvm traps non non-protected guests

We want the host to handle everything as usual.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Bug: 209580772
Change-Id: Icf8ee146917e886bca258815cf948a1b12540353
Signed-off-by: Will Deacon <willdeacon@google.com>
This commit is contained in:
Marc Zyngier
2022-01-05 18:49:29 +00:00
committed by Will Deacon
parent 8d6a327d52
commit 1fef38359c

View File

@@ -379,7 +379,8 @@ static int init_shadow_structs(struct kvm *kvm, struct kvm_shadow_vm *vm,
if (ret)
return ret;
pkvm_vcpu_init_traps(shadow_vcpu);
if (vm->arch.pkvm.enabled)
pkvm_vcpu_init_traps(shadow_vcpu);
kvm_reset_pvm_sys_regs(shadow_vcpu);
vm->vcpus[i] = shadow_vcpu;