]> xenbits.xensource.com Git - xen.git/commitdiff
Arm32: MSR to SPSR needs qualification
authorJan Beulich <jbeulich@suse.com>
Fri, 11 Jun 2021 13:04:24 +0000 (15:04 +0200)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 16 Jul 2021 20:11:37 +0000 (13:11 -0700)
The Arm ARM's description of MSR (ARM DDI 0406C.d section B9.3.12)
doesn't even allow for plain "SPSR" here, and while gas accepts this, it
takes it to mean SPSR_cf. Yet surely all of SPSR wants updating on this
path, not just the lowest and highest 8 bits.

Fixes: dfcffb128be4 ("xen/arm32: SPSR_hyp/SPSR")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 93031fbe9f4c341a2e7950a088025ea550291433)

xen/arch/arm/arm32/entry.S

index 8d1327ffe4ef0dd65e33bc36b89a5042a6929651..b7c70f6e8f1ef4383a952143e4f944e2b214fcbd 100644 (file)
@@ -396,7 +396,7 @@ return_to_hypervisor:
         ldr r11, [sp, #UREGS_pc]
         msr ELR_hyp, r11
         ldr r11, [sp, #UREGS_cpsr]
-        msr SPSR, r11
+        msr SPSR_cxsf, r11
 #ifdef CONFIG_ARM32_HARDEN_BRANCH_PREDICTOR
         /*
          * Hardening branch predictor may require to setup a different