From nobody Wed Nov 5 17:50:38 2025 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.zoho.com; dkim=fail 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 1496718097382319.13138859270737; Mon, 5 Jun 2017 20:01:37 -0700 (PDT) Received: from localhost ([::1]:35995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI4kR-0004TL-JM for importer@patchew.org; Mon, 05 Jun 2017 23:01:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI4b1-0003ZI-R9 for qemu-devel@nongnu.org; Mon, 05 Jun 2017 22:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dI4az-00031e-Td for qemu-devel@nongnu.org; Mon, 05 Jun 2017 22:51:51 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:54271) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dI4az-0002zw-Gn; Mon, 05 Jun 2017 22:51:49 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3whbmr4wC0z9sNG; Tue, 6 Jun 2017 12:51:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496717500; bh=6+aD3XXVc+DRncrpI++y7kTrAVYC9Va/nskHdKkNpHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g8vixI2zrYoezSVoe7RSIJXPTnNySpQokYJTd1qej7bVl5PY9sFU7wCx5XRwMGsiA FSVuzWRhXBlTQM0e8ObOjuhLoa9b2q9Vc/4DBTUkzeL8DwTCX2usyfZTqFK1vje9Du p4k7CGURHEkdiww+iVPSAecopPo0mu7YH+8aauh4= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 6 Jun 2017 12:51:35 +1000 Message-Id: <20170606025135.2685-18-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606025135.2685-1-david@gibson.dropbear.id.au> References: <20170606025135.2685-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 17/17] spapr: Remove some non-useful properties on DRC objects 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: mdroth@linux.vnet.ibm.com, David Gibson , qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" * 'connector_type' is easily derived from the 'index' property, so there's no point to it (it's also implicit in the QOM type of the DRC) * 'isolation-state', 'indicator-state' and 'allocation-state' are part of the transaction between qemu and guest during PAPR hotplug operations, and outside tools really have no business looking at it (especially not changing, and these were RW properties) * 'entity-sense' is basically just a weird PAPR encoding of whether there is a device connected to this DRC Strictly speaking removing these properties is breaking the qemu interface. However, I'm pretty sure no management tools have ever used these. For debugging there are better alternatives. Therefore, I think removing these broken interfaces is the better option. Signed-off-by: David Gibson Reviewed-by: Michael Roth Acked-by: Michael Roth --- hw/ppc/spapr_drc.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index 06df5d0..39e7f30 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -228,14 +228,6 @@ static void prop_get_index(Object *obj, Visitor *v, co= nst char *name, visit_type_uint32(v, name, &value, errp); } =20 -static void prop_get_type(Object *obj, Visitor *v, const char *name, - void *opaque, Error **errp) -{ - sPAPRDRConnector *drc =3D SPAPR_DR_CONNECTOR(obj); - uint32_t value =3D (uint32_t)spapr_drc_type(drc); - visit_type_uint32(v, name, &value, errp); -} - static char *prop_get_name(Object *obj, Error **errp) { sPAPRDRConnector *drc =3D SPAPR_DR_CONNECTOR(obj); @@ -243,17 +235,6 @@ static char *prop_get_name(Object *obj, Error **errp) return g_strdup(drck->get_name(drc)); } =20 -static void prop_get_entity_sense(Object *obj, Visitor *v, const char *nam= e, - void *opaque, Error **errp) -{ - sPAPRDRConnector *drc =3D SPAPR_DR_CONNECTOR(obj); - sPAPRDRConnectorClass *drck =3D SPAPR_DR_CONNECTOR_GET_CLASS(drc); - uint32_t value; - - drck->entity_sense(drc, &value); - visit_type_uint32(v, name, &value, errp); -} - static void prop_get_fdt(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { @@ -666,20 +647,10 @@ static void spapr_dr_connector_instance_init(Object *= obj) { sPAPRDRConnector *drc =3D SPAPR_DR_CONNECTOR(obj); =20 - object_property_add_uint32_ptr(obj, "isolation-state", - &drc->isolation_state, NULL); - object_property_add_uint32_ptr(obj, "indicator-state", - &drc->indicator_state, NULL); - object_property_add_uint32_ptr(obj, "allocation-state", - &drc->allocation_state, NULL); object_property_add_uint32_ptr(obj, "id", &drc->id, NULL); object_property_add(obj, "index", "uint32", prop_get_index, NULL, NULL, NULL, NULL); - object_property_add(obj, "connector_type", "uint32", prop_get_type, - NULL, NULL, NULL, NULL); object_property_add_str(obj, "name", prop_get_name, NULL, NULL); - object_property_add(obj, "entity-sense", "uint32", prop_get_entity_sen= se, - NULL, NULL, NULL, NULL); object_property_add(obj, "fdt", "struct", prop_get_fdt, NULL, NULL, NULL, NULL); } --=20 2.9.4