Message ID | 1264609339-24353-1-git-send-email-amit.shah@redhat.com |
---|---|
State | New |
Headers | show |
Amit Shah <amit.shah@redhat.com> writes: > This commit enables one to use multiple virtio-serial devices and to > assign ports to arbitrary devices like this: > > -device virtio-serial,id=foo -device virtio-serial,id=bar \ > -device virtserialport,bus=foo.0,name=foo \ > -device virtserialport,bus=bar.0,name=bar > > Signed-off-by: Amit Shah <amit.shah@redhat.com> Yes, please. Without this, all virtio-serial devices name their bus the same, and you have to use something like bus=pci.0/foo/virtio-serial-bus to refer to one.
On 01/27/2010 10:22 AM, Amit Shah wrote: > This commit enables one to use multiple virtio-serial devices and to > assign ports to arbitrary devices like this: > > -device virtio-serial,id=foo -device virtio-serial,id=bar \ > -device virtserialport,bus=foo.0,name=foo \ > -device virtserialport,bus=bar.0,name=bar > > Signed-off-by: Amit Shah<amit.shah@redhat.com> > Applied. Thanks. Regards, Anthony Liguori > --- > hw/virtio-serial-bus.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c > index 403268f..ab456ea 100644 > --- a/hw/virtio-serial-bus.c > +++ b/hw/virtio-serial-bus.c > @@ -445,8 +445,7 @@ static VirtIOSerialBus *virtser_bus_new(DeviceState *dev) > { > VirtIOSerialBus *bus; > > - bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, > - "virtio-serial-bus")); > + bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, NULL)); > bus->qbus.allow_hotplug = 1; > > return bus; >
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 403268f..ab456ea 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -445,8 +445,7 @@ static VirtIOSerialBus *virtser_bus_new(DeviceState *dev) { VirtIOSerialBus *bus; - bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, - "virtio-serial-bus")); + bus = FROM_QBUS(VirtIOSerialBus, qbus_create(&virtser_bus_info, dev, NULL)); bus->qbus.allow_hotplug = 1; return bus;
This commit enables one to use multiple virtio-serial devices and to assign ports to arbitrary devices like this: -device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \ -device virtserialport,bus=bar.0,name=bar Signed-off-by: Amit Shah <amit.shah@redhat.com> --- hw/virtio-serial-bus.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)