android_kernel_oneplus_msm8998/arch/powerpc/kvm
Paul Mackerras 9eee777d31 KVM: PPC: Book3S HV: Fix VRMA initialization with 2MB or 1GB memory backing
[ Upstream commit debd574f4195e205ba505b25e19b2b797f4bcd94 ]

The current code for initializing the VRMA (virtual real memory area)
for HPT guests requires the page size of the backing memory to be one
of 4kB, 64kB or 16MB.  With a radix host we have the possibility that
the backing memory page size can be 2MB or 1GB.  In these cases, if the
guest switches to HPT mode, KVM will not initialize the VRMA and the
guest will fail to run.

In fact it is not necessary that the VRMA page size is the same as the
backing memory page size; any VRMA page size less than or equal to the
backing memory page size is acceptable.  Therefore we now choose the
largest page size out of the set {4k, 64k, 16M} which is not larger
than the backing memory page size.

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-05-30 07:49:03 +02: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 arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function 2014-12-17 13:12:25 +01:00
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: Fix VRMA initialization with 2MB or 1GB memory backing 2018-05-30 07:49:03 +02: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 powerpc/kvm: Create proper names for the kvm_host_state PMU fields 2014-12-29 15:45:55 +11:00
book3s_hv_ras.c powerpc/book3s: Fix flush_tlb cpu_spec hook to take a generic argument. 2015-03-17 07:52:48 +11:00
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 KVM: PPC: Book3S PR: Check copy_to/from_user return values 2018-04-13 19:50:04 +02:00
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 KVM: PPC: Book3S HV: Add ICP real mode counters 2015-04-21 15:21:30 +02:00
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 KVM: PPC: fix suspicious use of conditional operator 2015-08-22 11:16:16 +02:00
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 kvm/ppc/mpic: drop unused IRQ_testbit 2015-04-08 10:46:58 +02:00
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 KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions 2014-12-17 13:29:27 +01:00
trace_booke.h KVM: PPC: BookE: Improve irq inject tracepoint 2014-12-15 13:27:23 +01:00
trace_hv.h KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions 2014-12-17 13:29:27 +01:00
trace_pr.h KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions 2014-12-17 13:29:27 +01:00