summary refs log tree commit diff stats
path: root/hw/xen/xen_backend.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2016-08-02 08:32:32 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-08-03 14:52:11 +0200
commit0e39bb022b5fa8c11964968885f3263c02ce42b0 (patch)
tree535f76c81af91d39a619afee1e3044c7dcdbcad8 /hw/xen/xen_backend.c
parent80440ea033b02d9c7330d507daf41d4bf8a8c058 (diff)
downloadfocaccia-qemu-0e39bb022b5fa8c11964968885f3263c02ce42b0.tar.gz
focaccia-qemu-0e39bb022b5fa8c11964968885f3263c02ce42b0.zip
xen: use a common function for pv and hvm guest backend register calls
Instead of calling xen_be_register() for each supported backend type
for hvm and pv guests in their machine init functions use a common
function in order not to have to add new backends twice.

This at once fixes the error that hvm domains couldn't use the qusb
backend.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Message-id: 1470119552-16170-1-git-send-email-jgross@suse.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/xen/xen_backend.c')
-rw-r--r--hw/xen/xen_backend.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c
index 3ceb778326..69a238817e 100644
--- a/hw/xen/xen_backend.c
+++ b/hw/xen/xen_backend.c
@@ -780,6 +780,16 @@ int xen_be_register(const char *type, struct XenDevOps *ops)
     return xenstore_scan(type, xen_domid, ops);
 }
 
+void xen_be_register_common(void)
+{
+    xen_be_register("console", &xen_console_ops);
+    xen_be_register("vkbd", &xen_kbdmouse_ops);
+    xen_be_register("qdisk", &xen_blkdev_ops);
+#ifdef CONFIG_USB_LIBUSB
+    xen_be_register("qusb", &xen_usb_ops);
+#endif
+}
+
 int xen_be_bind_evtchn(struct XenDevice *xendev)
 {
     if (xendev->local_port != -1) {