From: Gerd Hoffmann <kraxel@redhat.com>
To: Juergen Gross <jgross@suse.com>
Cc: anthony.perard@citrix.com, xen-devel@lists.xensource.com,
sstabellini@kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] xen: add qemu device for each pvusb backend
Date: Thu, 29 Sep 2016 17:16:23 +0200 [thread overview]
Message-ID: <1475162183.19923.7.camel@redhat.com> (raw)
In-Reply-To: <fc223e2a-bb6c-55ad-f1c1-ca55a118fa63@suse.com>
Hi,
> > Hmm, I think the xen core needs better QOM support ...
> >
> > struct XenDevice should have a DeviceState element, so it can be used as
> > device object directly instead of attaching a device object like
> > this ...
>
> Hmm, interesting idea. The device object could even be added in
> Xen common code if the backend is indicating the need for it via a
> special flag/field. I'll have a try.
No, not optional. Just turn *all* xen devices into QOM objects.
XenDevice should probably a subclass of the base device object
(DeviceState), and all Xen backends (block, net, fb, pvusb, ...)
should be subclasses of XenDevice.
The latter is probably how things are modeled already, just the QOM
object stuff is missing (register classes, macros to cast objects, ...)
because qdev (the QOM predecessor) didn't have that.
Once this is in place you can simply use DEVICE(xendevice) to get the
DeviceState pointer.
cheers,
Gerd
next prev parent reply other threads:[~2016-09-29 15:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 12:43 [PATCH 0/2] Xen pvUSB correction Juergen Gross
2016-09-26 12:43 ` [PATCH 1/2] xen: add an own bus for xen backend devices Juergen Gross
2016-09-27 8:53 ` Gerd Hoffmann
2016-09-29 14:39 ` Juergen Gross
2016-09-26 12:43 ` [PATCH 2/2] xen: add qemu device for each pvusb backend Juergen Gross
2016-09-27 9:00 ` Daniel P. Berrange
2016-09-29 14:39 ` [Qemu-devel] " Juergen Gross
2016-09-27 9:08 ` Gerd Hoffmann
2016-09-29 14:49 ` Juergen Gross
2016-09-29 15:16 ` Gerd Hoffmann [this message]
2016-09-29 19:39 ` Markus Armbruster
2016-09-27 8:51 ` [PATCH 0/2] Xen pvUSB correction Gerd Hoffmann
2016-09-29 14:38 ` Juergen Gross
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=1475162183.19923.7.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=jgross@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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).