From: Anthony PERARD <anthony.perard@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xensource.com, kraxel@redhat.com,
qemu-devel@nongnu.org, stefano.stabellini@eu.citrix.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] xen: introduce dummy system device
Date: Tue, 3 May 2016 16:11:49 +0100 [thread overview]
Message-ID: <20160503151149.GH1885@perard.uk.xensource.com> (raw)
In-Reply-To: <1457623170-30896-2-git-send-email-jgross@suse.com>
On Thu, Mar 10, 2016 at 04:19:29PM +0100, Juergen Gross wrote:
> Introduce a new dummy system device serving as parent for virtual
> buses. This will enable new pv backends to introduce virtual buses
> which are removable again opposed to system buses which are meant
> to stay once added.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Looks good.
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> V2: NOT changed, even if requested by Stefano Stabellini: the xen dummy
> system device is needed by virtfs for Xen PV(H) guests, too
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> hw/xenpv/xen_machine_pv.c | 40 ++++++++++++++++++++++++++++++++++++++++
> include/hw/xen/xen_backend.h | 1 +
> 2 files changed, 41 insertions(+)
>
> diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c
> index fc13535..48d5bc6 100644
> --- a/hw/xenpv/xen_machine_pv.c
> +++ b/hw/xenpv/xen_machine_pv.c
> @@ -25,10 +25,15 @@
> #include "qemu/osdep.h"
> #include "hw/hw.h"
> #include "hw/boards.h"
> +#include "hw/sysbus.h"
> #include "hw/xen/xen_backend.h"
> #include "xen_domainbuild.h"
> #include "sysemu/block-backend.h"
>
> +#define TYPE_XENSYSDEV "xensysdev"
> +
> +DeviceState *xen_sysdev;
> +
> static void xen_init_pv(MachineState *machine)
> {
> DriveInfo *dinfo;
> @@ -67,6 +72,9 @@ static void xen_init_pv(MachineState *machine)
> break;
> }
>
> + xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV);
> + qdev_init_nofail(xen_sysdev);
> +
> xen_be_register("console", &xen_console_ops);
> xen_be_register("vkbd", &xen_kbdmouse_ops);
> xen_be_register("vfb", &xen_framebuffer_ops);
> @@ -101,6 +109,38 @@ static void xen_init_pv(MachineState *machine)
> xen_init_display(xen_domid);
> }
>
> +static int xen_sysdev_init(SysBusDevice *dev)
> +{
> + return 0;
> +}
> +
> +static Property xen_sysdev_properties[] = {
> + {/* end of property list */},
> +};
> +
> +static void xen_sysdev_class_init(ObjectClass *klass, void *data)
> +{
> + DeviceClass *dc = DEVICE_CLASS(klass);
> + SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
> +
> + k->init = xen_sysdev_init;
> + dc->props = xen_sysdev_properties;
> +}
> +
> +static const TypeInfo xensysdev_info = {
> + .name = TYPE_XENSYSDEV,
> + .parent = TYPE_SYS_BUS_DEVICE,
> + .instance_size = sizeof(SysBusDevice),
> + .class_init = xen_sysdev_class_init,
> +};
> +
> +static void xenpv_register_types(void)
> +{
> + type_register_static(&xensysdev_info);
> +}
> +
> +type_init(xenpv_register_types);
> +
> static void xenpv_machine_init(MachineClass *mc)
> {
> mc->desc = "Xen Para-virtualized PC";
> diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h
> index c839eeb..b4b4ff0 100644
> --- a/include/hw/xen/xen_backend.h
> +++ b/include/hw/xen/xen_backend.h
> @@ -60,6 +60,7 @@ extern xc_interface *xen_xc;
> extern xenforeignmemory_handle *xen_fmem;
> extern struct xs_handle *xenstore;
> extern const char *xen_protocol;
> +extern DeviceState *xen_sysdev;
>
> /* xenstore helper functions */
> int xenstore_write_str(const char *base, const char *node, const char *val);
> --
> 2.6.2
>
>
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-03 15:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 15:19 [PATCH v2 0/2] usb, xen: add pvUSB backend Juergen Gross
2016-03-10 15:19 ` [PATCH v2 1/2] xen: introduce dummy system device Juergen Gross
2016-05-03 15:11 ` Anthony PERARD [this message]
2016-03-10 15:19 ` [PATCH v2 2/2] xen: add pvUSB backend Juergen Gross
2016-05-03 15:06 ` Anthony PERARD
2016-05-04 8:25 ` Juergen Gross
2016-05-05 10:13 ` Anthony PERARD
2016-05-06 4:57 ` Juergen Gross
2016-03-18 12:52 ` [PATCH v2 0/2] usb, " Gerd Hoffmann
2016-03-18 14:47 ` Juergen Gross
2016-03-29 4:55 ` [Xen-devel] " 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=20160503151149.GH1885@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=jgross@suse.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--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).