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: 209580772
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 Fuad Tabba
parent f36d6d5530
commit 1de666a9e2

View File

@@ -319,11 +319,7 @@ static void handle_pvm_exit_dabt(struct pkvm_hyp_vcpu *hyp_vcpu)
{ {
struct kvm_vcpu *host_vcpu = hyp_vcpu->host_vcpu; struct kvm_vcpu *host_vcpu = hyp_vcpu->host_vcpu;
/* hyp_vcpu->vcpu.mmio_needed = __pkvm_check_ioguard_page(hyp_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;
if (hyp_vcpu->vcpu.mmio_needed) { if (hyp_vcpu->vcpu.mmio_needed) {
/* r0 as transfer register between the guest and the host. */ /* r0 as transfer register between the guest and the host. */