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_l

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.

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

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 mo

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_se