qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, s


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports
Date: Wed, 30 Sep 2009 20:39:34 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

BTW the kernel too doesn't support multiple devices so far.

Needs fixing too ;)

I'd suggest to look what do do when another user which wants buffering
comes along.  Might be the requirements are different, so it wouldn't
work anyway.

Also when you pass around pointers to VirtConPortBuffer the port drivers
can implement buffering very easily.

It will mostly be duplicated. Right now, I pass on an entire message as
was passed on by the kernel in one write() request. If I start passing
around buffers, it'll be incomplete messages (eg, an 8K write request in
the kernel will be split in two buffers of 4K each -- or three buffers
with the last one containing a few bytes). I don't think I want the ports
to worry about that. The ports should just get the entire message.

Sure. I think there is a misunderstanding here. I meant only the "buffer messages when unconnected" thing. Reassembling the messages in the core and forward only complete messages to the ports is fine.

So I don't think I want to expose the buffers to individual devices.

My idea was to pass the (reassembled) message to the port drivers in a form they can just stick into a list without memcpy()ing the message in case they want to keep it. Maybe to buffer it because the chardev is unconnected. Maybe just keep the most recent message because it contains some kind of guest status.

VirtConPortBuffer looked like it could do the job. Well, not perfectly, it has extra status which is needed only by the core for reassembling messages.

They are handled differently though.  I think console will not do any
buffering at all, whereas serial-port provides the option to do
buffering.

But the buffering is independent of the char drivers.

See above ;)

Basically I've now dropped the old -virtioconsole argument.

So one has to do:

-device virtio-console-pci -device virtioconsole ...

to start a console.

If you do '-device virtio-console-pci -device virtio-port' (i.e. no console) and boot a old guest kernel which expects a (single) console being there, what will happen?

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]