qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qom: fix inherited interfaces


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] qom: fix inherited interfaces
Date: Tue, 24 Dec 2013 12:17:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 24/12/2013 01:18, Andreas Färber ha scritto:
> Thanks, I have squashed it, but I would appreciate if someone more
> familiar with interfaces could take a quick look at my commit message
> before I send a PULL tomorrow. Should I drop Reported-by during squash?
> 
> https://github.com/afaerber/qemu-cpu/commits/qom-next

I think it can be left in because the subclass::superclass::interface
bug was pre-existing.  Here is a better wording:

qom: Do not register interface "types" in the type table and fix names

There should be no need to look them up nor enumerate the interface
"types", whose "classes" are really just vtables.  Just create the
types and add them to the interface list of the parent type.

Interfaces not registering their type anymore means that accessing
superclass::interface by type name will fail when initializing
subclass::interface.  Thus, we need to pre-initialize the subclass's
parent_type field before calling type_initialize.  Apart from this, the
interface "types" should never be used and thus it is harmless to leave
them out of the hashtable.

Further, the interface types had a bug with interfaces that are
inherited from a superclass:  The implementation type name was wrong
(for example it was subclass::superclass::interface rather than
just subclass::interface).  This patch fixes this as well.

Reported-by: Igor Mammedov <address@hidden>
Tested-by: Igor Mammedov <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>




reply via email to

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