Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8ryS-0008Mw-7s for qemu-devel@nongnu.org; Mon, 03 May 2010 05:30:00 -0400 Received: from [140.186.70.92] (port=52042 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8ryQ-0008Mj-Ps for qemu-devel@nongnu.org; Mon, 03 May 2010 05:29:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8ryP-0005S2-Dy for qemu-devel@nongnu.org; Mon, 03 May 2010 05:29:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11998) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8ryP-0005RH-6s for qemu-devel@nongnu.org; Mon, 03 May 2010 05:29:57 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o439Trj9005764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 3 May 2010 05:29:53 -0400 From: Markus Armbruster References: <20100426152137.34ee9fbe@redhat.com> Date: Mon, 03 May 2010 11:29:50 +0200 In-Reply-To: <20100426152137.34ee9fbe@redhat.com> (Luiz Capitulino's message of "Mon, 26 Apr 2010 15:21:37 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH] Revert "PCI: Convert pci_device_hot_add() to QObject" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > On Mon, 26 Apr 2010 19:44:19 +0200 > Markus Armbruster wrote: > >> We don't want pci_add in QMP. Use device_add instead. >> >> This reverts commit 7a344f7ac7bb651d0556a933ed8060d3a9e5d949. >> >> Conflicts: >> >> hw/pci-hotplug.c >> sysemu.h >> >> Signed-off-by: Markus Armbruster > > The patch looks ok and I'm assuming that device_add can do everything > pci_add does, right? Not quite. pci_add comes in several flavors: * nic: Hot plug a PCI NIC. device_add is more general. * storage: Hot plug a PCI disk controller, and a drive connected to it. The controller is either virtio-blk-pci (if=virtio) or lsi53c895a (if=scsi). With the latter, the drive is optional. Use drive_add to hotplug additional SCSI drives. Except drive_add is not available in QMP. device_add is more general for controllers and the guest part of drives. I'm working on a more general alternative for the host part of drives. Why am I proposing to remove pci_add from QMP before its replacement is ready? I want it out sooner rather than later, because it isn't fully functional (errors and drive_add are missing), and we do not plan to complete the job. In other words, it's not really usable over QMP now, and it's not what we want for QMP anyway. Since we don't want it to be used over QMP, we should take it out, not leave it around as a trap for the uninitiated. Anyway, I'll respin with a more verbose commit message, and I'll throw in the buddy patch Revert "monitor: Convert do_pci_device_hot_remove() to QObject".