From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly Date: Fri, 24 Aug 2012 19:29:53 +1000 Message-ID: <20120824092953.GC7051@bloggs.ozlabs.ibm.com> References: <20120810183553.GA16345@amt.cnet> <20120811003754.GA6016@bloggs.ozlabs.ibm.com> <20120813163411.GA22134@amt.cnet> <20120813220450.GB15395@amt.cnet> <502B6B2D.2060906@redhat.com> <20120815175920.GB18452@amt.cnet> <1345187178.11751.49.camel@pasglop> <20120817183939.GA26687@amt.cnet> <1345235545.11751.89.camel@pasglop> <20120823135537.GC4747@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Benjamin Herrenschmidt , Avi Kivity , Gleb Natapov , Alex Williamson , Takuya Yoshikawa , Alexander Graf , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from ozlabs.org ([203.10.76.45]:57946 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756057Ab2HXJ3f (ORCPT ); Fri, 24 Aug 2012 05:29:35 -0400 Content-Disposition: inline In-Reply-To: <20120823135537.GC4747@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Aug 23, 2012 at 10:55:37AM -0300, Marcelo Tosatti wrote: > There are a number of options to consider: > > 1) Merge the current patchset from Paul, which has two downsides: > 1-1) It contains an unfixable race. The race being that new HTPEs using the old base address could get inserted after we flush the old HPTEs and before we update the memslot array? I think we could solve that one by temporarily marking the memslot invalid for changes of base_gfn as well as for memslot deletions. Can you see any problem with that? It means that guest accesses to the old memslot addresses would trap or fail, but if the guest is trying to access a device while its BAR is being changed, then I think it deserves that. Paul.