Re: [PATCH v2 4/5] 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 Monday, November 21, 2016 03:42:23 PM Paolo Bonzini wrote:
> > Please rewrite kvm_age_rmapp to use the new mmu_spte_age instead
> 
> Hi Paolo,
> 
> While updating kvm_age_rmapp/mmu_spte_age, I noticed an inconsistency in the
> existing kvm code between the A/D and non-A/D cases. When using A/D bits,
> kvm_age_hva calls kvm_age_rmapp, which does NOT call kvm_set_pfn_accessed.
> However, when using EPT without A/D bits, kvm_unmap_rmapp is called, which
> does internally end up in a call to kvm_set_pfn_accessed. Do you know if
> this difference is deliberate? If not, should we call kvm_set_pfn_accessed
> in the A/D case as well, or should we leave that as is? Does it make any
> difference?

I think it's correct _not_ to call kvm_set_pfn_accessed, because the
clear_flush_young MMU notifier is called when you want to clear the
accessed bit.  So your patch would be fixing a bug in the case where
EPT A/D bits aren't available.

Thanks,

Paolo
--
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