From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZdF-0006Ca-UT for qemu-devel@nongnu.org; Fri, 19 Jan 2018 11:35:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecZdB-0006tX-UV for qemu-devel@nongnu.org; Fri, 19 Jan 2018 11:35:09 -0500 From: Eduardo Habkost Date: Fri, 19 Jan 2018 14:33:35 -0200 Message-Id: <20180119163345.10649-10-ehabkost@redhat.com> In-Reply-To: <20180119163345.10649-1-ehabkost@redhat.com> References: <20180119163345.10649-1-ehabkost@redhat.com> Subject: [Qemu-devel] [PULL v2 09/19] spapr: Allow only supported dynamic sysbus devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Marcel Apfelbaum , David Gibson , Alexander Graf , qemu-ppc@nongnu.org TYPE_SPAPR_PCI_HOST_BRIDGE is the only dynamic sysbus device not rejected by ppc_spapr_reset(), so it can be the only entry on the allowed list. Cc: David Gibson Cc: Alexander Graf Cc: qemu-ppc@nongnu.org Signed-off-by: Eduardo Habkost Message-Id: <20171125151610.20547-5-ehabkost@redhat.com> Acked-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Eduardo Habkost --- hw/ppc/spapr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 5847175fd9..278f9de1e7 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3843,8 +3843,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) mc->default_boot_order = ""; mc->default_ram_size = 512 * M_BYTE; mc->kvm_type = spapr_kvm_type; - /*TODO: allow only sysbus devices that really work with this machine */ - machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SYS_BUS_DEVICE); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SPAPR_PCI_HOST_BRIDGE); mc->pci_allow_0_address = true; mc->get_hotplug_handler = spapr_get_hotplug_handler; hc->pre_plug = spapr_machine_device_pre_plug; -- 2.14.3