linux-stable/arch/powerpc
Laurent Vivier 5aa30b450a KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp()
commit 7333b5aca4 upstream.

When we migrate a VM from a POWER8 host (XICS) to a POWER9 host
(XICS-on-XIVE), we have an error:

qemu-kvm: Unable to restore KVM interrupt controller state \
          (0xff000000) for CPU 0: Invalid argument

This is because kvmppc_xics_set_icp() checks the new state
is internaly consistent, and especially:

...
   1129         if (xisr == 0) {
   1130                 if (pending_pri != 0xff)
   1131                         return -EINVAL;
...

On the other side, kvmppc_xive_get_icp() doesn't set
neither the pending_pri value, nor the xisr value (set to 0)
(and kvmppc_xive_set_icp() ignores the pending_pri value)

As xisr is 0, pending_pri must be set to 0xff.

Fixes: 5af5099385 ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-29 17:53:48 +01:00
..
boot License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
configs powerpc/configs: Update for CONFIG_SND changes 2017-09-20 13:30:09 +10:00
crypto License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
include arch, mm: Allow arch_dup_mmap() to fail 2017-12-29 17:53:43 +01:00
kernel powerpc/watchdog: Do not trigger SMP crash from touch_nmi_watchdog 2017-12-25 14:26:28 +01:00
kvm KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp() 2017-12-29 17:53:48 +01:00
lib powerpc: Fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX 2017-11-30 08:40:56 +00:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/powernv: Fix kexec crashes caused by tlbie tracing 2017-12-05 11:26:31 +01:00
net bpf, ppc64: do not reload skb pointers in non-skb context 2017-12-25 14:26:32 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf powerpc/perf/hv-24x7: Fix incorrect comparison in memord 2017-12-20 10:10:33 +01:00
platforms powerpc/pseries/vio: Dispose of virq mapping on vdevice unregister 2017-12-20 10:10:25 +01:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc/ipic: Fix status get and status clear 2017-12-20 10:10:25 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xmon powerpc/xmon: Avoid tripping SMP hardlockup watchdog 2017-12-25 14:26:28 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile Merge branch 'fixes' into next 2017-08-23 22:20:10 +10:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00