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: Amit Shah
Subject: Re: [Qemu-devel] [PATCH 3/6] virtio-console: Add a virtio-console bus, support for multiple ports
Date: Thu, 1 Oct 2009 10:24:39 +0530
User-agent: Mutt/1.5.19 (2009-01-05)

On (Wed) Sep 30 2009 [20:39:34], Gerd Hoffmann wrote:
>> BTW the kernel too doesn't support multiple devices so far.
>
> Needs fixing too ;)

Agreed :-) I've fixed multiple devices in qemu.

>>> 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.

OK; so in that case, passing a ptr to the buffer and its length is fine,
no?

>> 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?

OK -- I get what you're saying now. However, I don't see any problem
here. If there is no virtioconsole specified to qemu, there's no reason
to expect a console in the guest. That was the case in the past and is
the case now as well. The difference is earlier, when probe() in the
guest was called, it definitely meant the existence of a console. Now,
even if probe() is invoked, it doesn't mean a console was found. But
this hardly is a concern.

Also, the way to attach to a virtioconsole is by spawning a tty on
/dev/hvc0. If no -virtioconsole is specified on the host command line,
no hvc device is spawned on the guest. So things are as they are.

                Amit




reply via email to

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