diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2019-03-29 16:43:26 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2019-04-30 14:43:13 +1000 |
commit | e1a1ef84cd07f72ce12f139eb9a37d3f9028e7a7 (patch) | |
tree | 0a22fce388d2adee4edb79f60c9ba694756c80d5 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 2001825efcea75e4209e4956f6cd619fbc246d16 (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions