Hello Cédric,

> >
> > <...snip...>
> >
> > diff --git a/include/hw/ppc/pnv_chip.h b/include/hw/ppc/pnv_chip.h
> > index 8589f3291ed3..ebfe82b89537 100644
> > --- a/include/hw/ppc/pnv_chip.h
> > +++ b/include/hw/ppc/pnv_chip.h
> > @@ -17,12 +17,21 @@
> >   OBJECT_DECLARE_TYPE(PnvChip, PnvChipClass,
> >                       PNV_CHIP)
> > +typedef enum PnvChipType {
> > +    PNV_TYPE_POWER8E,     /* AKA Murano (default) */
> > +    PNV_TYPE_POWER8,      /* AKA Venice */
> > +    PNV_TYPE_POWER8NVL,   /* AKA Naples */
> > +    PNV_TYPE_POWER9,      /* AKA Nimbus */
> > +    PNV_TYPE_POWER10,
> > +} PnvChipType;
> 
> Nope.
> 
> > +
> >   struct PnvChip {
> >       /*< private >*/
> >       SysBusDevice parent_obj;
> >       /*< public >*/
> >       uint32_t     chip_id;
> > +
> >       uint64_t     ram_start;
> >       uint64_t     ram_size;
> > @@ -137,6 +146,7 @@ struct PnvChipClass {
> >       SysBusDeviceClass parent_class;
> >       /*< public >*/
> > +    PnvChipType  chip_type;
> >       uint64_t     chip_cfam_id;
> >       uint64_t     cores_mask;
> >       uint32_t     num_pecs;
> 
> Adding an enum type under PnvChipClass which is a type already
> looks wrong. Please find another way. It is possible I am sure.

True. You suggested one possible way in patch #3, to replicate the
*_dt_populate and quad_realize functions for Power11 also.

Another way to do this was depending on the type string in qemu
object's class type name, or object_cast_cache, but I decided not to go
with string comparison or depending on internal strings.

Will use your suggestion in patch #3.

Thanks,
Aditya Gupta

> 
> Thanks,
> 
> C.
> 
> 

Reply via email to