From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH] Avoid race when guest switches between log dirty mode and dirty vram mode. Date: Thu, 13 Dec 2012 12:11:55 +0000 Message-ID: <20121213121155.GC75286@ocelot.phlegethon.org> References: <1355166836-11338-1-git-send-email-robert.phillips@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1355166836-11338-1-git-send-email-robert.phillips@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Robert Phillips Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 14:13 -0500 on 10 Dec (1355148836), Robert Phillips wrote: > The previous code assumed the guest would be in one of three mutually exclusive > modes for bookkeeping dirty pages: (1) shadow, (2) hap utilizing the log dirty > bitmap to support functionality such as live migrate, (3) hap utilizing the > log dirty bitmap to track dirty vram pages. > Races arose when a guest attempted to track dirty vram while performing live > migrate. (The dispatch table managed by paging_log_dirty_init() might change > in the middle of a log dirty or a vram tracking function.) > > This change allows hap log dirty and hap vram tracking to be concurrent. > Vram tracking no longer uses the log dirty bitmap. Instead it detects > dirty vram pages by examining their p2m type. The log dirty bitmap is only > used by the log dirty code. Because the two operations use different > mechanisms, they are no longer mutually exclusive. > > Signed-Off-By: Robert Phillips Applied; thanks for that. Tim.