git: 5c2f2c5c7a17 - main - arm64/vmm: Support reading MPIDR_EL1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Aug 2025 09:51:43 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=5c2f2c5c7a17b94d151ffbb822cfa6cb10d4a4e1
commit 5c2f2c5c7a17b94d151ffbb822cfa6cb10d4a4e1
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2025-08-07 09:20:14 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2025-08-07 09:45:15 +0000
arm64/vmm: Support reading MPIDR_EL1
We may need access to this in userspace, e.g. to put into the FDT.
Reviewed by: markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51762
---
sys/arm64/include/vmm.h | 1 +
sys/arm64/vmm/vmm_arm64.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h
index 1d783cdacb0d..73b5b4a09591 100644
--- a/sys/arm64/include/vmm.h
+++ b/sys/arm64/include/vmm.h
@@ -89,6 +89,7 @@ enum vm_reg_name {
VM_REG_GUEST_TTBR1_EL1,
VM_REG_GUEST_TCR_EL1,
VM_REG_GUEST_TCR2_EL1,
+ VM_REG_GUEST_MPIDR_EL1,
VM_REG_LAST
};
diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c
index de2425aae0a1..e293c99a6646 100644
--- a/sys/arm64/vmm/vmm_arm64.c
+++ b/sys/arm64/vmm/vmm_arm64.c
@@ -1251,6 +1251,8 @@ hypctx_regptr(struct hypctx *hypctx, int reg)
return (&hypctx->tcr_el1);
case VM_REG_GUEST_TCR2_EL1:
return (&hypctx->tcr2_el1);
+ case VM_REG_GUEST_MPIDR_EL1:
+ return (&hypctx->vmpidr_el2);
default:
break;
}