From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2] x86/HVM: correct page dirty marking in hvm_map_guest_frame_rw() Date: Tue, 22 Sep 2015 14:02:03 +0100 Message-ID: <5601514B.9050203@citrix.com> References: <56016B5A02000078000A4575@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZeNCy-0000ck-5m for xen-devel@lists.xenproject.org; Tue, 22 Sep 2015 13:02:08 +0000 In-Reply-To: <56016B5A02000078000A4575@prv-mh.provo.novell.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: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 22/09/15 13:53, Jan Beulich wrote: > Rather than dirtying a page when establishing a (permanent) mapping, > dirty it when the page gets unmapped, or - if still mapped - on the > final iteration of a save operation (or in other cases where the guest > is paused or already shut down). (Transient mappings continue to get > dirtied upon getting mapped, to avoid the overhead of tracking.) > > Signed-off-by: Jan Beulich > --- > v2: Refine predicate for calling hvm_mapped_guest_frames_mark_dirty() > (now including all shut down domains as well as tool stack paused > ones). I am still convinced that it is wrong for Xen to second-guess what libxc is actually doing. libxc should explicitly ask for the permanent mappings (or not) via another bit in a shadow op. Anything else risks not getting the bits set (so memory corruption), or having too many bits set in non-interested cases (unwanted overhead). ~Andrew