kvm mmu notifier

2014-02-09 Thread Hu Yaohui
Hi All, If the host system decides that it wants to push a given page out to swap, the host will notify the host through registered mmu notifier to inform the guest. I am wondering if there any other situations, other than swapping, which will trigger the mmu notifier to inform host page change to

Re: [PATCH] kvm mmu notifier

2008-10-18 Thread Marcelo Tosatti
Hi Andrea, Few comments below. On Thu, Jun 26, 2008 at 08:11:16PM +0200, Andrea Arcangeli wrote: > + } > + return need_tlb_flush; > +} > + > +int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) > +{ > + int i; > + int need_tlb_flush = 0; > + > + /* > + * If mmap_sem is

Re: [PATCH] kvm mmu notifier

2008-07-04 Thread Marcelo Tosatti
Hi Andrea, On Thu, Jul 03, 2008 at 05:17:42PM +0200, Andrea Arcangeli wrote: > +static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp) > +{ > + u64 *spte; > + int need_tlb_flush = 0; > + > + while ((spte = rmap_next(kvm, rmapp, NULL))) { > + BUG_ON(!(*spte & PT_

Re: [PATCH] kvm mmu notifier

2008-07-03 Thread Andrea Arcangeli
l sequence number/counter are under the spinlock and all smb_wmb/rmb goes away). Given mmu-notifier are in -mm and everyone seem to agrees about them being merged during .27 merge window, I think it'd be fairly safe to apply kvm mmu notifier patch. I'm testing this on both mmu-notifie

Re: [PATCH] kvm mmu notifier

2008-06-27 Thread Andrea Arcangeli
On Fri, Jun 27, 2008 at 07:43:17PM -0300, Marcelo Tosatti wrote: > These two functions share the same memslot iteration code, you could > avoid duplication. Ok, I'll look into cleaning this up a bit. > > + if (unlikely(atomic_read(&vcpu->kvm->mmu_notifier_count))) > > + return; > > +

[PATCH] kvm mmu notifier

2008-06-26 Thread Andrea Arcangeli
Hello, this is the mmu notifier patch for kvm updated according to last comments. Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]> diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 8d45fab..ce3251c 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -21,6 +21,7 @@ con