Print VHE feature in dmesg.
authorkettenis <kettenis@openbsd.org>
Sat, 29 Apr 2023 08:50:53 +0000 (08:50 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 29 Apr 2023 08:50:53 +0000 (08:50 +0000)
ok mlarkin@, patrick@

sys/arch/arm64/arm64/cpu.c

index a7e7d52..631b9f1 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: cpu.c,v 1.88 2023/04/13 02:19:04 jsg Exp $    */
+/*     $OpenBSD: cpu.c,v 1.89 2023/04/29 08:50:53 kettenis Exp $       */
 
 /*
  * Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -666,8 +666,7 @@ cpu_identify(struct cpu_info *ci)
        /*
         * ID_AA64MMFR1
         *
-        * We omit printing virtualization related fields like XNX, VH
-        * and VMIDBits as they are not really relevant for us.
+        * We omit printing most virtualization related fields for now.
         */
        id = READ_SPECIALREG(id_aa64mmfr1_el1);
 
@@ -695,6 +694,11 @@ cpu_identify(struct cpu_info *ci)
                sep = ",";
        }
 
+       if (ID_AA64MMFR1_VH(id) >= ID_AA64MMFR1_VH_IMPL) {
+               printf("%sVH", sep);
+               sep = ",";
+       }
+
        if (ID_AA64MMFR1_HAFDBS(id) >= ID_AA64MMFR1_HAFDBS_AF) {
                printf("%sHAF", sep);
                sep = ",";