qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 4/7] virtio-pci-bus: introduce virtio-pci-bus


From: KONRAD Frédéric
Subject: Re: [Qemu-devel] [PATCH V2 4/7] virtio-pci-bus: introduce virtio-pci-bus.
Date: Mon, 14 Jan 2013 22:41:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 14/01/2013 22:39, Andreas Färber wrote:
Am 14.01.2013 21:36, schrieb KONRAD Frédéric:
On 14/01/2013 20:08, Anthony Liguori wrote:
address@hidden writes:

+VirtioBusState *virtio_pci_bus_new(VirtIOPCIProxy *dev)
+{
+    DeviceState *qdev = DEVICE(dev);
+    BusState *qbus = qbus_create(TYPE_VIRTIO_PCI_BUS, qdev, NULL);
+    VirtioBusState *bus = VIRTIO_BUS(qbus);
+    qbus->allow_hotplug = 0;
Any reason to not use a qbus_create_inplace()?

Regards,

Anthony Liguori
If I change the bus field of VirtIOPCIProxy from VirtioBus* to VirtioBus
and I use qbus_create_inplace
I can't use qbus_create_inplace(BUS(&dev->bus),...) as the object is not
initialised yet right?
Correct, you need to use qbus_create_inplace((BusState *)&dev->bus,...).
I ran into the same trap for ADB last night. ;)

Andreas

ok, so I'll use the cast.

I suppose it is the same for the s390.

Thanks Andreas!

Fred



reply via email to

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