summaryrefslogtreecommitdiff
path: root/fs/mbcache.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-10-25 18:11:12 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-26 14:43:55 +0300
commite1e575f6b026734be3b1f075e780e91ab08ca541 (patch)
treec104b417fdee65ed848470a75cc459532df9cf98 /fs/mbcache.c
parentede5f3e7b54a4347be4d8525269eae50902bd7cd (diff)
downloadlinux-e1e575f6b026734be3b1f075e780e91ab08ca541.tar.xz
KVM: MIPS: Precalculate MMIO load resume PC
The advancing of the PC when completing an MMIO load is done before re-entering the guest, i.e. before restoring the guest ASID. However if the load is in a branch delay slot it may need to access guest code to read the prior branch instruction. This isn't safe in TLB mapped code at the moment, nor in the future when we'll access unmapped guest segments using direct user accessors too, as it could read the branch from host user memory instead. Therefore calculate the resume PC in advance while we're still in the right context and save it in the new vcpu->arch.io_pc (replacing the no longer needed vcpu->arch.pending_load_cause), and restore it on MMIO completion. Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch emulation.") 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 Cc: <stable@vger.kernel.org> # 3.10.x- Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'fs/mbcache.c')
0 files changed, 0 insertions, 0 deletions