]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS/T&E: Treat unhandled guest KSeg0 as MMIO
authorJames Hogan <james.hogan@imgtec.com>
Mon, 11 May 2015 22:31:45 +0000 (23:31 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:21:21 +0000 (15:21 +0000)
commit7b684f64af30b76ccb2cafe0a7d5fa08cc49cf7b
tree50d31b9480e7bfe49cbff77c3db74cda6c49f6aa
parenta42f212a9e9f523b5190f96a1f399cbb4efab810
KVM: MIPS/T&E: Treat unhandled guest KSeg0 as MMIO

Treat unhandled accesses to guest KSeg0 as MMIO, rather than only host
KSeg0 addresses. This will allow read only memory regions (such as the
Malta boot flash as emulated by QEMU) to have writes (before reads)
treated as MMIO, and unallocated physical addresses to have all accesses
treated as MMIO.

The MMIO emulation uses the gva_to_gpa callback, so this is also updated
for trap & emulate to handle guest KSeg0 addresses.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
arch/mips/kvm/mmu.c
arch/mips/kvm/trap_emul.c