Page MenuHomeFreeBSD

add low level console support to virtio_console driver
AbandonedPublic

Authored by avg on Nov 30 2016, 2:37 PM.

Details

Reviewers
bryanv
jceel
Summary

This is NOT finished code.
This is an invitation for a discussion and colaboration.
I am not even sure if this functionality is really useful given that virtio
device drivers are attached rather late during boot.
Anyway, the code mostly works, I was able to successfully interact with ddb
using cu.

There is a bug with vtcon_cnputc() getting stuck in virtio poll during shutdown
if a console port is active.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6100
Build 6360: arc lint + arc unit

Event Timeline

avg updated this revision to Diff 22619.Nov 30 2016, 2:37 PM
avg retitled this revision from to add low level console support to virtio_console driver.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added reviewers: bryanv, jceel.
bryanv edited edge metadata.Nov 30 2016, 3:16 PM

I'm not against this idea, but, yes, when I first wrote virtio_console I didn't implement this because I didn't consider it very useful.

emaste added a subscriber: emaste.Nov 30 2016, 4:04 PM
jceel edited edge metadata.Nov 30 2016, 4:10 PM

There might be some merit in implementing guest side of emergency write feature - virtio spec says that emergency writes are possible even before device is initialized or even reset, and emergency write port resides inside PCI config space, making it easy to write to it from loader(8) or during kernel early initialization.

In D8680#179876, @jceel wrote:

emergency writes are possible even before device is initialized or even reset

That sounds compelling to me

avg abandoned this revision.Feb 22 2017, 8:23 AM

This was just a toy project, not going to proceed further.
The emergency write feature does sound very interesting.