All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Murzin <vladimir.murzin@arm.com>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, julien@xen.org, Volodymyr_Babchuk@epam.com
Subject: [XEN PATCH] xen/arm: Hide Pointer Authentication (PAC)
Date: Wed, 20 Jan 2021 11:27:12 +0000	[thread overview]
Message-ID: <20210120112712.9534-1-vladimir.murzin@arm.com> (raw)

The ARMv8.3 Pointer Authentication extension is not supported by Xen
at the moment, so do not expose that via ID register.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
---
 xen/arch/arm/cpufeature.c        |  6 +++++
 xen/include/asm-arm/cpufeature.h | 38 +++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
index 99fe4db28..1d8878380 100644
--- a/xen/arch/arm/cpufeature.c
+++ b/xen/arch/arm/cpufeature.c
@@ -187,6 +187,12 @@ static int __init create_guest_cpuinfo(void)
 
     /* Hide MTE support as Xen does not support it */
     guest_cpuinfo.pfr64.mte = 0;
+
+    /* Hide PAC support as Xen does not support it */
+    guest_cpuinfo.isa64.apa = 0;
+    guest_cpuinfo.isa64.api = 0;
+    guest_cpuinfo.isa64.gpa = 0;
+    guest_cpuinfo.isa64.gpi = 0;
 #endif
 
     /* Hide AMU support */
diff --git a/xen/include/asm-arm/cpufeature.h b/xen/include/asm-arm/cpufeature.h
index c6e5711b2..43135abef 100644
--- a/xen/include/asm-arm/cpufeature.h
+++ b/xen/include/asm-arm/cpufeature.h
@@ -212,8 +212,44 @@ struct cpuinfo_arm {
         };
     } mm64;
 
-    struct {
+    union {
         uint64_t bits[2];
+        struct {
+            /* ISAR0 */
+            unsigned long __res0:4;
+            unsigned long aes:4;
+            unsigned long sha1:4;
+            unsigned long sha2:4;
+            unsigned long crc32:4;
+            unsigned long atomic:4;
+            unsigned long __res1:4;
+            unsigned long rdm:4;
+            unsigned long sha3:4;
+            unsigned long sm3:4;
+            unsigned long sm4:4;
+            unsigned long dp:4;
+            unsigned long fhm:4;
+            unsigned long ts:4;
+            unsigned long tlb:4;
+            unsigned long rndr:4;
+
+            /* ISAR1 */
+            unsigned long dpb:4;
+            unsigned long apa:4;
+            unsigned long api:4;
+            unsigned long jscvt:4;
+            unsigned long fcma:4;
+            unsigned long lrcpc:4;
+            unsigned long gpa:4;
+            unsigned long gpi:4;
+            unsigned long frintts:4;
+            unsigned long sb:4;
+            unsigned long specres:4;
+            unsigned long bf16:4;
+            unsigned long dgh:4;
+            unsigned long i8mm:4;
+            unsigned long __res0:8;
+        };
     } isa64;
 
     struct {
-- 
2.24.0



             reply	other threads:[~2021-01-20 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 11:27 Vladimir Murzin [this message]
2021-01-20 17:19 ` [XEN PATCH] xen/arm: Hide Pointer Authentication (PAC) Julien Grall
2021-01-20 17:44 ` Julien Grall
2021-01-20 17:49   ` Vladimir Murzin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210120112712.9534-1-vladimir.murzin@arm.com \
    --to=vladimir.murzin@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.