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
F105590059: D43929.id.diff
Wed, Dec 18, 1:02 AM
F105588320: D43929.diff
Wed, Dec 18, 12:30 AM
Unknown Object (File)
Mon, Dec 16, 11:37 PM
Unknown Object (File)
Sun, Dec 15, 2:24 AM
Unknown Object (File)
Tue, Dec 10, 6:41 AM
Unknown Object (File)
Fri, Nov 29, 7:15 AM
Unknown Object (File)
Fri, Nov 29, 7:15 AM
Unknown Object (File)
Mon, Nov 25, 2:29 AM

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