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, 07 Oct 2009 13:33:57 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-2.7.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4

On 10/07/09 12:06, Amit Shah wrote:
Oh, I thought it would create a new virtio-serial-bus (plus auto-created
port0 console) unconditionally.  Just do enougth to keep existing users
of the switch working.

If you want new features (i.e. two consoles ports attached to one
virtio-serial-bus device) you must use the new syntax.

So it's better overall to drop the old syntax altogether, right? It
could get easily confusing otherwise.

We can easily end up having:

-virtioconsole<chardev>
<auto-creates a bus and attaches a console port to it>

-device virtio-serial-pci,id=blah
<a second bus>

-device virtport,bus=blah.0

<and no way to connect a device to the bus that got created by
virtioconsole>

It isn't that bad.

First, the busses get names based on the bus type by default, i.e. when creating a scsi adapter without specifying id=seomthing the bus is simply named "scsi.0". Likewise the -virtioconsole created bus would be "port.0" or simliar (depends on the name in BusInfo).

Second, the bus= argument is optional. If not specified, qdev will pick the first bus of a matching type it finds. So as long you have a single port/scsi/usb/... bus only you don't need bus= at all. You can do:

 -virtioconsole <chardev> -device virtport,<args>

and it will work just fine (creating a bus with the autocreated console and additionally a virtport device attached to the same bus).

cheers,
  Gerd





reply via email to

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