From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH 3/6] kvm.git allow browsing memslots with mmu_lock Date: Mon, 28 Jul 2008 18:51:50 -0300 Message-ID: <20080728215150.GB11486@dmt.cnet> References: <20080725142452.GA8217@duo.random> <20080725142639.GB8217@duo.random> <20080725143203.GC8217@duo.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Andrea Arcangeli Return-path: Received: from mx1.redhat.com ([66.187.233.31]:48698 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752224AbYG1VyY (ORCPT ); Mon, 28 Jul 2008 17:54:24 -0400 Content-Disposition: inline In-Reply-To: <20080725143203.GC8217@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jul 25, 2008 at 04:32:03PM +0200, Andrea Arcangeli wrote: > This allows reading memslots with only the mmu_lock hold for mmu > notifiers that runs in atomic context and with mmu_lock held. > > Compared to previous versions I had to move this: > > - if (mem->slot >= kvm->nmemslots) > - kvm->nmemslots = mem->slot + 1; > > after the call to kvm_arch_flush_shadow but that's ok as they're > mutually exclusive: npages being null asks to remove the memslot and > you can't remove a memslot that doesn't exist yet even if there's no > explicit check that forbids it. In any case the ordering didn't seem > meaningful if slots is set higher than nmemslots. But please Marcelo > double check, thanks! > > Signed-off-by: Andrea Arcangeli Looks good.