Re: [PATCH V2 4/13] KVM/MMU: Flush tlb directly in the kvm_handle_hva_range()

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

 



On 9/20/2018 12:08 AM, Michael Kelley (EOSG) wrote:
> From: Tianyu Lan  Sent: Monday, September 17, 2018 8:19 PM
>> +
>> +			if (ret && kvm_available_flush_tlb_with_range()) {
>> +				kvm_flush_remote_tlbs_with_address(kvm,
>> +						gfn_start,
>> +						gfn_end - gfn_start);
> 
> Does the above need to be gfn_end - gfn_start + 1?

The flush range depends on the input parameter frame start and frame end 
of for_each_slot_rmap_range().

         for_each_slot_rmap_range(memslot, PT_PAGE_TABLE_LEVEL,
                                  PT_MAX_HUGEPAGE_LEVEL,
                                  gfn_start, gfn_end - 1,
                                  &iterator)
                 ret |= handler(kvm, iterator.rmap, memslot,
                                iterator.gfn, iterator.level, data);


The start is "gfn_start" and the end is "gfn_end - 1". The flush size is 
(gfn_end - 1) - gfn_start + 1 = gfn_end - gfn_start.

> 
>> +				ret = 0;
>> +			}
> 
> Michael
> 




[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