diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-09 19:00:38 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-10 15:45:15 +0200 |
commit | 88f5ed7017897bc3108463e75e3b4828032a3992 (patch) | |
tree | 1d155866026dc00400fe880de86e0d4bbe57fd69 /hw/display | |
parent | 0973996fe47bfca8f0bf552728e36682d642c9cc (diff) | |
download | qemu-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/display')
-rw-r--r-- | hw/display/xenfb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index b2130a0..27536bf 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -972,7 +972,7 @@ static void fb_event(struct XenLegacyDevice *xendev) /* -------------------------------------------------------------------- */ -struct XenDevOps xen_kbdmouse_ops = { +static struct XenDevOps xen_kbdmouse_ops = { .size = sizeof(struct XenInput), .init = input_init, .initialise = input_initialise, @@ -995,3 +995,9 @@ static const GraphicHwOps xenfb_ops = { .gfx_update = xenfb_update, .ui_info = xenfb_ui_info, }; + +static void xen_vkbd_register_backend(void) +{ + xen_be_register("vkbd", &xen_kbdmouse_ops); +} +xen_backend_init(xen_vkbd_register_backend); |