linux/arch/powerpc/kvm
Laurent Vivier 7333b5aca4 KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp()
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")
Cc: stable@vger.kernel.org # v4.12+
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>
2017-12-22 15:36:24 +11:00
..
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
book3s.c * ARM: HYP mode stub supports kexec/kdump on 32-bit; improved PMU 2017-05-08 12:37:56 -07:00
book3s.h
book3s_32_mmu.c
book3s_32_mmu_host.c
book3s_32_sr.S
book3s_64_mmu.c
book3s_64_mmu_host.c * ARM: HYP mode stub supports kexec/kdump on 32-bit; improved PMU 2017-05-08 12:37:56 -07:00
book3s_64_mmu_hv.c KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts 2017-11-23 14:17:54 +11:00
book3s_64_mmu_radix.c KVM: PPC: Book3S HV: Add infrastructure for running HPT guests on radix host 2017-11-01 15:36:28 +11:00
book3s_64_slb.S KVM: PPC: Book3S: Fix gas warning due to using r0 as immediate 0 2017-11-01 15:17:25 +11:00
book3s_64_vio.c KVM: PPC: Book3S: Protect kvmppc_gpa_to_ua() with SRCU 2017-10-14 11:35:41 +11:00
book3s_64_vio_hv.c powerpc/mm: Rename find_linux_pte_or_hugepte() 2017-08-17 23:13:46 +10:00
book3s_emulate.c
book3s_exports.c
book3s_hv.c KVM: PPC: Book3S HV: Fix migration and HPT resizing of HPT guests on radix hosts 2017-11-23 14:17:54 +11:00
book3s_hv_builtin.c KVM: PPC: Book3S HV: Run HPT guests on POWER9 radix hosts 2017-11-01 15:36:41 +11:00
book3s_hv_hmi.c
book3s_hv_interrupts.S KVM: PPC: Book3S HV: Close race with testing for signals on guest entry 2017-07-01 18:59:38 +10:00
book3s_hv_ras.c KVM: PPC: Book3S HV: Exit guest upon MCE when FWNMI capability is enabled 2017-06-22 11:24:57 +10:00
book3s_hv_rm_mmu.c KVM: PPC: Book3S HV: Unify dirty page map between HPT and radix 2017-11-01 15:36:21 +11:00
book3s_hv_rm_xics.c Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD 2017-05-09 11:50:01 +02:00
book3s_hv_rm_xive.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
book3s_hv_rmhandlers.S powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c
book3s_pr.c KVM: PPC: Book3S PR: Only install valid SLBs during KVM_SET_SREGS 2017-11-01 15:17:25 +11:00
book3s_pr_papr.c KVM: PPC: Book3S PR: Enable in-kernel TCE handlers for PR KVM 2017-10-14 16:38:19 +11:00
book3s_rmhandlers.S
book3s_rtas.c
book3s_segment.S
book3s_xics.c Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD 2017-05-09 11:50:01 +02:00
book3s_xics.h
book3s_xive.c KVM: PPC: Book3S HV: Fix pending_pri value in kvmppc_xive_get_icp() 2017-12-22 15:36:24 +11:00
book3s_xive.h KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive() 2017-10-03 17:58:16 +02:00
book3s_xive_template.c KVM: PPC: Book3S HV: Don't access XIVE PIPR register using byte accesses 2017-09-12 16:02:07 +10:00
booke.c treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
booke.h
booke_emulate.c
booke_interrupts.S
bookehv_interrupts.S
e500.c KVM: PPC: e500: Fix some NULL dereferences on error 2017-08-31 12:36:44 +10:00
e500.h
e500_emulate.c
e500_mmu.c
e500_mmu_host.c KVM: PPC: BookE: Use vma_pages function 2017-10-14 13:39:49 +11:00
e500_mmu_host.h
e500mc.c KVM: PPC: e500mc: Fix a NULL dereference 2017-08-31 12:36:44 +10:00
emulate.c KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9 2017-06-19 14:02:04 +10:00
emulate_loadstore.c
fpu.S
irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpic.c
powerpc.c KVM: Let KVM_SET_SIGNAL_MASK work as advertised 2017-11-27 17:53:47 +01:00
timing.c
timing.h
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_book3s.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_booke.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_hv.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_pr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00