Page MenuHomeFreeBSD

PVH: Set bootmethod to XEN or PVH appropriately
ClosedPublic

Authored by cperciva on Aug 13 2022, 12:57 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 6:18 AM
Unknown Object (File)
Sat, Dec 14, 9:39 AM
Unknown Object (File)
Nov 26 2024, 10:05 AM
Unknown Object (File)
Nov 25 2024, 9:23 PM
Unknown Object (File)
Nov 25 2024, 4:34 AM
Unknown Object (File)
Nov 25 2024, 2:03 AM
Unknown Object (File)
Nov 24 2024, 12:38 AM
Unknown Object (File)
Nov 23 2024, 1:28 AM
Subscribers

Details

Summary

Now that we can PVH boot on a non-Xen hypervisor, we shouldn't set
machdep.bootmethod to "XEN" unconditionally. Instead, set it to
"XEN" if we're running under Xen and "PVH" otherwise.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I'm assuming that the whole issue of overloading boot method with what bios interface is available isn't made worse by this :)

This revision is now accepted and ready to land.Aug 13 2022, 3:12 PM
In D36191#821464, @imp wrote:

I'm assuming that the whole issue of overloading boot method with what bios interface is available isn't made worse by this :)

Right, in this case we're not really booting with PC BIOS *or* UEFI.

I don't think it really matters here, but it caught my eye when I ran sysctl -a | grep -i xen so I figured I might as well fix it. In the longer term I expect this file to move to sys/x86/x86/pvh.c so we can more fully separate "PVH" and "Xen PVH", so this code will be churned later anyway.

I think I would prefer setting it to PVH in both cases, we have other ways to expose the underlying hypervisor, and the boot entry point is the same for Xen or KVM PVH.

Set bootmethod to "PVH" even when we're PVH-booting from Xen, per royger's comment.

This revision now requires review to proceed.Aug 17 2022, 12:18 AM

LGTM, the commit/revision title needs updating AFAICT.

This revision is now accepted and ready to land.Sep 23 2022, 1:53 PM
This revision was automatically updated to reflect the committed changes.