From nobody Sun May 19 12:45:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628675232525527.0151814092698; Wed, 11 Aug 2021 02:47:12 -0700 (PDT) Received: from localhost ([::1]:34642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDkpL-0008Bi-BG for importer@patchew.org; Wed, 11 Aug 2021 05:47:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDkhM-0003hS-2q; Wed, 11 Aug 2021 05:38:57 -0400 Received: from beetle.greensocs.com ([5.135.226.135]:45404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDkhJ-0005jz-1U; Wed, 11 Aug 2021 05:38:55 -0400 Received: from crumble.bar.greensocs.com (unknown [172.17.10.6]) by beetle.greensocs.com (Postfix) with ESMTPS id F1B0420780; Wed, 11 Aug 2021 09:38:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greensocs.com; s=mail; t=1628674729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tguyCt+BzDdHqIZ4CE6207mB0+/25QkElhg+9VKaH64=; b=O0KI2XarJa58qWIY/qF7JIzTdd5qyfRoOAjzvhAi21lmuDWC2HkbLcULbyzINrFYLMfBuN Z9i/12NbnC5O3PBdxcTdZvhCG8r18E8YpfpxGr/w8ghpZ8QxVjvbpGxflQbT+vTqXpCsJ+ et2C+OlMkleMNnrdFxkF6l2Fie6E+Ek= From: Damien Hedde To: damien.hedde@greensocs.com, qemu-devel@nongnu.org Subject: [PATCH 1/2] hw/char/ibex_uart: set user-creatable Date: Wed, 11 Aug 2021 11:38:37 +0200 Message-Id: <20210811093838.18719-2-damien.hedde@greensocs.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811093838.18719-1-damien.hedde@greensocs.com> References: <20210811093838.18719-1-damien.hedde@greensocs.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=5.135.226.135; envelope-from=damien.hedde@greensocs.com; helo=beetle.greensocs.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Burton , qemu-riscv@nongnu.org, Paolo Bonzini , Alistair Francis , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1628675233643100001 Content-Type: text/plain; charset="utf-8" The ibex_uart meets the criteria to be user_creatable: all parameters are set from properties. Note that this patch, alone, does not allow to create an instance with -device cli option or device_add qmp command. Since it is a sysbus device, additional authorization must be done by the machine. Signed-off-by: Damien Hedde --- hw/char/ibex_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c index 9b0a817713..b1646422c0 100644 --- a/hw/char/ibex_uart.c +++ b/hw/char/ibex_uart.c @@ -546,6 +546,7 @@ static void ibex_uart_class_init(ObjectClass *klass, vo= id *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + dc->user_creatable =3D true; dc->reset =3D ibex_uart_reset; dc->realize =3D ibex_uart_realize; dc->vmsd =3D &vmstate_ibex_uart; --=20 2.32.0 From nobody Sun May 19 12:45:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1628674948793631.4046655830991; Wed, 11 Aug 2021 02:42:28 -0700 (PDT) Received: from localhost ([::1]:59244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDkkk-0005Ok-VQ for importer@patchew.org; Wed, 11 Aug 2021 05:42:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDkhL-0003hD-Ct; Wed, 11 Aug 2021 05:38:55 -0400 Received: from beetle.greensocs.com ([5.135.226.135]:45416) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDkhJ-0005kJ-0z; Wed, 11 Aug 2021 05:38:54 -0400 Received: from crumble.bar.greensocs.com (unknown [172.17.10.6]) by beetle.greensocs.com (Postfix) with ESMTPS id DE08B21C27; Wed, 11 Aug 2021 09:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greensocs.com; s=mail; t=1628674730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9R7jF56aA28DyxjA5hcGXCN/D27QmrYNNCUyrqBlAg=; b=g/kT1PCfqeM6nVXWn/6lzSP3bMcjXT+xgcbfeuna8bYEG8Gf6tiFG7v370ynDual+Vk0I4 eJbCjtOCVK5pp7RZsfFY73kewCb/zlh1AE7betv7NaBbEyplc0NS3alLSqobW8K6hNQVFq aeslmved2TBoUqQ5IUUyr6DLju3OHfg= From: Damien Hedde To: damien.hedde@greensocs.com, qemu-devel@nongnu.org Subject: [PATCH 2/2] hw/char/ibex_plic: set user-creatable Date: Wed, 11 Aug 2021 11:38:38 +0200 Message-Id: <20210811093838.18719-3-damien.hedde@greensocs.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210811093838.18719-1-damien.hedde@greensocs.com> References: <20210811093838.18719-1-damien.hedde@greensocs.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=5.135.226.135; envelope-from=damien.hedde@greensocs.com; helo=beetle.greensocs.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Burton , qemu-riscv@nongnu.org, Paolo Bonzini , Alistair Francis , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1628674951777100002 Content-Type: text/plain; charset="utf-8" The ibex_plic meets the criteria to be user_creatable: all parameters are set from properties. Note that this patch, alone, does not allow to create an instance with -device cli option or device_add qmp command. Since it is a sysbus device, additional authorization must be done by the machine. Signed-off-by: Damien Hedde --- hw/intc/ibex_plic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/ibex_plic.c b/hw/intc/ibex_plic.c index edf76e4f61..8abd5ee613 100644 --- a/hw/intc/ibex_plic.c +++ b/hw/intc/ibex_plic.c @@ -291,6 +291,7 @@ static void ibex_plic_class_init(ObjectClass *klass, vo= id *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 + dc->user_creatable =3D true; dc->reset =3D ibex_plic_reset; device_class_set_props(dc, ibex_plic_properties); dc->realize =3D ibex_plic_realize; --=20 2.32.0