Page MenuHomeFreeBSD

x86/xen: introduce non-hypercall based emergency print
ClosedPublic

Authored by royger on Feb 16 2024, 12:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 10:06 AM
Unknown Object (File)
Tue, Oct 22, 4:03 AM
Unknown Object (File)
Wed, Oct 16, 3:38 AM
Unknown Object (File)
Tue, Oct 15, 3:01 PM
Unknown Object (File)
Sun, Oct 13, 2:47 PM
Unknown Object (File)
Fri, Oct 11, 9:43 PM
Unknown Object (File)
Thu, Oct 10, 5:04 AM
Unknown Object (File)
Wed, Oct 9, 4:41 PM

Details

Summary

The current xc_printf() function uses an hypercall in order to send character
buffers to the hypervisor for it to print on the hypervisor console (if the
hypervisor is configured to print such messages).

This requires the hypercall page to be initialized, which is extra work and can
go wrong.

On x86 instead of using the console IO hypercall use the debug console IO port,
also called "port E9 hack". This allows sending characters to Xen using an
outb instruction, without any initialization required.

Keep the previous hypervisor based implementation by using the weak attribute,
which allows each architecture to provide an alternate (arch-specific)
implementation.

Sponsored by: Cloud Software Group

Diff Detail

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

Event Timeline

Seems fine to me, I just pointed out some style bugs.

sys/dev/xen/console/xen_console.c
145

The indentation here looks wrong, should be one tab.

sys/x86/xen/hvm.c
98
100

Indentation here looks wrong.

This revision is now accepted and ready to land.Feb 19 2024, 2:00 PM