Re: [PATCH v3 7/8] kvm: x86: mmu: Lockless access tracking for Intel CPUs without EPT A bits.

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

 



On Friday, December 16, 2016 04:23:21 PM Paolo Bonzini wrote:
> Junaid, of all comments from Guangrong I'm mostly interested in
> kvm_mmu_clear_all_pte_masks.  What was the intended purpose?

This was needed in the original version of this patch where the shadow_acc_track_mask was set via the separate kvm_mmu_set_access_track_masks() call rather than as part of kvm_mmu_set_mask_ptes(). In that case, without the clearing during init, we could end up with both shadow_acc_track_mask and shadow_accessed_mask being set if the kvm_intel module was reloaded with different EPT parameters e.g.

modprobe kvm_intel ept_ad=0 
rmmod kvm_intel                 
modprobe kvm_intel ept_ad=1    

Now that we are setting both masks together through kvm_mmu_set_mask_ptes(), this problem doesn’t exist and the kvm_mmu_clear_all_pte_masks() isn’t strictly needed. However, I think it might still be a good idea to keep it because the basic issue is that these masks are expected to be set by the kvm_(intel|amd) modules but they are actually a part of the kvm module and hence they are initialized to 0 only on the (re)loading of the kvm module, but not of the kvm_(intel|amd) modules.

Thanks,
Junaid
--
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