Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154417373
D54595.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
769 B
Referenced Files
None
Subscribers
None
D54595.diff
View Options
diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -772,6 +772,18 @@
identify_cpu(0);
identify_hypervisor_smbios();
+ /*
+ * If the SMBIOS method doesn't work, we can still check if we booted
+ * into EL1 on an EL2-capable CPU.
+ */
+ if (boot_el == CURRENTEL_EL_EL1) {
+ /* Check if EL2 is implemented. */
+ uint64_t pfr0;
+ pfr0 = READ_SPECIALREG(id_aa64pfr0_el1);
+ if (ID_AA64PFR0_EL2_VAL(pfr0) != ID_AA64PFR0_EL2_NONE)
+ vm_guest = VM_GUEST_VM;
+ }
+
update_special_regs(0);
/* Set the pcpu data, this is needed by pmap_bootstrap */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 10:22 AM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32343143
Default Alt Text
D54595.diff (769 B)
Attached To
Mode
D54595: arm64: Add boot_el-based hypervisor detection
Attached
Detach File
Event Timeline
Log In to Comment