[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] What's IOMMUMemoryRegion's super?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] What's IOMMUMemoryRegion's super? |
Date: |
Wed, 3 Jul 2019 07:37:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
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;
Paolo