linux/arch/powerpc/kvm
Alexey Kardashevskiy e1a1ef84cd KVM: PPC: Book3S: Allocate guest TCEs on demand too
We already allocate hardware TCE tables in multiple levels and skip
intermediate levels when we can, now it is a turn of the KVM TCE tables.
Thankfully these are allocated already in 2 levels.

This moves the table's last level allocation from the creating helper to
kvmppc_tce_put() and kvm_spapr_tce_fault(). Since such allocation cannot
be done in real mode, this creates a virtual mode version of
kvmppc_tce_put() which handles allocations.

This adds kvmppc_rm_ioba_validate() to do an additional test if
the consequent kvmppc_tce_put() needs a page which has not been allocated;
if this is the case, we bail out to virtual mode handlers.

The allocations are protected by a new mutex as kvm->lock is not suitable
for the task because the fault handler is called with the mmap_sem held
but kvmhv_setup_mmu() locks kvm->lock and mmap_sem in the reverse order.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-04-30 14:43:13 +10:00
..
book3s.c Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next 2019-02-22 13:52:30 +11:00
book3s.h
book3s_32_mmu.c KVM: PPC: Book3S PR: Add emulation for slbfee. instruction 2019-02-19 14:25:52 +11:00
book3s_32_mmu_host.c
book3s_32_sr.S
book3s_64_mmu.c KVM: PPC: Book3S PR: Add emulation for slbfee. instruction 2019-02-19 14:25:52 +11:00
book3s_64_mmu_host.c
book3s_64_mmu_hv.c KVM: PPC: Book3S HV: Optimise mmio emulation for devices on FAST_MMIO_BUS 2019-02-19 16:00:15 +11:00
book3s_64_mmu_radix.c KVM: PPC: Book3S HV: Add KVM stat largepages_[2M/1G] 2019-02-19 16:00:15 +11:00
book3s_64_slb.S
book3s_64_vio.c KVM: PPC: Book3S: Allocate guest TCEs on demand too 2019-04-30 14:43:13 +10:00
book3s_64_vio_hv.c KVM: PPC: Book3S: Allocate guest TCEs on demand too 2019-04-30 14:43:13 +10:00
book3s_emulate.c KVM: PPC: Book3S PR: Add emulation for slbfee. instruction 2019-02-19 14:25:52 +11:00
book3s_exports.c
book3s_hv.c KVM: PPC: Book3S HV: Fix lockdep warning when entering the guest 2019-04-30 14:43:12 +10:00
book3s_hv_builtin.c KVM: PPC: Book3S: Allow XICS emulation to work in nested hosts using XIVE 2019-02-19 16:00:15 +11:00
book3s_hv_hmi.c powerpc: Avoid circular header inclusion in mmu-hash.h 2019-02-23 22:31:39 +11:00
book3s_hv_interrupts.S
book3s_hv_nested.c KVM: PPC: Book3S HV: Introduce kvmhv_update_nest_rmap_rc_list() 2018-12-21 14:39:35 +11:00
book3s_hv_ras.c KVM: PPC: Book3S HV: Simplify machine check handling 2019-02-21 23:16:44 +11:00
book3s_hv_rm_mmu.c KVM: PPC: Book3S HV: Implement real mode H_PAGE_INIT handler 2019-04-30 14:43:12 +10:00
book3s_hv_rm_xics.c KVM: PPC: Book3S: Allow XICS emulation to work in nested hosts using XIVE 2019-02-19 16:00:15 +11:00
book3s_hv_rm_xive.c
book3s_hv_rmhandlers.S KVM: PPC: Book3S HV: Implement real mode H_PAGE_INIT handler 2019-04-30 14:43:12 +10:00
book3s_hv_tm.c
book3s_hv_tm_builtin.c
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c
book3s_pr.c KVM: PPC: Pass change type down to memslot commit function 2018-12-17 10:57:27 +11:00
book3s_pr_papr.c
book3s_rmhandlers.S
book3s_rtas.c KVM: PPC: Book3S: Allow XICS emulation to work in nested hosts using XIVE 2019-02-19 16:00:15 +11:00
book3s_segment.S
book3s_xics.c KVM: PPC: Book3S HV: Change to use DEFINE_SHOW_ATTRIBUTE macro 2018-12-14 15:39:47 +11:00
book3s_xics.h
book3s_xive.c KVM: PPC: Book3S HV: Change to use DEFINE_SHOW_ATTRIBUTE macro 2018-12-14 15:39:47 +11:00
book3s_xive.h
book3s_xive_template.c
booke.c KVM: PPC: Pass change type down to memslot commit function 2018-12-17 10:57:27 +11:00
booke.h
booke_emulate.c
booke_interrupts.S
bookehv_interrupts.S powerpc/fsl: Flush branch predictor when entering KVM 2018-12-20 22:59:03 +11:00
e500.c
e500.h powerpc/mm: move platform specific mmu-xxx.h in platform directories 2018-12-04 19:45:01 +11:00
e500_emulate.c powerpc/fsl: Emulate SPRN_BUCSR register 2018-12-20 22:59:03 +11:00
e500_mmu.c
e500_mmu_host.c KVM: Make kvm_set_spte_hva() return int 2018-12-21 11:28:41 +01:00
e500_mmu_host.h
e500mc.c
emulate.c
emulate_loadstore.c
fpu.S
irq.h
Kconfig treewide: surround Kconfig file paths with double quotes 2018-12-22 00:25:54 +09:00
Makefile KVM: PPC: Remove -I. header search paths 2019-02-19 16:00:15 +11:00
mpic.c
powerpc.c KVM: PPC: Book3S: Add count cache flush parameters to kvmppc_get_cpu_char() 2019-03-01 15:11:14 +11:00
timing.c
timing.h
tm.S
trace.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00
trace_book3s.h
trace_booke.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00
trace_hv.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00
trace_pr.h KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE 2018-11-07 23:04:38 +11:00