aboutsummaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-05-09 19:00:38 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-05-10 15:45:15 +0200
commit88f5ed7017897bc3108463e75e3b4828032a3992 (patch)
tree1d155866026dc00400fe880de86e0d4bbe57fd69 /hw/xen
parent0973996fe47bfca8f0bf552728e36682d642c9cc (diff)
downloadqemu-88f5ed7017897bc3108463e75e3b4828032a3992.zip
qemu-88f5ed7017897bc3108463e75e3b4828032a3992.tar.gz
qemu-88f5ed7017897bc3108463e75e3b4828032a3992.tar.bz2
xen: register legacy backends via xen_backend_init
It is okay to register legacy backends in the middle of xen_bus_init(). All that the registration does is record the existence of the backend in xenstore. This makes it possible to remove them from the build without introducing undefined symbols in xen_be_init(). It also removes the need for the backend_register callback, whose only purpose is to avoid registering nonfunctional backends. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240509170044.190795-8-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen-legacy-backend.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c
index 124dd5f..6f0b300 100644
--- a/hw/xen/xen-legacy-backend.c
+++ b/hw/xen/xen-legacy-backend.c
@@ -622,27 +622,11 @@ void xen_be_init(void)
qbus_set_bus_hotplug_handler(xen_sysbus);
xen_set_dynamic_sysbus();
-
- xen_be_register("vkbd", &xen_kbdmouse_ops);
-#ifdef CONFIG_VIRTFS
- xen_be_register("9pfs", &xen_9pfs_ops);
-#endif
-#ifdef CONFIG_USB_LIBUSB
- xen_be_register("qusb", &xen_usb_ops);
-#endif
}
int xen_be_register(const char *type, struct XenDevOps *ops)
{
char path[50];
- int rc;
-
- if (ops->backend_register) {
- rc = ops->backend_register();
- if (rc) {
- return rc;
- }
- }
snprintf(path, sizeof(path), "device-model/%u/backends/%s", xen_domid,
type);