From nobody Sat Apr 27 23:54:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528181865684197.8139520162805; Mon, 4 Jun 2018 23:57:45 -0700 (PDT) Received: from localhost ([::1]:44097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQ5uV-0005Y7-SF for importer@patchew.org; Tue, 05 Jun 2018 02:57:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQ5tc-0005AF-JU for qemu-devel@nongnu.org; Tue, 05 Jun 2018 02:56:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQ5tZ-0002dP-Gb for qemu-devel@nongnu.org; Tue, 05 Jun 2018 02:56:44 -0400 Received: from 11.mo4.mail-out.ovh.net ([46.105.34.195]:34539) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fQ5tZ-0002cf-A4 for qemu-devel@nongnu.org; Tue, 05 Jun 2018 02:56:41 -0400 Received: from player746.ha.ovh.net (unknown [10.109.105.10]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id A495217E8DE for ; Tue, 5 Jun 2018 08:56:39 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-TOU-1-49-10.w86-201.abo.wanadoo.fr [86.201.141.10]) (Authenticated sender: clg@kaod.org) by player746.ha.ovh.net (Postfix) with ESMTPSA id 194B0500097; Tue, 5 Jun 2018 08:56:29 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org Date: Tue, 5 Jun 2018 08:56:26 +0200 Message-Id: <20180605065626.4304-1-clg@kaod.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Ovh-Tracer-Id: 3757972417109789523 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedthedrjedvgdduuddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm 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: 46.105.34.195 Subject: [Qemu-devel] [PATCH] spapr/vio: deprecate the "irq" property 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: Thomas Huth , Greg Kurz , qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" VIO devices have an "irq" property that can be used by the sPAPR IRQ allocator as an IRQ number hint. But it is not set in QEMU nor in libvirt. It brings unnecessary complexity to the underlying layers managing the IRQ number space and it is in full opposition with the new static IRQ allocator we want to introduce in sPAPR. Let's deprecate it to simplify the spapr_irq_alloc routine in the future. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Thomas Huth --- qemu-doc.texi | 12 ++++++++++-- hw/ppc/spapr_vio.c | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index f00706b9996c..fd25ddf7a06a 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2970,13 +2970,21 @@ support page sizes < 4096 any longer. The ``xlnx-ep108'' machine has been replaced by the ``xlnx-zcu102'' machin= e. The ``xlnx-zcu102'' machine has the same features and capabilites in QEMU. =20 -@section Block device options +@section Device options =20 -@subsection "backing": "" (since 2.12.0) +@subsection Block device options + +@subsubsection "backing": "" (since 2.12.0) =20 In order to prevent QEMU from automatically opening an image's backing chain, use ``"backing": null'' instead. =20 +@subsection vio-spapr-device device options + +@subsubsection "irq": "" (since 3.0.0) + +The ``irq'' property is obsoleted. + @node Supported build platforms @appendix Supported build platforms =20 diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 472dd6f33a96..28bb3b849b9b 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr_vio.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include "qapi/visitor.h" #include "hw/hw.h" #include "qemu/log.h" #include "sysemu/sysemu.h" @@ -41,8 +42,24 @@ =20 #include =20 +static void spapr_vio_getset_irq(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) +{ + Property *prop =3D opaque; + uint32_t *ptr =3D qdev_get_prop_ptr(DEVICE(obj), prop); + + warn_report(TYPE_VIO_SPAPR_DEVICE " '%s' property is deprecated", name= ); + visit_type_uint32(v, name, ptr, errp); +} + +static const PropertyInfo spapr_vio_irq_propinfo =3D { + .name =3D "irq", + .get =3D spapr_vio_getset_irq, + .set =3D spapr_vio_getset_irq, +}; + static Property spapr_vio_props[] =3D { - DEFINE_PROP_UINT32("irq", VIOsPAPRDevice, irq, 0), \ + DEFINE_PROP("irq", VIOsPAPRDevice, irq, spapr_vio_irq_propinfo, uint32= _t), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.13.6