Re: mmu notifier #v14

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Anthony Liguori
Date: Saturday, April 26, 2008 - 11:59 am

Andrea Arcangeli wrote:

You should not assume a struct page exists for any given spte. Instead, 
use kvm_get_pfn() and kvm_release_pfn_clean().


Perhaps I just have a weak stomach but I am uneasy having a function 
that takes a lock on exit. I walked through the logic and it doesn't 
appear to be wrong but it also is pretty clear that you could defer the 
acquisition of the lock to the caller (in this case, kvm_mmu_pte_write) 
by moving the update_pte assignment into kvm_mmu_pte_write.


Worst case, you pass 4 more pointer arguments here and, take the spin 
lock, and then depending on the result of mmu_guess_page_from_pte_write, 
update vcpu->arch.update_pte.


Why move the destruction of the vm to the MMU notifier unregister hook? 
Does anything else ever call mmu_notifier_unregister that would 
implicitly destroy the VM?

Regards,

Anthony Liguori
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mmu notifier #v14, Andrea Arcangeli, (Sat Apr 26, 9:46 am)
Re: mmu notifier #v14, Anthony Liguori, (Sat Apr 26, 11:59 am)
Re: mmu notifier #v14, Andrea Arcangeli, (Sat Apr 26, 5:20 pm)
Re: [kvm-devel] mmu notifier #v14, Anthony Liguori, (Sat Apr 26, 6:54 pm)
Re: [kvm-devel] mmu notifier #v14, Andrea Arcangeli, (Sat Apr 26, 8:05 pm)
Re: [kvm-devel] mmu notifier #v14, Marcelo Tosatti, (Mon Apr 28, 7:48 am)
mmu notifier-core v14->v15 diff for review, Andrea Arcangeli, (Thu May 1, 11:12 am)