Skip to contentSkip to conversation

target/arm: Enable API, APK bits in SCR, HCR

PATCH Applied Richard Henderson 2 participants 2 messages Jan 29, 2019 – Jan 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/arm: Enable API, APK bits in SCR, HCR

These bits become writable with the ARMv8.3-PAuth extension.

---
 target/arm/helper.c | 6 ++++++
 1 file changed, 6 insertions(+)
target/arm/helper.c +6 -0
index 70277222da..a1a2ac7d06 100644
@@ -1747,6 +1747,9 @@ static void scr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)
     if (cpu_isar_feature(aa64_lor, cpu)) {
         valid_mask |= SCR_TLOR;
     }
+    if (cpu_isar_feature(aa64_pauth, cpu)) {
+        valid_mask |= SCR_API | SCR_APK;
+    }
 
     /* Clear all-context RES0 bits.  */
     value &= valid_mask;
@@ -4444,6 +4447,9 @@ static void hcr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value)
     if (cpu_isar_feature(aa64_lor, cpu)) {
         valid_mask |= HCR_TLOR;
     }
+    if (cpu_isar_feature(aa64_pauth, cpu)) {
+        valid_mask |= HCR_API | HCR_APK;
+    }
 
     /* Clear RES0 bits.  */
     value &= valid_mask;
Signature · 1 line
2.17.2
#1 lore raw
Quoted 7 lines · Richard Henderson

These bits become writable with the ARMv8.3-PAuth extension.

---
 target/arm/helper.c | 6 ++++++
 1 file changed, 6 insertions(+)

Applied to target-arm.next, thanks.

-- PMM