From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 8/9] xen/arm: Implement hypercall for dirty page tracing Date: Thu, 10 Oct 2013 15:13:24 +0100 Message-ID: <5256B604.8070706@linaro.org> References: <25269810.259001381213751804.JavaMail.weblogic@epml25> <1381221960.9920.4.camel@kazak.uk.xensource.com> <007301cec40b$4a9fbcf0$dfdf36d0$%yoo@samsung.com> <5254268A.4010403@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5254268A.4010403@samsung.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: Eugene Fedotov Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 10/08/2013 04:36 PM, Eugene Fedotov wrote: > If we move necessary checking into handle_page_fault routine, so the > resulting patch for traps.c will look more simple: > > --- a/xen/arch/arm/traps.c > +++ b/xen/arch/arm/traps.c > @@ -1313,6 +1313,8 @@ static void do_trap_data_abort_guest(struct > cpu_user_regs *regs, > const char *msg; > int rc, level = -1; > mmio_info_t info; > + int page_fault = ( (dabt.dfsc & FSC_MASK) == > + (FSC_FLT_PERM | FSC_3D_LEVEL) && dabt.write ); > > if ( !check_conditional_instr(regs, hsr) ) > { > @@ -1334,6 +1336,13 @@ static void do_trap_data_abort_guest(struct > cpu_user_regs *regs, > if ( rc == -EFAULT ) > goto bad_data_abort; > > + /* domU page fault handling for guest live migration */ > + /* dabt.valid can be 0 here */ > + if ( page_fault && handle_page_fault(current->domain, info.gpa) ) > + { > + /* Do not modify pc after page fault to repeat memory operation */ > + return; > + } > /* XXX: Decode the instruction if ISS is not valid */ > if ( !dabt.valid ) > goto bad_data_abort; > > Will it be acceptable, or you think "else" statement looks more better? I'm fine with this solution. Cheers, -- Julien Grall