[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [RFC 05/22] xen/arm: traps: Move MMIO emulation code in a separate helper
 
 
Hi Stefano,
On 16/08/16 01:49, Stefano Stabellini wrote:
 
On Thu, 28 Jul 2016, Julien Grall wrote:
 
 static void do_trap_data_abort_guest(struct cpu_user_regs *regs,
                                      const union hsr hsr)
 {
@@ -2487,40 +2519,16 @@ static void do_trap_data_abort_guest(struct 
cpu_user_regs *regs,
         break;
     }
     case FSC_FLT_TRANS:
-        if ( dabt.s1ptw )
-            goto bad_data_abort;
-
-        /* XXX: Decode the instruction if ISS is not valid */
-        if ( !dabt.valid )
-            goto bad_data_abort;
-
-        /*
-         * Erratum 766422: Thumb store translation fault to Hypervisor may
-         * not have correct HSR Rt value.
-         */
-        if ( check_workaround_766422() && (regs->cpsr & PSR_THUMB) &&
-             dabt.write )
-        {
-            rc = decode_instruction(regs, &info.dabt);
-            if ( rc )
-            {
-                gprintk(XENLOG_DEBUG, "Unable to decode instruction\n");
-                goto bad_data_abort;
-            }
-        }
-
-        if ( handle_mmio(&info) )
+        if ( try_handle_mmio(regs, &info) )
         {
             advance_pc(regs, hsr);
             return;
         }
-        break;
 
I would keep this break, because we don't want to print the warning
below in all error cases, such as !dabt.valid.
 
 
It was meant to be kept, I removed it by error.
 
Aside from the break removal:
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
 
 
Thank you!
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
 
 
    
     |