From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TczHd-00006K-Po for qemu-devel@nongnu.org; Mon, 26 Nov 2012 09:03:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TczHU-0003V2-7c for qemu-devel@nongnu.org; Mon, 26 Nov 2012 09:03:37 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:43201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TczHT-0003Ug-OV for qemu-devel@nongnu.org; Mon, 26 Nov 2012 09:03:28 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 26 Nov 2012 14:03:25 -0000 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAQE3Elm65536228 for ; Mon, 26 Nov 2012 14:03:14 GMT Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAQE3L5C015399 for ; Mon, 26 Nov 2012 07:03:21 -0700 Date: Mon, 26 Nov 2012 15:03:19 +0100 From: Cornelia Huck Message-ID: <20121126150319.7cfdbc74@BR9GNB5Z> In-Reply-To: <50B374EC.6090400@greensocs.com> References: <1353595852-30776-1-git-send-email-fred.konrad@greensocs.com> <1353595852-30776-2-git-send-email-fred.konrad@greensocs.com> <20121123130826.285c4d06@BR9GNB5Z> <50B374EC.6090400@greensocs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Konrad Frederic 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 Mon, 26 Nov 2012 14:55:56 +0100 Konrad Frederic wrote: > 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 ? > No idea about virtio-pci devices, but since virtio-ccw will support hotunplugging, we'll certainly need an interface for that.