Re: [PATCH 2/6] KVM MMU: fix kvm_mmu_zap_page() and its calling path

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

 




Marcelo Tosatti wrote:

>> @@ -1483,8 +1483,8 @@ static int mmu_zap_unsync_children(struct kvm *kvm,
>>  		for_each_sp(pages, sp, parents, i) {
>>  			kvm_mmu_zap_page(kvm, sp);
>>  			mmu_pages_clear_parents(&parents);
>> +			zapped++;
>>  		}
>> -		zapped += pages.nr;
>>  		kvm_mmu_pages_init(parent, &parents, &pages);
>>  	}
> 
> Don't see why this is needed? The for_each_sp loop uses pvec.nr.

I think mmu_zap_unsync_children() should return the number of zapped pages then we
can adjust the number of free pages in kvm_mmu_change_mmu_pages(), but pages.nr no
only includes the unsync/zapped pages but also includes their parents.

Thanks,
Xiao
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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