From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TczA6-00030n-IL for qemu-devel@nongnu.org; Mon, 26 Nov 2012 08:55:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tcz9v-0001RJ-Jn for qemu-devel@nongnu.org; Mon, 26 Nov 2012 08:55:50 -0500 Received: from greensocs.com ([87.106.252.221]:48371 helo=s15328186.onlinehome-server.info) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tcz9v-0001R6-DJ for qemu-devel@nongnu.org; Mon, 26 Nov 2012 08:55:39 -0500 Message-ID: <50B374EC.6090400@greensocs.com> Date: Mon, 26 Nov 2012 14:55:56 +0100 From: Konrad Frederic MIME-Version: 1.0 References: <1353595852-30776-1-git-send-email-fred.konrad@greensocs.com> <1353595852-30776-2-git-send-email-fred.konrad@greensocs.com> <20121123130826.285c4d06@BR9GNB5Z> In-Reply-To: <20121123130826.285c4d06@BR9GNB5Z> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, e.voevodin@samsung.com, mark.burton@greensocs.com, qemu-devel@nongnu.org, stefanha@redhat.com, afaerber@suse.de On 23/11/2012 13:08, Cornelia Huck wrote: > On Thu, 22 Nov 2012 15:50:50 +0100 > fred.konrad@greensocs.com wrote: > > >> +/* Create a virtio bus. */ >> +VirtioBus *virtio_bus_new(DeviceState *host, const VirtioBusInfo *info) >> +{ >> + /* >> + * This is needed, as we want to have different names for each virtio-bus. >> + * If we don't do that, we can't add more than one VirtIODevice. >> + */ >> + static int next_virtio_bus; >> + char *bus_name = g_strdup_printf("virtio-bus.%d", next_virtio_bus++); > This still has the overflow/id-reuse problem, hasn't it? > >> + >> + BusState *qbus = qbus_create(TYPE_VIRTIO_BUS, host, bus_name); >> + VirtioBus *bus = VIRTIO_BUS(qbus); >> + bus->info = info; >> + qbus->allow_hotplug = 0; >> + bus->bus_in_use = false; >> + DPRINTF("%s bus created\n", bus_name); >> + return bus; >> +} > Don't you need a way to destroy the bus again when the proxy device is > hotunplugged? > Is the virtio-pci-* proxy currently supporting hotunplugging ?