From: Tim Deegan Subject: Re: [PATCH v5 2/2] add a new p2m type - p2m_mmio_write_dm Date: Fri, 5 Dec 2014 10:42:17 +0100 Message-ID: <20141205094217.GA25082@deinos.phlegethon.org> References: <1417698806-26807-1-git-send-email-yu.c.zhang@linux.intel.com> <1417698806-26807-3-git-send-email-yu.c.zhang@linux.intel.com> <20141204160445.GD43116@deinos.phlegethon.org> <548111CC.1070300@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <548111CC.1070300@linux.intel.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: "Yu, Zhang" Cc: kevin.tian@intel.com, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, donald.d.dugger@intel.com, Xen-devel@lists.xen.org, Paul.Durrant@citrix.com, zhiyuan.lv@intel.com, JBeulich@suse.com, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org Hi, At 10:00 +0800 on 05 Dec (1417770044), Yu, Zhang wrote: > >> @@ -5978,7 +5982,8 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg) > >> goto param_fail4; > >> } > >> if ( !p2m_is_ram(t) && > >> - (!p2m_is_hole(t) || a.hvmmem_type != HVMMEM_mmio_dm) ) > >> + (!p2m_is_hole(t) || a.hvmmem_type != HVMMEM_mmio_dm) && > >> + t != p2m_mmio_write_dm ) > > > > I think that Jan already brough this up, and maybe I missed your > > answer: this realaxation looks wrong to me. I would have thought that > > transition between p2m_mmio_write_dm and p2m_ram_rw/p2m_ram_logdirty > > would be the only ones you would want to allow. > > Ha. Sorry, my negligence, and thanks for pointing out. :) > The transition we use now is only between p2m_mmio_write_dm and > p2m_ram_rw. So how about this: > > if ( !p2m_is_ram(t) && > (!p2m_is_hole(t) || a.hvmmem_type != HVMMEM_mmio_dm) && > (t != p2m_mmio_write_dm || a.hvmmem_type != HVMMEM_ram_rw) ) Yes, I think that's right. Cheers, Tim.