Skip to contentSkip to conversation

xen: arm: take FIQ exceptoons to Xen not guest by setting HCR_EL2.FMO

PATCH Superseded Ian Campbell 3 participants 7 messages Jun 16, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: arm: take FIQ exceptoons to Xen not guest by setting HCR_EL2.FMO

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

---
 xen/arch/arm/traps.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/traps.c +2 -2
index 333d5c0..88292a5 100644
@@ -89,8 +89,8 @@ void __cpuinit init_traps(void)
                  CPTR_EL2);
 
     /* Setup hypervisor traps */
-    WRITE_SYSREG(HCR_PTW|HCR_BSU_INNER|HCR_AMO|HCR_IMO|HCR_VM|HCR_TWI|HCR_TSC|
-                 HCR_TAC|HCR_SWIO|HCR_TIDCP, HCR_EL2);
+    WRITE_SYSREG(HCR_PTW|HCR_BSU_INNER|HCR_AMO|HCR_IMO|HCR_FMO|HCR_VM|
+                 HCR_TWI|HCR_TSC|HCR_TAC|HCR_SWIO|HCR_TIDCP, HCR_EL2);
     isb();
 }
 
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ian Campbell

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

Quoted 21 lines
 xen/arch/arm/traps.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/arm/traps.c +2 -2
index 333d5c0..88292a5 100644
@@ -89,8 +89,8 @@ void __cpuinit init_traps(void)
                  CPTR_EL2);
 
     /* Setup hypervisor traps */
-    WRITE_SYSREG(HCR_PTW|HCR_BSU_INNER|HCR_AMO|HCR_IMO|HCR_VM|HCR_TWI|HCR_TSC|
-                 HCR_TAC|HCR_SWIO|HCR_TIDCP, HCR_EL2);
+    WRITE_SYSREG(HCR_PTW|HCR_BSU_INNER|HCR_AMO|HCR_IMO|HCR_FMO|HCR_VM|
+                 HCR_TWI|HCR_TSC|HCR_TAC|HCR_SWIO|HCR_TIDCP, HCR_EL2);
     isb();
 }
 
Signature · 1 line
1.7.10.4
#2 lore raw
Quoted 8 lines · Stefano Stabellini
Quoted 5 lines · Ian Campbell

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

Thanks.

I'll obviously fix the typo in $subject as this goes in...

#3 lore raw
In reply to Ian Campbell

Hi Ian,

There is small typo in the commit title:

s/exceptoons/exceptions/

Quoted 3 lines · Ian Campbell

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

May I ask for a reference in the ARM ARM? I can't find any paragraph stating that the FIQ is taken in guest mode if HCR.EL2.FMO is not set.

Regards,

Signature · 1 line
Julien Grall
#4 lore raw
Quoted 5 lines · Julien Grall

Hi Ian,

There is small typo in the commit title:

s/exceptoons/exceptions/

Spotted, thanks

Quoted 7 lines · Ian Campbell
Quoted 3 lines

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

May I ask for a reference in the ARM ARM? I can't find any paragraph stating that the FIQ is taken in guest mode if HCR.EL2.FMO is not set.

That's pretty much the meaning of that bit, it's analogous to HCR_EL2.IMO which does the same for regular interrupts and .AMO which does the same for async aborts.

Ian.

Acked-by
#5 lore raw
Quoted 14 lines · Ian Campbell
Quoted 5 lines · Julien Grall

Hi Ian,

There is small typo in the commit title:

s/exceptoons/exceptions/

Spotted, thanks

Quoted 5 lines · Ian Campbell
Quoted 3 lines

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

Quoted 6 lines
Quoted 2 lines

May I ask for a reference in the ARM ARM? I can't find any paragraph stating that the FIQ is taken in guest mode if HCR.EL2.FMO is not set.

That's pretty much the meaning of that bit, it's analogous to HCR_EL2.IMO which does the same for regular interrupts and .AMO which does the same for async aborts.

AFAIU this bit is firstly use to change the masking of CPSR. My first thought was about it. I had to follow multiple link before finding the right paragraph about the routing.

Can you add a reference to B1.8.4?

Regards,

Signature · 1 line
Julien Grall
#6 lore raw
Quoted 22 lines · Julien Grall
Quoted 14 lines · Ian Campbell
Quoted 5 lines · Julien Grall

Hi Ian,

There is small typo in the commit title:

s/exceptoons/exceptions/

Spotted, thanks

Quoted 5 lines · Ian Campbell
Quoted 3 lines

So far none of the platforms which we support use FIQ for anything, but when we end up supporting one it would be far better to surprise Xen with them than whatever guest happens to be running...

Quoted 6 lines
Quoted 2 lines

May I ask for a reference in the ARM ARM? I can't find any paragraph stating that the FIQ is taken in guest mode if HCR.EL2.FMO is not set.

That's pretty much the meaning of that bit, it's analogous to HCR_EL2.IMO which does the same for regular interrupts and .AMO which does the same for async aborts.

Quoted 5 lines

AFAIU this bit is firstly use to change the masking of CPSR. My first thought was about it. I had to follow multiple link before finding the right paragraph about the routing.

Can you add a reference to B1.8.4?

OK.

Quoted 5 lines

Regards,