[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 17/17] spapr: Remove some non-useful properties on DRC
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 17/17] spapr: Remove some non-useful properties on DRC objects |
Date: |
Tue, 6 Jun 2017 12:51:35 +1000 |
* '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 <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>
---
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, 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)
{
@@ -666,20 +647,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
- [Qemu-ppc] [PULL 01/17] migration: remove register_savevm(), (continued)
- [Qemu-ppc] [PULL 01/17] migration: remove register_savevm(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 07/17] target-ppc: Fix openpic timer read register offset, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 12/17] spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 02/17] migration: Mark CPU states dirty before incoming migration/loadvm, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 10/17] ppc/pnv: check the return value of fdt_setprop(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 09/17] spapr_nvram: Check return value from blk_getlength(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 04/17] spapr: Abolish DRC get_fdt method, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 17/17] spapr: Remove some non-useful properties on DRC objects,
David Gibson <=
- [Qemu-ppc] [PULL 05/17] spapr: Abolish DRC set_configured method, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 03/17] spapr: Move DRC RTAS calls into spapr_drc.c, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 08/17] target/ppc: Fixup set_spr error in h_register_process_table, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 16/17] spapr: Eliminate spapr_drc_get_type_str(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 06/17] spapr: Make DRC get_index and get_type methods into plain functions, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 14/17] spapr: Clean up spapr_dr_connector_by_*(), David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 13/17] spapr: Introduce DRC subclasses, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 11/17] spapr: Allow boot from vhost-*-scsi backends, David Gibson, 2017/06/05
- [Qemu-ppc] [PULL 15/17] spapr: Move configure-connector state into DRC, David Gibson, 2017/06/05
- Re: [Qemu-ppc] [PULL 00/17] ppc-for-2.10 queue 20170606, Peter Maydell, 2017/06/06