Page MenuHomeFreeBSD

D42735.diff
No OneTemporary

D42735.diff

diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -302,7 +302,7 @@
*/
tst x4, #HCR_E2H
mov x3, #CPTR_RES1 /* HCR_E2H == 0 */
- mov x5, #CPTR_FPEN /* HCR_E2H == 1 */
+ mov x5, #(CPTR_SMEN | CPTR_FPEN | CPTR_ZEN) /* HCR_E2H == 1 */
csel x2, x3, x5, eq
msr cptr_el2, x2
diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h
--- a/sys/arm64/include/hypervisor.h
+++ b/sys/arm64/include/hypervisor.h
@@ -45,10 +45,12 @@
/* CPTR_EL2 - Architecture feature trap register */
/* Valid if HCR_EL2.E2H == 0 */
#define CPTR_RES0 0x7fefc800
-#define CPTR_RES1 0x000033ff
+#define CPTR_RES1 0x000022ff
#define CPTR_TFP 0x00000400
/* Valid if HCR_EL2.E2H == 1 */
+#define CPTR_ZEN 0x00030000
#define CPTR_FPEN 0x00300000
+#define CPTR_SMEN 0x03000000
/* Unconditionally valid */
#define CPTR_TTA 0x00100000
#define CPTR_TCPAC 0x80000000

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 21, 8:50 AM (16 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27110575
Default Alt Text
D42735.diff (948 B)

Event Timeline