From nobody Mon Feb 9 23:03:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1570639723; cv=none; d=zoho.com; s=zohoarc; b=cvibtblVTaF5UV3/tEYVj7++a4AEfrSacKcLTD8tNUvmTIlq0SA6wkzgRzCm7Q8k9IEgai0xUuiAfNHbQs/yKWGhhQPtJXBQdtUWscCFVWdNiH9jps9duEN7ArWCc2mqnaD8E++Hxx3mYlp+BKMlQvGztNp/w73KOBjMzJN8sFw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570639723; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=li73R6VG6AugPT+nb1lhSq0qQjn8TGYgwP1SkVF9PMs=; b=nccjHNjxET8z4DlZ9uzqmRmxxXqpVHwMex9qGc0qoilZrbN/DntEeoDelaYZbMQ1yy/c+y/a3O0JjvPjBGgftDE57BhusVEpLV5au3K2BC+R5q+oxu+zbGG39YQ3CXsLbT/G1hEKi7yrRd1SYzrNotVgY4P4qnEJT+RqQ+W1yMI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1570639723160319.489315421008; Wed, 9 Oct 2019 09:48:43 -0700 (PDT) Received: from localhost ([::1]:52504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIF8j-0002ng-8Z for importer@patchew.org; Wed, 09 Oct 2019 12:48:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60011) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iI59C-0001XO-04 for qemu-devel@nongnu.org; Wed, 09 Oct 2019 02:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iI59A-0006UN-Cs for qemu-devel@nongnu.org; Wed, 09 Oct 2019 02:08:29 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:51559 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iI599-0006PG-DG; Wed, 09 Oct 2019 02:08:28 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 46p3gD0r2pz9sDB; Wed, 9 Oct 2019 17:08:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1570601304; bh=5KV84r29nIJXr/A9Jl+oWqntFxHPYStDWAbStjFb6C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bkJ07THdIuVgBT3JyE3rvy4J2z1bS07D2dYYlF0NuI76gF2qBT2Ie8VRgRgCqxNKc SlNPgz8YrpCJHkSmMGaJMQE0LNpHgpb+cT5vp0JegZ4DM7j3W2YOsjKecfhNeVOy8g iC6YmQCxd5+TuIjEDa2ka0DR3HbuePfnXdMJAI3s= From: David Gibson To: qemu-devel@nongnu.org, clg@kaod.org, qemu-ppc@nongnu.org Subject: [PATCH v4 01/19] xive: Make some device types not user creatable Date: Wed, 9 Oct 2019 17:08:00 +1100 Message-Id: <20191009060818.29719-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191009060818.29719-1-david@gibson.dropbear.id.au> References: <20191009060818.29719-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 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: Jason Wang , Riku Voipio , groug@kaod.org, Laurent Vivier , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , philmd@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Greg Kurz Some device types of the XIVE model are exposed to the QEMU command line: $ ppc64-softmmu/qemu-system-ppc64 -device help | grep xive name "xive-end-source", desc "XIVE END Source" name "xive-source", desc "XIVE Interrupt Source" name "xive-tctx", desc "XIVE Interrupt Thread Context" These are internal devices that shouldn't be instantiable by the user. By the way, they can't be because their respective realize functions expect link properties that can't be set from the command line: qemu-system-ppc64: -device xive-source: required link 'xive' not found: Property '.xive' not found qemu-system-ppc64: -device xive-end-source: required link 'xive' not found: Property '.xive' not found qemu-system-ppc64: -device xive-tctx: required link 'cpu' not found: Property '.cpu' not found Hide them by setting dc->user_creatable to false in their respective class init functions. Signed-off-by: Greg Kurz Message-Id: <157017473006.331610.2983143972519884544.stgit@bahia.lan> Message-Id: <157045578401.865784.6058183726552779559.stgit@bahia.lan> Reviewed-by: C=C3=A9dric Le Goater [dwg: Folded comment update into base patch] Signed-off-by: David Gibson --- hw/intc/xive.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 29df06df11..453d389848 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -670,6 +670,11 @@ static void xive_tctx_class_init(ObjectClass *klass, v= oid *data) dc->realize =3D xive_tctx_realize; dc->unrealize =3D xive_tctx_unrealize; dc->vmsd =3D &vmstate_xive_tctx; + /* + * Reason: part of XIVE interrupt controller, needs to be wired up + * by xive_tctx_create(). + */ + dc->user_creatable =3D false; } =20 static const TypeInfo xive_tctx_info =3D { @@ -1118,6 +1123,11 @@ static void xive_source_class_init(ObjectClass *klas= s, void *data) dc->props =3D xive_source_properties; dc->realize =3D xive_source_realize; dc->vmsd =3D &vmstate_xive_source; + /* + * Reason: part of XIVE interrupt controller, needs to be wired up, + * e.g. by spapr_xive_instance_init(). + */ + dc->user_creatable =3D false; } =20 static const TypeInfo xive_source_info =3D { @@ -1853,6 +1863,11 @@ static void xive_end_source_class_init(ObjectClass *= klass, void *data) dc->desc =3D "XIVE END Source"; dc->props =3D xive_end_source_properties; dc->realize =3D xive_end_source_realize; + /* + * Reason: part of XIVE interrupt controller, needs to be wired up, + * e.g. by spapr_xive_instance_init(). + */ + dc->user_creatable =3D false; } =20 static const TypeInfo xive_end_source_info =3D { --=20 2.21.0