Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-23 Thread Carsten Otte
Andrea Arcangeli wrote: On Tue, Jan 22, 2008 at 04:38:49PM +0200, Avi Kivity wrote: Andrea Arcangeli wrote: This is arch independent code, I'm surprised mmu_lock is visible here? The mmu_lock is arch independent as far as I can tell. Pretty much like the mm-page_table_lock is also

Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-22 Thread Avi Kivity
Andrea Arcangeli wrote: This adds locking to the memslots so they can be looked up with only the mmu_lock. Entries with memslot-userspace_addr have to be ignored because they're not fully inserted yet. What is the motivation for this? Calls from mmu notifiers that don't have mmap_sem

Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-22 Thread Avi Kivity
Andrea Arcangeli wrote: This is arch independent code, I'm surprised mmu_lock is visible here? The mmu_lock is arch independent as far as I can tell. Pretty much like the mm-page_table_lock is also independent. All archs will have some form of shadow pagetables in software or hardware,

Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-22 Thread Andrea Arcangeli
On Tue, Jan 22, 2008 at 04:38:49PM +0200, Avi Kivity wrote: Andrea Arcangeli wrote: This is arch independent code, I'm surprised mmu_lock is visible here? The mmu_lock is arch independent as far as I can tell. Pretty much like the mm-page_table_lock is also independent. All archs will

Re: [kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-22 Thread Andrea Arcangeli
On Tue, Jan 22, 2008 at 03:47:28PM +0200, Avi Kivity wrote: Andrea Arcangeli wrote: This adds locking to the memslots so they can be looked up with only the mmu_lock. Entries with memslot-userspace_addr have to be ignored because they're not fully inserted yet. What is the motivation for

[kvm-devel] [PATCH] kvm memslot read-locking with mmu_lock

2008-01-21 Thread Andrea Arcangeli
This adds locking to the memslots so they can be looked up with only the mmu_lock. Entries with memslot-userspace_addr have to be ignored because they're not fully inserted yet. Signed-off-by: Andrea Arcangeli [EMAIL PROTECTED] diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index