[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 8/9] xen/arm: Implement hypercall for dirty page tracing



On Thu, 2013-10-10 at 15:13 +0100, Julien Grall wrote:
> 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.

Looks good to me too, assuming you are happy with the ordering of MMIO
handling vs page faults.

> 
> Cheers,
> 



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.