ANDROID: arm64: Auto-enroll MMIO guard on protected vms

Set the MMIO guard flag for protected vms prior to entering the guest
for the first time.

Bug: 216798684
Change-Id: I1448102ae85176d495ae7f8d6d20de4092049f0d
Signed-off-by: Sebastian Ene <sebastianene@google.com>
Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
Sebastian Ene
2022-04-21 10:45:51 +00:00
committed by Quentin Perret
parent 0dbb5f89f5
commit 437fc98ccb

View File

@@ -929,6 +929,9 @@ void pkvm_reset_vcpu(struct pkvm_hyp_vcpu *hyp_vcpu)
/* PC: IPA of pvmfw base */
*vcpu_pc(&hyp_vcpu->vcpu) = entry;
hyp_vm->pvmfw_entry_vcpu = NULL;
/* Auto enroll MMIO guard */
set_bit(KVM_ARCH_FLAG_MMIO_GUARD, &hyp_vm->kvm.arch.flags);
}
reset_state->reset = false;