Re: [PATCH kernel v4] KVM: PPC: Allocate guest TCEs on demand too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 29, 2019 at 04:43:26PM +1100, Alexey Kardashevskiy wrote:
> 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@xxxxxxxxx>

Thanks, patch applied to my kvm-ppc-next tree.

Paul.



[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux