virtio-x-bus: force bus name to virtio-bus.

When the proxy id is set, this bus takes the name "id.0" which is expected
to be the virtio-device's first bus.

So force this name to "virtio-bus" as it is an internal bus.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id: 1367330931-12994-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
KONRAD Frederic 2013-04-30 16:08:47 +02:00 committed by Anthony Liguori
parent 0057a0d590
commit f4dd69aa4c
3 changed files with 11 additions and 3 deletions

View File

@ -669,7 +669,10 @@ static void virtio_s390_bus_new(VirtioBusState *bus, VirtIOS390Device *dev)
{ {
DeviceState *qdev = DEVICE(dev); DeviceState *qdev = DEVICE(dev);
BusState *qbus; BusState *qbus;
qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_S390_BUS, qdev, NULL); char virtio_bus_name[] = "virtio-bus";
qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_S390_BUS, qdev,
virtio_bus_name);
qbus = BUS(bus); qbus = BUS(bus);
qbus->allow_hotplug = 1; qbus->allow_hotplug = 1;
} }

View File

@ -1062,8 +1062,10 @@ static void virtio_ccw_bus_new(VirtioBusState *bus, VirtioCcwDevice *dev)
{ {
DeviceState *qdev = DEVICE(dev); DeviceState *qdev = DEVICE(dev);
BusState *qbus; BusState *qbus;
char virtio_bus_name[] = "virtio-bus";
qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_CCW_BUS, qdev, NULL); qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_CCW_BUS, qdev,
virtio_bus_name);
qbus = BUS(bus); qbus = BUS(bus);
qbus->allow_hotplug = 1; qbus->allow_hotplug = 1;
} }

View File

@ -1474,7 +1474,10 @@ static void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev)
{ {
DeviceState *qdev = DEVICE(dev); DeviceState *qdev = DEVICE(dev);
BusState *qbus; BusState *qbus;
qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_PCI_BUS, qdev, NULL); char virtio_bus_name[] = "virtio-bus";
qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_PCI_BUS, qdev,
virtio_bus_name);
qbus = BUS(bus); qbus = BUS(bus);
qbus->allow_hotplug = 1; qbus->allow_hotplug = 1;
} }