[Bug 292082] Add boot_el-based hypervisor detection for arm64

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292082

            Bug ID: 292082
           Summary: Add boot_el-based hypervisor detection for arm64
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 266710
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=266710&action=edit
sys/arm64/arm64/machdep.c.patch

The only hypervisor detection in arm64 right now is the
identify_hypervisor_smbios call. There is a more systemic way to detect this
for ARM64.

This patch checks if we booted into EL1, then we check if EL2 is implemented.
If EL2 is implemented and we didn't boot into it, we set vm_guest to the
generic VM value. We don't know what the hypervisor is, but we are reasonably
assured there is one which is why we didn't boot into the higher exception
level.

Tested on arm64 c4a VMs on GCE (where this can enable a PCI_QUIRK_ENABLE_MSI_VM
to get MSI correctly enabled without /boot/loader.conf changes).

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.