Merge tag 'kvm-ppc-next-4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorRadim Krčmář <rkrcmar@redhat.com>
Fri, 9 Feb 2018 20:36:57 +0000 (21:36 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Fri, 9 Feb 2018 21:03:06 +0000 (22:03 +0100)
Second PPC KVM update for 4.16

Seven fixes that are either trivial or that address bugs that people
are actually hitting.  The main ones are:

- Drop spinlocks before reading guest memory

- Fix a bug causing corruption of VCPU state in PR KVM with preemption
  enabled

- Make HPT resizing work on POWER9

- Add MMIO emulation for vector loads and stores, because guests now
  use these instructions in memcpy and similar routines.

1  2 
arch/powerpc/kvm/Kconfig
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/powerpc.c

Simple merge
Simple merge
Simple merge
@@@ -1425,9 -1555,21 +1562,21 @@@ int kvm_arch_vcpu_ioctl_run(struct kvm_
                        r = kvmppc_emulate_mmio_vsx_loadstore(vcpu, run);
                        if (r == RESUME_HOST) {
                                vcpu->mmio_needed = 1;
 -                              return r;
 +                              goto out;
                        }
                }
 -                              return r;
+ #endif
+ #ifdef CONFIG_ALTIVEC
+               if (vcpu->arch.mmio_vmx_copy_nums > 0)
+                       vcpu->arch.mmio_vmx_copy_nums--;
+               if (vcpu->arch.mmio_vmx_copy_nums > 0) {
+                       r = kvmppc_emulate_mmio_vmx_loadstore(vcpu, run);
+                       if (r == RESUME_HOST) {
+                               vcpu->mmio_needed = 1;
++                              goto out;
+                       }
+               }
  #endif
        } else if (vcpu->arch.osi_needed) {
                u64 *gprs = run->osi.gprs;