qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: lvivier@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	bharata@linux.vnet.ibm.com, sursingh@redhat.com, groug@kaod.org
Subject: Re: [Qemu-devel] [PATCH 5/5] spapr: Remove some non-useful properties on DRC objects
Date: Sat, 03 Jun 2017 17:34:26 -0500	[thread overview]
Message-ID: <149652926658.2695.5793892804950077026@loki> (raw)
In-Reply-To: <20170602072952.25454-6-david@gibson.dropbear.id.au>

Quoting David Gibson (2017-06-02 02:29:52)
>  * '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.

Debugging was indeed the primary motivation behind these. I agree these
don't really serve any useful purpose now and probably should've just
been traces from the start.

> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>

> ---
>  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 d43c9cd..4dd26a8 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, const char *name,
>      visit_type_uint32(v, name, &value, errp);
>  }
> 
> -static void prop_get_type(Object *obj, Visitor *v, const char *name,
> -                          void *opaque, Error **errp)
> -{
> -    sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);
> -    uint32_t value = (uint32_t)spapr_drc_type(drc);
> -    visit_type_uint32(v, name, &value, errp);
> -}
> -
>  static char *prop_get_name(Object *obj, Error **errp)
>  {
>      sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);
> @@ -243,17 +235,6 @@ static char *prop_get_name(Object *obj, Error **errp)
>      return g_strdup(drck->get_name(drc));
>  }
> 
> -static void prop_get_entity_sense(Object *obj, Visitor *v, const char *name,
> -                                  void *opaque, Error **errp)
> -{
> -    sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);
> -    sPAPRDRConnectorClass *drck = 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)
>  {
> @@ -670,20 +651,10 @@ static void spapr_dr_connector_instance_init(Object *obj)
>  {
>      sPAPRDRConnector *drc = SPAPR_DR_CONNECTOR(obj);
> 
> -    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_sense,
> -                        NULL, NULL, NULL, NULL);
>      object_property_add(obj, "fdt", "struct", prop_get_fdt,
>                          NULL, NULL, NULL, NULL);
>  }
> -- 
> 2.9.4
> 

      reply	other threads:[~2017-06-03 22:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  7:29 [Qemu-devel] [PATCH 0/5] spapr: DRC cleanups (part II) David Gibson
2017-06-02  7:29 ` [Qemu-devel] [PATCH 1/5] spapr: Introduce DRC subclasses David Gibson
2017-06-03 22:05   ` Michael Roth
2017-06-04 10:25     ` David Gibson
2017-06-05  3:31   ` [Qemu-devel] [PATCHv2 " David Gibson
2017-06-05 16:32     ` Michael Roth
2017-06-05 23:37       ` David Gibson
2017-06-02  7:29 ` [Qemu-devel] [PATCH 2/5] spapr: Clean up spapr_dr_connector_by_*() David Gibson
2017-06-03 22:16   ` Michael Roth
2017-06-02  7:29 ` [Qemu-devel] [PATCH 3/5] spapr: Move configure-connector state into DRC David Gibson
2017-06-03 22:24   ` Michael Roth
2017-06-04 10:26     ` David Gibson
2017-06-02  7:29 ` [Qemu-devel] [PATCH 4/5] spapr: Eliminate spapr_drc_get_type_str() David Gibson
2017-06-03 22:27   ` Michael Roth
2017-06-02  7:29 ` [Qemu-devel] [PATCH 5/5] spapr: Remove some non-useful properties on DRC objects David Gibson
2017-06-03 22:34   ` Michael Roth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=149652926658.2695.5793892804950077026@loki \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sursingh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).