Re: [PATCH] KVM: x86: remove check on rmap in for_each_slot_rmap_range()

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

 



On 26/09/2018 08:54, Wei Yang wrote:
> In loop for_each_slot_rmap_range(), slot_rmap_walk_okay() will check the
> rmap before continue the loop body.
> 
> This patch removes the duplicate check on rmap in the loop body.
> 
> Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
> ---
>  arch/x86/kvm/mmu.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 9ef1438be5f5..371d200ffd4a 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -5456,8 +5456,7 @@ slot_handle_level_range(struct kvm *kvm, struct kvm_memory_slot *memslot,
>  
>  	for_each_slot_rmap_range(memslot, start_level, end_level, start_gfn,
>  			end_gfn, &iterator) {
> -		if (iterator.rmap)
> -			flush |= fn(kvm, iterator.rmap);
> +		flush |= fn(kvm, iterator.rmap);
>  
>  		if (need_resched() || spin_needbreak(&kvm->mmu_lock)) {
>  			if (flush && lock_flush_tlb) {
> 

Queued, thanks.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux