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)
Tue, Dec 3, 12:07 PM
Unknown Object (File)
Nov 25 2024, 11:03 PM
Unknown Object (File)
Nov 25 2024, 11:03 PM
Unknown Object (File)
Nov 25 2024, 11:03 PM
Unknown Object (File)
Nov 25 2024, 8:14 PM
Unknown Object (File)
Nov 25 2024, 3:48 PM
Unknown Object (File)
Nov 25 2024, 2:55 PM
Unknown Object (File)
Nov 24 2024, 1:49 PM

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 Skipped
Unit
Tests Skipped

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
445

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

sys/x86/xen/hvm.c
281–283

Should this be hv_high < hv_base + 2?

445

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

446

panic strings don't need newlines.

sys/x86/xen/hvm.c
445

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.