Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-24 Thread Suzuki K Poulose
On Sat, Apr 22, 2017 at 02:28:44AM +0200, Alexander Graf wrote: > > > On 04.04.17 12:35, Suzuki K Poulose wrote: > > Hi Christoffer, > > > > On 04/04/17 11:13, Christoffer Dall wrote: > > > Hi Suzuki, > > > > > > On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: > > > > In

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-21 Thread Alexander Graf
On 04.04.17 12:35, Suzuki K Poulose wrote: Hi Christoffer, On 04/04/17 11:13, Christoffer Dall wrote: Hi Suzuki, On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling unmap_stage2_range() on the entire

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-04 Thread Christoffer Dall
On Tue, Apr 04, 2017 at 11:35:35AM +0100, Suzuki K Poulose wrote: > Hi Christoffer, > > On 04/04/17 11:13, Christoffer Dall wrote: > >Hi Suzuki, > > > >On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: > >>In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling >

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-04 Thread Suzuki K Poulose
Hi Christoffer, On 04/04/17 11:13, Christoffer Dall wrote: Hi Suzuki, On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling unmap_stage2_range() on the entire memory range for the guest. This could cause

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-04 Thread Christoffer Dall
Hi Suzuki, On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: > In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling > unmap_stage2_range() on the entire memory range for the guest. This could > cause problems with other callers (e.g, munmap on a memslot) trying

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-03 Thread Christoffer Dall
On Mon, Apr 03, 2017 at 03:22:11PM +0100, Mark Rutland wrote: > Hi, > > On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: > > In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling > > unmap_stage2_range() on the entire memory range for the guest. This could > >

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-03 Thread Suzuki K Poulose
On 03/04/17 15:22, Mark Rutland wrote: Hi, On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling unmap_stage2_range() on the entire memory range for the guest. This could cause problems with other callers (e.g,

Re: [PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-03 Thread Mark Rutland
Hi, On Mon, Apr 03, 2017 at 03:12:43PM +0100, Suzuki K Poulose wrote: > In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling > unmap_stage2_range() on the entire memory range for the guest. This could > cause problems with other callers (e.g, munmap on a memslot) trying to >

[PATCH v3] kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd

2017-04-03 Thread Suzuki K Poulose
In kvm_free_stage2_pgd() we don't hold the kvm->mmu_lock while calling unmap_stage2_range() on the entire memory range for the guest. This could cause problems with other callers (e.g, munmap on a memslot) trying to unmap a range. And since we have to unmap the entire Guest memory range holding a