qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2 4/4] spapr: Add sPAPRMachineClass


From: David Gibson
Subject: Re: [Qemu-devel] [PATCHv2 4/4] spapr: Add sPAPRMachineClass
Date: Fri, 29 May 2015 11:35:55 +1000
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, May 26, 2015 at 10:19:24AM +0200, Thomas Huth wrote:
> On Tue, 26 May 2015 12:22:59 +1000
> David Gibson <address@hidden> wrote:
> 
> > Currently although we have an sPAPRMachineState descended from MachineState
> > we don't have an sPAPRMAchineClass descended from MachineClass.  So far it
> > hasn't been needed, but several upcoming features are going to want it,
> > so this patch creates a stub implementation.
> > 
> > Signed-off-by: Michael Roth <address@hidden>
> > Signed-off-by: Bharata B Rao <address@hidden>
> > Signed-off-by: David Gibson <address@hidden>
> > ---
> >  hw/ppc/spapr.c         |  1 +
> >  include/hw/ppc/spapr.h | 15 +++++++++++++++
> >  2 files changed, 16 insertions(+)
> > 
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index 63877b9..a607096 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -1808,6 +1808,7 @@ static const TypeInfo spapr_machine_info = {
> >      .abstract      = true,
> >      .instance_size = sizeof(sPAPRMachineState),
> >      .instance_init = spapr_machine_initfn,
> > +    .class_size    = sizeof(sPAPRMachineClass),
> >      .class_init    = spapr_machine_class_init,
> >      .interfaces = (InterfaceInfo[]) {
> >          { TYPE_FW_PATH_PROVIDER },
> > diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
> > index 785b094..0aeac50 100644
> > --- a/include/hw/ppc/spapr.h
> > +++ b/include/hw/ppc/spapr.h
> > @@ -15,11 +15,26 @@ typedef struct sPAPREventLogEntry sPAPREventLogEntry;
> >  #define HPTE64_V_HPTE_DIRTY     0x0000000000000040ULL
> >  #define SPAPR_ENTRY_POINT       0x100
> >  
> > +typedef struct sPAPRMachineClass sPAPRMachineClass;
> >  typedef struct sPAPRMachineState sPAPRMachineState;
> >  
> >  #define TYPE_SPAPR_MACHINE      "spapr-machine"
> >  #define SPAPR_MACHINE(obj) \
> >      OBJECT_CHECK(sPAPRMachineState, (obj), TYPE_SPAPR_MACHINE)
> > +#define SPAPR_MACHINE_GET_CLASS(obj) \
> > +    OBJECT_GET_CLASS(sPAPRMachineClass, obj, TYPE_SPAPR_MACHINE)
> > +#define SPAPR_MACHINE_CLASS(klass) \
> > +    OBJECT_CLASS_CHECK(sPAPRMachineClass, klass, TYPE_SPAPR_MACHINE)
> > +
> > +/**
> > + * sPAPRMachineClass:
> > + */
> > +struct sPAPRMachineClass {
> > +    /*< private >*/
> > +    MachineClass parent_class;
> > +
> > +    /*< public >*/
> > +};
> >  
> >  /**
> >   * sPAPRMachineState:
> 
> Reviewed-by: Thomas Huth <address@hidden>

Thanks for the review.  I've fixed the nit you pointer out in 2/4, and
merged into spapr-next.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: pgpc_POi_Xs_E.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]