Page MenuHomeFreeBSD

D54686.1774933692.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D54686.1774933692.diff

diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h
--- a/sys/arm64/vmm/arm64.h
+++ b/sys/arm64/vmm/arm64.h
@@ -131,6 +131,8 @@
uint64_t feats; /* Which features are enabled */
#define HYP_FEAT_HCX (0x1ul << 0)
#define HYP_FEAT_ECV_POFF (0x1ul << 1)
+#define HYP_FEAT_FGT (0x1ul << 2)
+#define HYP_FEAT_FGT2 (0x1ul << 3)
bool vgic_attached;
struct vgic_v3 *vgic;
struct hypctx *ctx[];
diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c
--- a/sys/arm64/vmm/vmm_arm64.c
+++ b/sys/arm64/vmm/vmm_arm64.c
@@ -525,6 +525,18 @@
if (get_kernel_reg(ID_AA64MMFR0_EL1, &idreg)) {
if (ID_AA64MMFR0_ECV_VAL(idreg) >= ID_AA64MMFR0_ECV_POFF)
hyp->feats |= HYP_FEAT_ECV_POFF;
+
+ switch (ID_AA64MMFR0_FGT_VAL(idreg)) {
+ case ID_AA64MMFR0_FGT_NONE:
+ break;
+ default:
+ case ID_AA64MMFR0_FGT_8_9:
+ hyp->feats |= HYP_FEAT_FGT2;
+ /* FALLTHROUGH */
+ case ID_AA64MMFR0_FGT_8_6:
+ hyp->feats |= HYP_FEAT_FGT;
+ break;
+ }
}
if (get_kernel_reg(ID_AA64MMFR1_EL1, &idreg)) {

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 31, 5:08 AM (3 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28230177
Default Alt Text
D54686.1774933692.diff (1 KB)

Event Timeline