From: "Andreas Färber" <afaerber@suse.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Hu Tao <hutao@cn.fujitsu.com>,
qemu-devel@nongnu.org, Don Koch <dkoch@verizon.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH qom-next v2 0/4] QOM'ification of pci-bridge types
Date: Sun, 28 Jul 2013 13:50:58 +0200 [thread overview]
Message-ID: <51F505A2.6010403@suse.de> (raw)
In-Reply-To: <1374532568-28051-1-git-send-email-afaerber@suse.de>
Am 23.07.2013 00:36, schrieb Andreas Färber:
> Andreas Färber (4):
> pci-bridge: Turn PCIBridge into abstract QOM type
> pci-bridge-dev: QOM parent field cleanup
> pci-bridge/i82801b11: Rename parent field
> pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types
Thanks, applied to qom-next:
https://github.com/afaerber/qemu-cpu/commits/qom-next
The story behind parent_obj and the gtk-doc markup as far as I've
inferred from Anthony's patches is
a) C++ for one does not have a field to access the parent class' fields,
you access them directly, which TYPE_NAME() casts and using
different-but-the-same pointers abstract and
b) it makes it easier for me to recognize which struct corresponds to a
QOM object and which is just used inside some object's struct or elsewhere.
The practical use of renaming for me is to have the compiler check for
parent field uses, to avoid concurrent merges such as Don's PCIBridge
fix (which should go through the appropriate queues without delay, no
criticism there) adding more uses and a 98% cleanup getting merged
afterwards, requiring yet another round of cleanups. (Compare my SysBus
cleanups, where I missed some ->qdev accesses, which I only noticed
later when I did rename the parent field.)
I've sent out a series cleaning up the aer_log VMSTATE_STRUCT() and
VMSTATE_MSIX() for you and Juan to review, which minimizes the use of
parent_obj chains.
That leaves VMSTATE_PCIE_DEVICE() as user of parent_obj; I'm not sure
about how to interpret Anthony's comment on v1, I'll inquire and hope we
can get this cleaned up post-1.6, too. Ideally before more PCI parent
fields get renamed and show up in such diffs.
One cool out-of-tree use case for PCI_DEVICE() that Peter C. has been
explaining to me is reuse of PCI IP with SysBus by changing the .parent
of TYPE_PCI_DEVICE and replacing the qdev field accordingly.
Not applicable to upstream of course, we'd need QOM interfaces for that
and I guess, a VMState solution for such "multi-inheritence" interfaces.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
prev parent reply other threads:[~2013-07-28 11:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-22 22:36 [Qemu-devel] [PATCH qom-next v2 0/4] QOM'ification of pci-bridge types Andreas Färber
2013-07-22 22:36 ` [Qemu-devel] [PATCH qom-next v2 1/4] pci-bridge: Turn PCIBridge into abstract QOM type Andreas Färber
2013-07-25 20:15 ` Don Koch
2013-07-25 21:08 ` Michael S. Tsirkin
2013-07-27 0:37 ` Andreas Färber
2013-07-22 22:36 ` [Qemu-devel] [PATCH qom-next v2 2/4] pci-bridge-dev: QOM parent field cleanup Andreas Färber
2013-07-25 20:15 ` Don Koch
2013-07-22 22:36 ` [Qemu-devel] [PATCH qom-next v2 3/4] pci-bridge/i82801b11: Rename parent field Andreas Färber
2013-07-25 20:15 ` Don Koch
2013-07-22 22:36 ` [Qemu-devel] [PATCH qom-next v2 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types Andreas Färber
2013-07-25 20:15 ` Don Koch
2013-07-25 21:05 ` Michael S. Tsirkin
2013-07-28 11:50 ` Andreas Färber [this message]
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=51F505A2.6010403@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=dkoch@verizon.com \
--cc=hutao@cn.fujitsu.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).