android_kernel_oneplus_msm8998/arch/powerpc/kvm
Alexey Kardashevskiy 3b51022bb5 KVM: PPC: Book3S PR: Exit KVM on failed mapping
[ Upstream commit bd9166ffe624000140fc6b606b256df01fc0d060 ]

At the moment kvmppc_mmu_map_page() returns -1 if
mmu_hash_ops.hpte_insert() fails for any reason so the page fault handler
resumes the guest and it faults on the same address again.

This adds distinction to kvmppc_mmu_map_page() to return -EIO if
mmu_hash_ops.hpte_insert() failed for a reason other than full pteg.
At the moment only pSeries_lpar_hpte_insert() returns -2 if
plpar_pte_enter() failed with a code other than H_PTEG_FULL.
Other mmu_hash_ops.hpte_insert() instances can only fail with
-1 "full pteg".

With this change, if PR KVM fails to update HPT, it can signal
the userspace about this instead of returning to guest and having
the very same page fault over and over again.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-24 10:58:41 +01:00
..
book3s.c KVM: PPC: Book3S: Take the kvm->srcu lock in kvmppc_h_logical_ci_load/store() 2015-09-21 09:05:15 +10:00
book3s.h
book3s_32_mmu.c
book3s_32_mmu_host.c KVM: PPC: Fix warnings from sparse 2015-08-22 11:16:16 +02:00
book3s_32_sr.S
book3s_64_mmu.c
book3s_64_mmu_host.c KVM: PPC: Book3S PR: Exit KVM on failed mapping 2018-03-24 10:58:41 +01:00
book3s_64_mmu_hv.c powerpc updates for 4.4 2015-11-05 23:38:43 -08:00
book3s_64_slb.S
book3s_64_vio.c KVM: PPC: Book3S: Fix race and leak in kvm_vm_ioctl_create_spapr_tce() 2017-10-05 09:41:44 +02:00
book3s_64_vio_hv.c
book3s_emulate.c KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register 2016-10-16 17:36:14 +02:00
book3s_exports.c
book3s_hv.c KVM: PPC: Book3S HV: Reload HTM registers explicitly 2017-08-06 19:19:39 -07:00
book3s_hv_builtin.c KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8 2015-08-22 11:16:17 +02:00
book3s_hv_interrupts.S
book3s_hv_ras.c
book3s_hv_rm_mmu.c KVM: PPC: Book3S HV: Don't lose hardware R/C bit updates in H_PROTECT 2017-01-09 08:07:50 +01:00
book3s_hv_rm_xics.c KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter 2017-11-15 17:13:09 +01:00
book3s_hv_rmhandlers.S powerpc/64s: Simple RFI macro conversions 2018-02-16 20:09:34 +01:00
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c KVM: PPC: Fix warnings from sparse 2015-08-22 11:16:16 +02:00
book3s_pr.c KVM: PPC: Book3S PR: Exit KVM on failed mapping 2018-03-24 10:58:41 +01:00
book3s_pr_papr.c
book3s_rmhandlers.S powerpc/64s: Simple RFI macro conversions 2018-02-16 20:09:34 +01:00
book3s_rtas.c
book3s_segment.S powerpc/64s: Simple RFI macro conversions 2018-02-16 20:09:34 +01:00
book3s_xics.c KVM: PPC: Book3S: Fix typo in top comment about locking 2015-09-04 07:28:05 +10:00
book3s_xics.h
booke.c KVM: PPC: BookE: Fix a sanity check 2016-10-16 17:36:15 +02:00
booke.h
booke_emulate.c
booke_interrupts.S
bookehv_interrupts.S
e500.c KVM: PPC: e500: fix handling local_sid_lookup result 2015-10-15 15:58:16 +11:00
e500.h
e500_emulate.c KVM: PPC: e500: Emulate TMCFG0 TMRN register 2015-10-15 15:58:16 +11:00
e500_mmu.c
e500_mmu_host.c powerpc updates for 4.4 2015-11-05 23:38:43 -08:00
e500_mmu_host.h
e500mc.c
emulate.c KVM: PPC: Book3S PR: Fix illegal opcode emulation 2017-03-26 12:13:18 +02:00
emulate_loadstore.c
fpu.S
irq.h
Kconfig KVM: PPC: Remove PPC970 from KVM_BOOK3S_64_HV text in Kconfig 2015-08-22 11:16:16 +02:00
Makefile
mpic.c
powerpc.c KVM: PPC: Fix ONE_REG AltiVec support 2016-02-25 12:01:20 -08:00
timing.c
timing.h
trace.h
trace_book3s.h
trace_booke.h
trace_hv.h
trace_pr.h