From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 0 of 7] Synchronized p2m lookups v2 Date: Fri, 10 Feb 2012 16:10:23 +0000 Message-ID: <20120210161023.GE32107@ocelot.phlegethon.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: george.dunlap@eu.citrix.com, andres@gridcentric.ca, xen-devel@lists.xensource.com, keir.xen@gmail.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org At 00:45 -0500 on 09 Feb (1328748345), Andres Lagar-Cavilla wrote: > Up until now, p2m lookups (get_gfn*) in the x86 architecture were not > synchronized against concurrent updates. With the addition of sharing and > paging subsystems that can dynamically modify the p2m, the need for > synchronized lookups becomes more pressing. > > Without synchronized lookups, we've encountered host crashes triggered by race > conditions, particularly when exercising the sharing subsystem. > > In this patch series we make p2m lookups fully synchronized. We still use a > single per-domain p2m lock (profiling work tbd may or may not indicate the need > for fine-grained locking). > > We only enforce locking of p2m queries for hap-assisted domains. These are the > domains (in the case of EPT) that can exercise the paging and sharing > subsystems and thus most in need of synchronized lookups. > > While the code *should* work for domains relying on shadow paging, it has not > been tested, hence we do not enable this at the moment. > > Finally, the locking discipline in the PoD subsystem has been updated, since > PoD relied on some assumptions about the way the p2m lock is used. > > Signed-off-by: Andres Lagar-Cavilla > Signed-off-by: Adin Scannell Applied, thanks. Tim.