qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] What's IOMMUMemoryRegion's super?


From: David Gibson
Subject: Re: [Qemu-devel] What's IOMMUMemoryRegion's super?
Date: Wed, 3 Jul 2019 16:15:05 +1000
User-agent: Mutt/1.12.0 (2019-05-25)

On Wed, Jul 03, 2019 at 07:37:46AM +0200, Paolo Bonzini wrote:
> On 03/07/19 07:05, Markus Armbruster wrote:
> >     static const TypeInfo iommu_memory_region_info = {
> >         .parent             = TYPE_MEMORY_REGION,
> >         .name               = TYPE_IOMMU_MEMORY_REGION,
> >         .class_size         = sizeof(IOMMUMemoryRegionClass),
> >         .instance_size      = sizeof(IOMMUMemoryRegion),
> >         .instance_init      = iommu_memory_region_initfn,
> >         .abstract           = true,
> >     };
> > 
> >     typedef struct IOMMUMemoryRegionClass {
> >         /* private */
> > --->    struct DeviceClass parent_class;
> >         [...]
> >     };
> > 
> >     struct IOMMUMemoryRegion {
> >         MemoryRegion parent_obj;
> >         [...]
> >     };
> > 
> > The parent is TYPE_MEMORY_REGION, and the instance struct's first member is
> > TYPE_MEMORY_REGION's instance struct as I expect, but the class struct's
> > first member is something else entirely.
> 
> Cut-and-paste error.  MemoryRegion adds no methods so that could be
> either ObjectClass or better
> 
>     typedef struct MemoryRegionClass {
>         /* private */
>         ObjectClass parent_class;
>     } ObjectClass;

I concur.

-- 
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: signature.asc
Description: PGP signature


reply via email to

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