From: David Gibson <david@gibson.dropbear.id.au>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] What's IOMMUMemoryRegion's super?
Date: Wed, 3 Jul 2019 16:15:05 +1000 [thread overview]
Message-ID: <20190703061505.GL9442@umbus.fritz.box> (raw)
In-Reply-To: <1c014d01-edef-d418-75a4-96f0811717e8@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-07-03 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 5:05 [Qemu-devel] What's IOMMUMemoryRegion's super? Markus Armbruster
2019-07-03 5:37 ` Paolo Bonzini
2019-07-03 6:15 ` David Gibson [this message]
2019-07-03 10:37 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190703061505.GL9442@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.