diff options
author | Will Deacon <will@kernel.org> | 2019-08-24 13:45:20 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2019-08-24 13:46:30 +0200 |
commit | 087eeea9adcbaef55ae8d68335dcd3820c5b344b (patch) | |
tree | ccbed945f2bbbcc20972c1d15a9751a3bed4f231 /virt/kvm/arm/mmio.c | |
parent | Linux 5.3-rc5 (diff) | |
parent | KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity (diff) | |
download | linux-087eeea9adcbaef55ae8d68335dcd3820c5b344b.tar.xz linux-087eeea9adcbaef55ae8d68335dcd3820c5b344b.zip |
Merge tag 'kvmarm-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm/fixes
Pull KVM/arm fixes from Marc Zyngier as per Paulo's request at:
https://lkml.kernel.org/r/21ae69a2-2546-29d0-bff6-2ea825e3d968@redhat.com
"One (hopefully last) set of fixes for KVM/arm for 5.3: an embarassing
MMIO emulation regression, and a UBSAN splat. Oh well...
- Don't overskip instructions on MMIO emulation
- Fix UBSAN splat when initializing PPI priorities"
* tag 'kvmarm-fixes-for-5.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm:
KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity
KVM: arm/arm64: Only skip MMIO insn once
Diffstat (limited to 'virt/kvm/arm/mmio.c')
-rw-r--r-- | virt/kvm/arm/mmio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/virt/kvm/arm/mmio.c b/virt/kvm/arm/mmio.c index a8a6a0c883f1..6af5c91337f2 100644 --- a/virt/kvm/arm/mmio.c +++ b/virt/kvm/arm/mmio.c @@ -86,6 +86,12 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run) unsigned int len; int mask; + /* Detect an already handled MMIO return */ + if (unlikely(!vcpu->mmio_needed)) + return 0; + + vcpu->mmio_needed = 0; + if (!run->mmio.is_write) { len = run->mmio.len; if (len > sizeof(unsigned long)) @@ -188,6 +194,7 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run, run->mmio.is_write = is_write; run->mmio.phys_addr = fault_ipa; run->mmio.len = len; + vcpu->mmio_needed = 1; if (!ret) { /* We handled the access successfully in the kernel. */ |