Received: from eggs.gnu.org ([2001:4830:134:3::10]:59620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSTfj-00029R-LI for qemu-devel@nongnu.org; Sat, 05 Oct 2013 11:21:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSTfa-0003ks-JI for qemu-devel@nongnu.org; Sat, 05 Oct 2013 11:21:35 -0400 Received: from static.92.5.9.176.clients.your-server.de ([176.9.5.92]:35690 helo=hallynmail2) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSTfa-0003kc-Cr for qemu-devel@nongnu.org; Sat, 05 Oct 2013 11:21:26 -0400 Date: Sat, 5 Oct 2013 15:21:24 +0000 From: "Serge E. Hallyn" Message-ID: <20131005152124.GA2070@mail.hallyn.com> References: <524F10DE.5040509@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <524F10DE.5040509@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] pci: Cleanup configuration for pci-hotplug.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev , qemu-devel@nongnu.org Cc: "Serge E. Hallyn" , "Michael S. Tsirkin" , David Gibson Quoting Michael Tokarev (mjt@tls.msk.ru): > 06.06.2013 12:48, David Gibson wrote: > >pci-hotplug.c and the CONFIG_PCI_HOTPLUG variable which controls its > >compilation are misnamed. They're not about PCI hotplug in general, but > >rather about the pci_add/pci_del interface which are now deprecated in > >favour of the more general device_add/device_del interface. This patch > >therefore renames them to pci-hotplug-old.c and CONFIG_PCI_HOTPLUG_OLD. > > > >CONFIG_PCI_HOTPLUG=y was listed twice in {i386,x86_64}-softmmu.make for no > >particular reason, so we clean that up too. In addition it was included in > >ppc64-softmmu.mak for which the old hotplug interface was never used and is > >unsuitable, so we remove that too. > > > >Most of pci-hotplug.c was additionaly protected by #ifdef TARGET_I386. The > >small piece which wasn't is only called from the pci_add and pci_del hooks > >in hmp-commands.hx, which themselves were protected by #ifdef TARGET_I386. > >This patch therefore also removes the #ifdef from pci-hotplug-old.c, > >and changes the ifdefs in hmp-commands.hx to use CONFIG_PCI_HOTPLUG_OLD. > > This patch is wrong, it effectively breaks/removes pci_add/pci_del interface > completely. > > This is because of this change: > > >--- a/hmp-commands.hx > >+++ b/hmp-commands.hx > >@@ -1077,7 +1077,7 @@ STEXI > > Add drive to PCI storage controller. > > ETEXI > > > >-#if defined(TARGET_I386) > >+#if defined(CONFIG_PCI_HOTPLUG_OLD) > > The thing is, while TARGET_I386 is #defined for x86, > CONFIG_PCI_HOTPLUG_OLD, which is listed in default-configs/$target.mak > and config-devices.mak, is not listed in config-host.mak and hence > not listed in config-host.h. So this code is never compiled. > > Thanks, > > /mjt Just replying to (a) include the list and (b) this matches my findings. Thanks for sending this, Michael. -serge