Page MenuHomeFreeBSD

x86/xen: implement early init hook
ClosedPublic

Authored by royger on Feb 6 2024, 8:42 AM.
Tags
Referenced Files
Unknown Object (File)
Mon, Apr 22, 7:36 AM
Unknown Object (File)
Mon, Apr 22, 3:20 AM
Unknown Object (File)
Sat, Apr 20, 4:36 PM
Unknown Object (File)
Sat, Apr 20, 3:18 PM
Unknown Object (File)
Mar 22 2024, 5:05 PM
Unknown Object (File)
Mar 17 2024, 10:03 AM
Unknown Object (File)
Mar 17 2024, 10:03 AM
Unknown Object (File)
Mar 17 2024, 10:02 AM

Details

Summary

Unify the HVM and PVH early setup, byt making both rely on the hypervisor
initialization hook part of identify_hypervisor().

The current initialization takes care of the hypercall page, the sahred info
page and does any fixup necessary to metadata video console information if
FreeBSD is booted as the initial domain (so the video console is handed from
Xen into FreeBSD).

Note this has the nice side effect of also allowing to use the Xen console on
HVM guests, which allows to get rid of the QEMU emulated uart and still get
a nice text console.

Sponsored by: Cloud Software Group

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

royger requested review of this revision.Feb 6 2024, 8:42 AM
royger edited the summary of this revision. (Show Details)

Could you please upload diffs with context? i.e., add -U99999 or so to diff's parameters.

Could you please upload diffs with context? i.e., add -U99999 or so to diff's parameters.

Hm, that's the output from git format-patch. I wonder why it doesn't pick the context automatically from the repo?

Could you please upload diffs with context? i.e., add -U99999 or so to diff's parameters.

Hm, that's the output from git format-patch. I wonder why it doesn't pick the context automatically from the repo?

How are you uploading it? arc diff --create <revision> or git arc create will indeed fetch context automatically. If you're manually uploading diffs, then it won't. See https://wiki.freebsd.org/Phabricator#Create_a_Revision

Could you please upload diffs with context? i.e., add -U99999 or so to diff's parameters.

Hm, that's the output from git format-patch. I wonder why it doesn't pick the context automatically from the repo?

How are you uploading it? arc diff --create <revision> or git arc create will indeed fetch context automatically. If you're manually uploading diffs, then it won't. See https://wiki.freebsd.org/Phabricator#Create_a_Revision

I'm uploading manually, as getting arc setup is a pain.

Upload diff with context.

Guess I had it easy as I had a system running Linux and arcanist was available as a package.

I was hoping to check map_shared_info() since that is also needed on ARM.

sys/x86/xen/hvm.c
455

The implementation of map_shared_info() is missing from this diff.

sys/x86/xen/hvm.c
291–293

Should this be hv_high < hv_base + 2?

455

Is there any reason not to put it in phabricator as well? It's harder to understand this diff without having read that one.

456

panic strings don't need newlines.

sys/x86/xen/hvm.c
455

I would usually not get review for Xen specific patches, but can put the whole series on phab if there's interest.

Context adjustments due to modifications in previous patches

This revision is now accepted and ready to land.Feb 19 2024, 2:11 PM
This revision was automatically updated to reflect the committed changes.