[Qemu-devel] [PATCH] target/arm: Enable API, APK bits in SCR, HCR

Richard Henderson posted 1 patch 6 years, 9 months ago
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190129143511.12311-1-richard.henderson@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c | 6 ++++++
1 file changed, 6 insertions(+)
[Qemu-devel] [PATCH] target/arm: Enable API, APK bits in SCR, HCR
Posted by Richard Henderson 6 years, 9 months ago
These bits become writable with the ARMv8.3-PAuth extension.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/helper.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/arm/helper.c b/target/arm/helper.c
index 70277222da..a1a2ac7d06 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -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;
-- 
2.17.2


Re: [Qemu-devel] [PATCH] target/arm: Enable API, APK bits in SCR, HCR
Posted by Peter Maydell 6 years, 9 months ago
On Tue, 29 Jan 2019 at 14:35, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> These bits become writable with the ARMv8.3-PAuth extension.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/helper.c | 6 ++++++
>  1 file changed, 6 insertions(+)



Applied to target-arm.next, thanks.

-- PMM