ANDROID: KVM: arm64: Plumb MMIO checking into the fault handling

Plumb the MMIO checking code into the MMIO fault handling code.
Any fault hitting outside of an MMIO region will now report
an invalid syndrome, and won't leak any data from the guest.

Bug: 357781595
Change-Id: I68bef2d0211a804aa1e598aeaa0c85dc4098f61e
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
This commit is contained in:
Marc Zyngier
2021-06-21 19:00:50 +01:00
committed by Keir Fraser
parent a0923f4678
commit a402f1b738
+1 -5
View File
@@ -309,11 +309,7 @@ static void handle_pvm_exit_dabt(struct pkvm_hyp_vcpu *hyp_vcpu)
{
struct kvm_vcpu *host_vcpu = hyp_vcpu->host_vcpu;
/*
* For now, we treat all data aborts as MMIO since we have no knowledge
* of the memslot configuration at EL2.
*/
hyp_vcpu->vcpu.mmio_needed = true;
hyp_vcpu->vcpu.mmio_needed = __pkvm_check_ioguard_page(hyp_vcpu);
if (hyp_vcpu->vcpu.mmio_needed) {
/* r0 as transfer register between the guest and the host. */