From: Vladimir Murzin Date: Wed, 20 Jan 2021 11:27:12 +0000 (+0000) Subject: xen/arm: Hide Pointer Authentication (PAC) X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1116 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d64806ba5cd2ac4a01844e63c023c8c2e0aca9f;p=xen.git xen/arm: Hide Pointer Authentication (PAC) 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 Reviewed-by: Bertrand Marquis [julien: s/__res0/__res2/ to avoid name duplication] Reviewed-by: Julien Grall --- diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c index 99fe4db280..1d88783809 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 13a2739a69..70cb67301f 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 __res2:8; + }; } isa64; struct {