From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHlXI-0005t3-MW for qemu-devel@nongnu.org; Mon, 07 Dec 2009 16:54:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHlXD-0005oP-HF for qemu-devel@nongnu.org; Mon, 07 Dec 2009 16:54:27 -0500 Received: from [199.232.76.173] (port=46946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHlXD-0005oF-9f for qemu-devel@nongnu.org; Mon, 07 Dec 2009 16:54:23 -0500 Received: from mail-yx0-f188.google.com ([209.85.210.188]:62787) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHlXC-0001EF-R1 for qemu-devel@nongnu.org; Mon, 07 Dec 2009 16:54:23 -0500 Received: by yxe26 with SMTP id 26so4588646yxe.4 for ; Mon, 07 Dec 2009 13:54:22 -0800 (PST) Message-ID: <4B1D7986.3050608@codemonkey.ws> Date: Mon, 07 Dec 2009 15:54:14 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Fix backcompat for hotplug of SCSI controllers References: <1260219109-14380-1-git-send-email-berrange@redhat.com> In-Reply-To: <1260219109-14380-1-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org Daniel P. Berrange wrote: > SCSI controllers have no trouble existing without any attached > disks. This could be achieved with the (legacy) monitor syntax > > pci_add pci_addr=auto storage if=scsi > > This is now denied with > > scsi requires a backing file/device. > failed to add if=scsi > > There is no need for this denial and it breaks compatability > with existing QEMU usage, so remove the check for presence > of a drive. > Gerd, care to comment? This bit of code seems pretty intentional: commit 5b684b5a56e81f6f88234952fe8ed68010c36e19 Author: Gerd Hoffmann Date: Tue Oct 13 13:59:55 2009 +0200 hotplug: fix "pci_add storage if=scsi" > Signed-off-by: Daniel P. Berrange > --- > hw/pci-hotplug.c | 6 +----- > 1 files changed, 1 insertions(+), 5 deletions(-) > > diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c > index 081d6d1..616435a 100644 > --- a/hw/pci-hotplug.c > +++ b/hw/pci-hotplug.c > @@ -182,14 +182,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon, > > switch (type) { > case IF_SCSI: > - if (!dinfo) { > - monitor_printf(mon, "scsi requires a backing file/device.\n"); > - return NULL; > - } > dev = pci_create(bus, devfn, "lsi53c895a"); > if (qdev_init(&dev->qdev) < 0) > dev = NULL; > - if (dev) { > + if (dev && dinfo) { > if (scsi_hot_add(&dev->qdev, dinfo, 0) != 0) { > qdev_unplug(&dev->qdev); > dev = NULL; > Regards, Anthony Liguori