From patchwork Mon Sep 4 12:26:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 111591 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1495215qge; Mon, 4 Sep 2017 05:59:19 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6/7bqtDoHtwP4SiW4fnobWfK85XxvtFQK8VmQuEwTk9i5oPpYVEZT1KZKG35XO0j2tME5y X-Received: by 10.55.73.13 with SMTP id w13mr546446qka.259.1504529959022; Mon, 04 Sep 2017 05:59:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504529959; cv=none; d=google.com; s=arc-20160816; b=X+SbQw6UAMlUnQJvV25Xf2WCuxUIhGFAZpWaNoP5qU4vkV9MW/rzm9dV90UMuwsYHZ 96Vu0zAclToX0y2e9Bgk7O+5pVYa9rbTvlXfFLy4Eok0PbNj9v5JB9nWyZ/t88d098cl 1uPUY4jujo39xOXnvTs2f2re0T8ZuP7EcObH35Qlz6nRYwkYOfaCt5awheJL2ndCJw2I 1Y0jtTfQizR/Fh1JeCANuNIUpue1ad8OjeVELDedaN2ZCyWztH7e6QUz/1koam9uG9Il 7gwTXAKAa64MHtZj6N6o1oFD5E+ANFgA7dA5djgnK7L4U5MX64SMW/pdCMYjzfAQE/OL tjCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=EV6Pfgh3qvi1SCFL3mRglU8i0/Vqq4LCJwMJ5LORC8I=; b=WJsgbqejrrs66unFaIcC1g5ioL078YPMnwWwqNN1RHCvDydlCTrCcehSXTcbeMyMrH UAuXAREQaRybTGoWjk4O+izfEPXshfczlVVEZiBfO0u/qlr3jCkn5pz/r33GhA0+BKuY wofRyJ+oeUPKpQZpRim+Wr+oJqNyB4ZRB/ulrS8KlptrBmh/Lg8pNio9DLpmSYuHzRpA yk7CFa9qmRQYxMZqIWaw902DPV+GNHWfzwa37gxChVmtZzyZ7vexVKhAmcwru32CbYl8 QrBnkr3kiDU9Qb6zpZmIOYNSUxPN3A7jfOap4hKQzDnW04ukXfywygIMchhDZFSms82k 6W1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p3si5437257qki.76.2017.09.04.05.59.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 04 Sep 2017 05:59:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqyC-0005dE-V1 for patch@linaro.org; Mon, 04 Sep 2017 08:59:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqSi-0005EK-UQ for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doqSV-0004zY-IE for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:44 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1doqSV-0004yH-BZ for qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:31 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1doqSU-0005dZ-Cf for qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:26:30 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 4 Sep 2017 13:26:04 +0100 Message-Id: <1504527967-29248-34-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504527967-29248-1-git-send-email-peter.maydell@linaro.org> References: <1504527967-29248-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 33/36] hw/arm/aspeed_soc: Mark devices as user_creatable = false 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth QEMU currently aborts if the user is accidentially trying to do something like this: $ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic QEMU 2.9.93 monitor - type 'help' for more information (qemu) device_add ast2400 Unexpected error in error_set_from_qdev_prop_error() at hw/core/qdev-properties.c:1032: Aborted (core dumped) The ast2400 SoC devices are clearly not creatable by the user since they are using the serial_hds and nd_table arrays directly in their realize function, so mark them with user_creatable = false. Signed-off-by: Thomas Huth Reviewed-by: Peter Maydell Reviewed-by: Cédric Le Goater Signed-off-by: Peter Maydell --- hw/arm/aspeed_soc.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index 22dcac9..13c6393 100644 --- a/hw/arm/aspeed_soc.c +++ b/hw/arm/aspeed_soc.c @@ -340,6 +340,8 @@ static void aspeed_soc_class_init(ObjectClass *oc, void *data) sc->info = (AspeedSoCInfo *) data; dc->realize = aspeed_soc_realize; + /* Reason: Uses serial_hds and nd_table in realize() directly */ + dc->user_creatable = false; } static const TypeInfo aspeed_soc_type_info = {