xen/arm: vgic: Clean-up the sysreg emulation
authorJulien Grall <julien.grall@arm.com>
Wed, 7 Dec 2016 12:33:47 +0000 (12:33 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 7 Dec 2016 22:09:05 +0000 (14:09 -0800)
Couple of clean-up for the vgic sysreg emulation:
    - Reference the public documentation rather than a non-public one
    - Let the vgic emulation decides whether a register needs to be
    emulated
    - Drop unnecessary debug printk. They don't bring much information
    and can be misleading (vGICv2 does not support those registers)

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/traps.c

index fb07ae1d671bf4a65ce64dd7f57c83f158c03863..1fe02cb5ccbe64315f92d9782e15916f46ae4f72 100644 (file)
@@ -2261,23 +2261,15 @@ static void do_sysreg(struct cpu_user_regs *regs,
     /*
      * HCR_EL2.FMO or HCR_EL2.IMO
      *
-     * ARMv8: GIC Architecture Specification (PRD03-GENC-010745 24.0)
-     *        Section 4.6.8.
+     * GIC Architecture Specification (IHI 0069C): Section 4.6.3
      */
     case HSR_SYSREG_ICC_SGI1R_EL1:
+    case HSR_SYSREG_ICC_ASGI1R_EL1:
+    case HSR_SYSREG_ICC_SGI0R_EL1:
+
         if ( !vgic_emulate(regs, hsr) )
-        {
-            dprintk(XENLOG_WARNING,
-                    "failed emulation of sysreg ICC_SGI1R_EL1 access\n");
             return inject_undef64_exception(regs, hsr.len);
-        }
         break;
-    case HSR_SYSREG_ICC_SGI0R_EL1:
-    case HSR_SYSREG_ICC_ASGI1R_EL1:
-        /* TBD: Implement to support secure grp0/1 SGI forwarding */
-        dprintk(XENLOG_WARNING,
-                "Emulation of sysreg ICC_SGI0R_EL1/ASGI1R_EL1 not supported\n");
-        return inject_undef64_exception(regs, hsr.len);
 
     /*
      *  ICC_SRE_EL2.Enable = 0