From patchwork Fri Jan 19 16:33:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 863648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zNRjB6r4Bz9s7F for ; Sat, 20 Jan 2018 03:53:18 +1100 (AEDT) Received: from localhost ([::1]:59089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZun-0004gR-1E for incoming@patchwork.ozlabs.org; Fri, 19 Jan 2018 11:53:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZd6-000643-Jw for qemu-devel@nongnu.org; Fri, 19 Jan 2018 11:35:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecZd3-0006pd-33 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 11:35:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52636) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecZd2-0006p8-T8; Fri, 19 Jan 2018 11:34:57 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0EBC2B2C4; Fri, 19 Jan 2018 16:34:56 +0000 (UTC) Received: from localhost (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5FB95D6B7; Fri, 19 Jan 2018 16:34:51 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 14:33:34 -0200 Message-Id: <20180119163345.10649-9-ehabkost@redhat.com> In-Reply-To: <20180119163345.10649-1-ehabkost@redhat.com> References: <20180119163345.10649-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 19 Jan 2018 16:34:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v2 08/19] ppc: e500: Allow only supported dynamic sysbus devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Apfelbaum , qemu-ppc@nongnu.org, Alexander Graf , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" platform_bus_create_devtree() already rejects all dynamic sysbus devices except TYPE_ETSEC_COMMON, so register it as the only allowed dynamic sysbus device for the ppce500 machine-type. Cc: Alexander Graf Cc: David Gibson Cc: qemu-ppc@nongnu.org Signed-off-by: Eduardo Habkost Message-Id: <20171125151610.20547-4-ehabkost@redhat.com> Acked-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Eduardo Habkost --- hw/ppc/e500plat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 438118c29b..81d03e1038 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "e500.h" +#include "hw/net/fsl_etsec/etsec.h" #include "hw/boards.h" #include "sysemu/device_tree.h" #include "sysemu/kvm.h" @@ -64,8 +65,7 @@ static void e500plat_machine_init(MachineClass *mc) mc->desc = "generic paravirt e500 platform"; mc->init = e500plat_init; mc->max_cpus = 32; - /*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_ETSEC_COMMON); mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("e500v2_v30"); }