From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2eAE-0008QZ-1G for qemu-devel@nongnu.org; Mon, 13 Jan 2014 04:50:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2e9y-000511-Mw for qemu-devel@nongnu.org; Mon, 13 Jan 2014 04:50:33 -0500 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:41025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2e9p-0004nT-RN for qemu-devel@nongnu.org; Mon, 13 Jan 2014 04:50:18 -0500 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Jan 2014 19:29:39 +1000 From: Alexey Kardashevskiy Date: Mon, 13 Jan 2014 20:29:09 +1100 Message-Id: <1389605349-1989-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] spapr-pci: enable adding PHB via -device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf , Markus Armbruster Recent changes introduced cannot_instantiate_with_device_add_yet and removed capability of adding yet another PCI host bridge via command line for SPAPR platform (POWERPC64 server). This brings the capability back and puts SPAPR PHB into "bridge" category. This is not much use for emulated PHB but it is absolutely required for VFIO as we put an IOMMU group onto a separate PHB on SPAPR. Cc: Markus Armbruster Signed-off-by: Alexey Kardashevskiy --- Are -device and device_add considered synonims? SPAPR PHB can be added via the command line just fine but cannot from device_add as "Bus 'main-system-bus' does not support hotplugging". --- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index ec00300..66ddf10 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -728,6 +728,8 @@ static void spapr_phb_class_init(ObjectClass *klass, void *data) dc->props = spapr_phb_properties; dc->reset = spapr_phb_reset; dc->vmsd = &vmstate_spapr_pci; + set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); + dc->cannot_instantiate_with_device_add_yet = false; } static const TypeInfo spapr_phb_info = { -- 1.8.4.rc4