On 11/11/19 19:27, Sean Christopherson wrote: >> Thanks for this clarification. I do want to put out though that >> ZONE_DEVICE pages go idle, they don't get freed. As long as KVM drops >> its usage on invalidate it's perfectly fine for KVM to operate on idle >> ZONE_DEVICE pages. The common case is that ZONE_DEVICE pages are >> accessed and mapped while idle. Only direct-I/O temporarily marks them >> busy to synchronize with invalidate. KVM obviates that need by >> coordinating with mmu-notifiers instead. > Only the KVM MMU, e.g. page fault handler, coordinates via mmu_notifier, > the kvm_vcpu_map() case would continue using pages across an invalidate. Yes, and it gets/puts the page correctly. Paolo