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)
Mon, May 13, 3:18 AM
Unknown Object (File)
Fri, May 3, 8:01 PM
Unknown Object (File)
Apr 6 2024, 2:22 AM
Unknown Object (File)
Apr 6 2024, 12:20 AM
Unknown Object (File)
Mar 18 2024, 9:42 AM
Unknown Object (File)
Feb 22 2024, 10:31 AM
Unknown Object (File)
Feb 18 2024, 7:53 PM
Unknown Object (File)
Feb 18 2024, 5:58 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