Re: Use boot_el to detect hypervisor [patch in bugzilla]
Adrian Chadd <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <CAJ-VmomXnhL6g+qQsN7B4nC6PWnMi1PC+WzGwpzFAh=5Y-W8Ew@mail.gmail.com> |
On Wed, 31 Dec 2025 at 11:44, Andy Carrel <[email protected]> wrote: > > I've sent a patch in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292082 to add a check in machdep.c to use the boot_el = EL1 and presence of EL2 capabilities to detect that we're running under (some) hypervisor, which is taking EL2 for itself. > > This feels a little bit cleaner than relying solely on smbios strings. It doesn't tell us anything about the hypervisor, but we'll know more reliably that there is one there. > > I've tested this on c4a VMs on GCE where I'm using it for an "enable MSI if we're a VM" PCI quirk that I'll submit separately. (Because nvme0 without interrupts is having a real sad day.) I don't have any other arm64 hardware available to me to test with. > -- This looks fine; i faced similar stuff a while back on a vendor that claimed EL2 for itself and we wrote something similar. I'll go chase this up with the other arm64 developers, please poke me if it's not landed/reviewed soon! -adrian > wac