{"id":811521,"url":"http://patchwork.ozlabs.org/api/patches/811521/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-30-david@gibson.dropbear.id.au/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170908103558.31632-30-david@gibson.dropbear.id.au>","list_archive_url":null,"date":"2017-09-08T10:35:47","name":"[PULL,29/40] hw/nvram/spapr_nvram: Device can not be created by the users","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"c3387d8c99d93ffdb136d9bfc3dd01a9841ecc2d","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/?format=json","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-30-david@gibson.dropbear.id.au/mbox/","series":[{"id":2179,"url":"http://patchwork.ozlabs.org/api/series/2179/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2179","date":"2017-09-08T10:35:20","name":"[PULL,01/40] hw/ppc/spapr_drc.c: change spapr_drc_needed to use drc->dev","version":1,"mbox":"http://patchwork.ozlabs.org/series/2179/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811521/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811521/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"nwO3JiXB\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpZ5f1WxFz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 20:57:10 +1000 (AEST)","from localhost ([::1]:44549 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dqGyC-0003TG-AI\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 06:57:08 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58834)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGeD-0002FG-M5\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:39 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGe5-0003KX-7s\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:27 -0400","from ozlabs.org ([103.22.144.67]:34501)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dqGe4-0003GF-Te; Fri, 08 Sep 2017 06:36:21 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xpYdP3BFxz9t50; Fri,  8 Sep 2017 20:36:07 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1504866969;\n\tbh=tttS4riyRynnoj0Z31ZeZKZNpn8k9NG7Vg/R+pOKujE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=nwO3JiXBMiV3PK+BOgma2KD7nRyjNVmgq+ErD+XqbdUDxIEaVD+Y6n5BbaiAm+ICm\n\tRAY27aHJY1DkpdYpRIbRSFc38aMpQxyrTVNlGjXqAlsaUbzdyNrTRtBZvXHSXdLg0l\n\teTmNMQNdQL+3UXFT9zOczgVB8z7pk5goDcjjHPoE=","From":"David Gibson <david@gibson.dropbear.id.au>","To":"peter.maydell@linaro.org","Date":"Fri,  8 Sep 2017 20:35:47 +1000","Message-Id":"<20170908103558.31632-30-david@gibson.dropbear.id.au>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","References":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"[Qemu-devel] [PULL 29/40] hw/nvram/spapr_nvram: Device can not be\n\tcreated by the users","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"qemu-devel@nongnu.org, aik@ozlabs.ru, agraf@suse.de,\n\tmdroth@linux.vnet.ibm.com, qemu-ppc@nongnu.org,\n\tThomas Huth <thuth@redhat.com>, imammedo@redhat.com,\n\tsam.bobroff@au1.ibm.com, David Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"From: Thomas Huth <thuth@redhat.com>\n\nTrying to add a spapr-nvram device currently aborts QEMU like this:\n\n$ ppc64-softmmu/qemu-system-ppc64  -device spapr-nvram\nqemu-system-ppc64: hw/ppc/spapr_rtas.c:407: spapr_rtas_register:\n Assertion `!rtas_table[token].name' failed.\nAborted (core dumped)\n\nThis NVRAM device registers RTAS calls during its realize function\nand thus can only be used once - and that's internally from spapr.c.\nSo let's mark the device with user_creatable = false to avoid that\nthe users can crash their QEMU this way.\n\nSigned-off-by: Thomas Huth <thuth@redhat.com>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n---\n hw/nvram/spapr_nvram.c | 2 ++\n 1 file changed, 2 insertions(+)","diff":"diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c\nindex bc355a4348..4a0aec8e1d 100644\n--- a/hw/nvram/spapr_nvram.c\n+++ b/hw/nvram/spapr_nvram.c\n@@ -264,6 +264,8 @@ static void spapr_nvram_class_init(ObjectClass *klass, void *data)\n     set_bit(DEVICE_CATEGORY_MISC, dc->categories);\n     dc->props = spapr_nvram_properties;\n     dc->vmsd = &vmstate_spapr_nvram;\n+    /* Reason: Internal device only, uses spapr_rtas_register() in realize() */\n+    dc->user_creatable = false;\n }\n \n static const TypeInfo spapr_nvram_type_info = {\n","prefixes":["PULL","29/40"]}