hw/xen: Simplify legacy backends handling
v2 cover hw/xen: Simplify legacy backends handling
Respin of Paolo's Xen patches from
https://lore.kernel.org/qemu-devel/[email protected]/
rebased on one of my cleanup branches making backend structures const. Treat xenfb as other backends.
Paolo Bonzini (2):
hw/xen: initialize legacy backends from xen_bus_init() hw/xen: register legacy backends via xen_backend_init
Philippe Mathieu-Daudé (5):
hw/xen: Remove declarations left over in 'xen-legacy-backend.h' hw/xen: Constify XenLegacyDevice::XenDevOps
hw/xen: Constify xenstore_be::XenDevOps
hw/xen: Make XenDevOps structures const
hw/xen: Register framebuffer backend via xen_backend_init()
include/hw/xen/xen-legacy-backend.h | 15 +-------------- include/hw/xen/xen_pvdev.h | 3 +-- hw/9pfs/xen-9p-backend.c | 8 +++++++- hw/display/xenfb.c | 15 +++++++++++++-- hw/i386/pc.c | 1 - hw/usb/xen-usb.c | 14 ++++---------- hw/xen/xen-bus.c | 4 ++++ hw/xen/xen-hvm-common.c | 2 -- hw/xen/xen-legacy-backend.c | 24 ++++-------------------- hw/xenpv/xen_machine_pv.c | 7 +------ 10 files changed, 35 insertions(+), 58 deletions(-)
Signature · 1 line
2.41.0
PATCH v2 1/7 hw/xen: Remove declarations left over in 'xen-legacy-backend.h'
'xen_blkdev_ops' was removed in commit 19f87870ba ("xen: remove the legacy 'xen_disk' backend"), 'xen_netdev_ops' in commit 25967ff69f ("hw/xen: update Xen PV NIC to XenDevice model") and 'xen_console_ops' in commit 9b77374690 ("hw/xen: update Xen console to XenDevice model"). Remove them.
--- include/hw/xen/xen-legacy-backend.h | 3 --- 1 file changed, 3 deletions(-)
include/hw/xen/xen-legacy-backend.h +0 -3
@@ -67,14 +67,11 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev, }/* actual backend drivers */ -extern struct XenDevOps xen_console_ops;/* xen_console.c */ extern struct XenDevOps xen_kbdmouse_ops;/* xen_framebuffer.c */ extern struct XenDevOps xen_framebuffer_ops;/* xen_framebuffer.c */ -extern struct XenDevOps xen_blkdev_ops;/* xen_disk.c */ #ifdef CONFIG_VIRTFS extern struct XenDevOps xen_9pfs_ops;/* xen-9p-backend.c */ #endif -extern struct XenDevOps xen_netdev_ops;/* xen_nic.c */ #ifdef CONFIG_USB_LIBUSB extern struct XenDevOps xen_usb_ops;/* xen-usb.c */ #endif
Signature · 1 line
2.41.0
Re: [PATCH v2 1/7] hw/xen: Remove declarations left over in 'xen-legacy-backend.h'
Quoted 11 lines · Philippe Mathieu-Daudé
'
xen_blkdev_ops' was removed in commit19f87870ba("xen: remove the legacy 'xen_disk' backend"), 'xen_netdev_ops' in commit25967ff69f("hw/xen: update Xen PV NIC to XenDevice model") and 'xen_console_ops' in commit9b77374690("hw/xen: update Xen console to XenDevice model"). Remove them.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen-legacy-backend.h | 3 --- 1 file changed, 3 deletions(-)
PATCH v2 2/7 hw/xen: Constify XenLegacyDevice::XenDevOps
In reply to Philippe Mathieu-DaudéXenDevOps @ops is not updated, mark it const.
--- include/hw/xen/xen_pvdev.h | 2 +- hw/xen/xen-legacy-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/hw/xen/xen_pvdev.h +1 -1
@@ -53,7 +53,7 @@ struct XenLegacyDevice {xenevtchn_handle *evtchndev;xengnttab_handle *gnttabdev; -struct XenDevOps *ops; +const struct XenDevOps *ops;QTAILQ_ENTRY (XenLegacyDevice) next; };
hw/xen/xen-legacy-backend.c +1 -1
@@ -170,7 +170,7 @@ int xen_be_copy_grant_refs(struct XenLegacyDevice *xendev,*/ static struct XenLegacyDevice *xen_be_get_xendev (const char *type,int dom,int dev, -struct XenDevOps *ops) +const struct XenDevOps *ops) {struct XenLegacyDevice *xendev;
Signature · 1 line
2.41.0
Re: [PATCH v2 2/7] hw/xen: Constify XenLegacyDevice::XenDevOps
Quoted 8 lines · Philippe Mathieu-Daudé
XenDevOps @ops is not updated, mark it const.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen_pvdev.h | 2 +- hw/xen/xen-legacy-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
PATCH v2 3/7 hw/xen: Constify xenstore_be::XenDevOps
In reply to Philippe Mathieu-DaudéXenDevOps @ops is not updated, mark it const.
--- include/hw/xen/xen-legacy-backend.h | 2 +- hw/xen/xen-legacy-backend.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
include/hw/xen/xen-legacy-backend.h +1 -1
@@ -40,7 +40,7 @@ void xen_be_check_state(struct XenLegacyDevice *xendev);/* xen backend driver bits */ void xen_be_init (void ); -int xen_be_register (const char *type,struct XenDevOps *ops); +int xen_be_register (const char *type,const struct XenDevOps *ops);int xen_be_set_state (struct XenLegacyDevice *xendev,enum xenbus_state state);int xen_be_bind_evtchn (struct XenLegacyDevice *xendev); void xen_be_set_max_grant_refs(struct XenLegacyDevice *xendev,
hw/xen/xen-legacy-backend.c +3 -3
@@ -520,7 +520,7 @@ void xen_be_check_state(struct XenLegacyDevice *xendev)struct xenstore_be {const char *type;int dom; -struct XenDevOps *ops; +const struct XenDevOps *ops; };static void xenstore_update_be (void *opaque,const char *watch)
@@ -557,7 +557,7 @@ static void xenstore_update_be(void *opaque, const char *watch) } } -static int xenstore_scan (const char *type,int dom,struct XenDevOps *ops) +static int xenstore_scan (const char *type,int dom,const struct XenDevOps *ops) {struct XenLegacyDevice *xendev;char path[XEN_BUFSIZE ];
@@ -632,7 +632,7 @@ void xen_be_init(void)#endif } -int xen_be_register (const char *type,struct XenDevOps *ops) +int xen_be_register (const char *type,const struct XenDevOps *ops) {char path[50 ];int rc;
Signature · 1 line
2.41.0
Re: [PATCH v2 3/7] hw/xen: Constify xenstore_be::XenDevOps
Quoted 8 lines · Philippe Mathieu-Daudé
XenDevOps @ops is not updated, mark it const.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen-legacy-backend.h | 2 +- hw/xen/xen-legacy-backend.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
PATCH v2 4/7 hw/xen: Make XenDevOps structures const
In reply to Philippe Mathieu-DaudéKeep XenDevOps structures in .rodata.
--- include/hw/xen/xen-legacy-backend.h | 8 ++++---- hw/9pfs/xen-9p-backend.c | 2 +- hw/display/xenfb.c | 4 ++-- hw/usb/xen-usb.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)
include/hw/xen/xen-legacy-backend.h +4 -4
@@ -67,13 +67,13 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev, }/* actual backend drivers */ -extern struct XenDevOps xen_kbdmouse_ops;/* xen_framebuffer.c */ -extern struct XenDevOps xen_framebuffer_ops;/* xen_framebuffer.c */ +extern const struct XenDevOps xen_kbdmouse_ops;/* xen_framebuffer.c */ +extern const struct XenDevOps xen_framebuffer_ops;/* xen_framebuffer.c */ #ifdef CONFIG_VIRTFS -extern struct XenDevOps xen_9pfs_ops;/* xen-9p-backend.c */ +extern const struct XenDevOps xen_9pfs_ops;/* xen-9p-backend.c */ #endif #ifdef CONFIG_USB_LIBUSB -extern struct XenDevOps xen_usb_ops;/* xen-usb.c */ +extern const struct XenDevOps xen_usb_ops;/* xen-usb.c */ #endif /* configuration (aka xenbus setup) */
hw/9pfs/xen-9p-backend.c +1 -1
@@ -513,7 +513,7 @@ static void xen_9pfs_alloc(struct XenLegacyDevice *xendev)xenstore_write_be_int (xendev,"max-ring-page-order" ,MAX_RING_ORDER ); } -struct XenDevOps xen_9pfs_ops = { +const struct XenDevOps xen_9pfs_ops = { .size =sizeof (Xen9pfsDev), .flags =DEVOPS_FLAG_NEED_GNTDEV , .alloc = xen_9pfs_alloc,
hw/display/xenfb.c +2 -2
@@ -972,7 +972,7 @@ static void fb_event(struct XenLegacyDevice *xendev)/* -------------------------------------------------------------------- */ -struct XenDevOps xen_kbdmouse_ops = { +const struct XenDevOps xen_kbdmouse_ops = { .size =sizeof (struct XenInput ), .init = input_init, .initialise = input_initialise,
@@ -981,7 +981,7 @@ struct XenDevOps xen_kbdmouse_ops = { .event = input_event, }; -struct XenDevOps xen_framebuffer_ops = { +const struct XenDevOps xen_framebuffer_ops = { .size =sizeof (struct XenFB ), .init = fb_init, .initialise = fb_initialise,
hw/usb/xen-usb.c +2 -2
@@ -1083,7 +1083,7 @@ static void usbback_event(struct XenLegacyDevice *xendev)qemu_bh_schedule (usbif->bh); } -struct XenDevOps xen_usb_ops = { +const struct XenDevOps xen_usb_ops = { .size =sizeof (struct usbback_info ), .flags =DEVOPS_FLAG_NEED_GNTDEV , .init = usbback_init,
@@ -1102,7 +1102,7 @@ static int usbback_not_supported(void)return -EINVAL ; } -struct XenDevOps xen_usb_ops = { +const struct XenDevOps xen_usb_ops = { .backend_register = usbback_not_supported, };
Signature · 1 line
2.41.0
Re: [PATCH v2 4/7] hw/xen: Make XenDevOps structures const
Quoted 10 lines · Philippe Mathieu-Daudé
Keep XenDevOps structures in .rodata.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen-legacy-backend.h | 8 ++++---- hw/9pfs/xen-9p-backend.c | 2 +- hw/display/xenfb.c | 4 ++-- hw/usb/xen-usb.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-)
PATCH v2 5/7 hw/xen: initialize legacy backends from xen_bus_init()
In reply to Philippe Mathieu-DaudéFrom: Paolo Bonzini <[email protected]>
Prepare for moving the calls to xen_be_register() under the control of xen_bus_init(), using the normal xen_backend_init() method that is used by the "modern" backends.
This requires the xenstore global variable to be initialized, which is done by xen_be_init(). To ensure that everything is ready at the time the xen_backend_init() functions are called, remove the xen_be_init() function from all the boards and place it directly in xen_bus_init().
Message-ID: <[email protected]>
--- hw/i386/pc.c | 1 - hw/xen/xen-bus.c | 4 ++++ hw/xen/xen-hvm-common.c | 2 -- hw/xenpv/xen_machine_pv.c | 5 +---- 4 files changed, 5 insertions(+), 7 deletions(-)
hw/i386/pc.c +0 -1
@@ -1250,7 +1250,6 @@ void pc_basic_device_init(struct PCMachineState *pcms, pci_create_simple(pcms->pcibus, -1, "xen-platform"); }xen_bus_init (); -xen_be_init (); }#endif
hw/xen/xen-bus.c +4 -0
@@ -13,6 +13,7 @@#include "hw/sysbus.h" #include "hw/xen/xen.h" #include "hw/xen/xen-backend.h" +#include "hw/xen/xen-legacy-backend.h" /* xen_be_init() */ #include "hw/xen/xen-bus.h" #include "hw/xen/xen-bus-helper.h" #include "monitor/monitor.h"
@@ -329,6 +330,9 @@ static void xen_bus_realize(BusState *bus, Error **errp) goto fail; } +/* Initialize legacy backend core & drivers */ +xen_be_init (); +if (xs_node_scanf (xenbus->xsh,XBT_NULL ,"" ,/* domain root node */ "domid" ,NULL ,"%u" , &domid) ==1 ) { xenbus->backend_id = domid;
hw/xen/xen-hvm-common.c +0 -2
@@ -872,8 +872,6 @@ void xen_register_ioreq(XenIOState *state, unsigned int max_cpus,xen_bus_init (); -xen_be_init (); -return ; err:
hw/xenpv/xen_machine_pv.c +1 -4
@@ -34,8 +34,7 @@ static void xen_init_pv(MachineState *machine) {setup_xen_backend_ops (); -/* Initialize backend core & drivers */ -xen_be_init (); +xen_bus_init ();switch (xen_mode) {case XEN_ATTACH :
@@ -60,8 +59,6 @@ static void xen_init_pv(MachineState *machine) vga_interface_created = true; } -xen_bus_init (); -/* config cleanup hook */ atexit (xen_config_cleanup); }
Signature · 1 line
2.41.0
Re: [PATCH v2 5/7] hw/xen: initialize legacy backends from xen_bus_init()
Quoted 14 lines · Philippe Mathieu-Daudé
From: Paolo Bonzini <[email protected]>
Prepare for moving the calls to
xen_be_register()under the control ofxen_bus_init(), using the normalxen_backend_init()method that is used by the "modern" backends.This requires the xenstore global variable to be initialized, which is done by
xen_be_init(). To ensure that everything is ready at the time thexen_backend_init()functions are called, remove thexen_be_init()function from all the boards and place it directly inxen_bus_init().Signed-off-by Paolo Bonzini <[email protected]>Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
Message-ID: <[email protected]>
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/i386/pc.c | 1 - hw/xen/xen-bus.c | 4 ++++ hw/xen/xen-hvm-common.c | 2 -- hw/xenpv/xen_machine_pv.c | 5 +---- 4 files changed, 5 insertions(+), 7 deletions(-)
PATCH v2 6/7 hw/xen: register legacy backends via xen_backend_init
In reply to Philippe Mathieu-DaudéFrom: Paolo Bonzini <[email protected]>
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.
Message-ID: <[email protected]>
--- include/hw/xen/xen-legacy-backend.h | 11 ++--------- include/hw/xen/xen_pvdev.h | 1 - hw/9pfs/xen-9p-backend.c | 8 +++++++- hw/display/xenfb.c | 8 +++++++- hw/usb/xen-usb.c | 14 ++++---------- hw/xen/xen-legacy-backend.c | 16 ---------------- 6 files changed, 20 insertions(+), 38 deletions(-)
include/hw/xen/xen-legacy-backend.h +2 -9
@@ -66,15 +66,8 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev,return xen_be_unmap_grant_refs (xendev, ptr, &ref,1 ); } -/* actual backend drivers */ -extern const struct XenDevOps xen_kbdmouse_ops;/* xen_framebuffer.c */ -extern const struct XenDevOps xen_framebuffer_ops;/* xen_framebuffer.c */ -#ifdef CONFIG_VIRTFS -extern const struct XenDevOps xen_9pfs_ops;/* xen-9p-backend.c */ -#endif -#ifdef CONFIG_USB_LIBUSB -extern const struct XenDevOps xen_usb_ops;/* xen-usb.c */ -#endif +/* backend drivers not included in all machines */ +extern const struct XenDevOps xen_framebuffer_ops;/* xenfb.c */ /* configuration (aka xenbus setup) */ void xen_config_cleanup (void );
include/hw/xen/xen_pvdev.h +0 -1
@@ -29,7 +29,6 @@ struct XenDevOps { const char *node);void (*frontend_changed)(struct XenLegacyDevice *xendev,const char *node); -int (*backend_register)(void ); };struct XenLegacyDevice {
hw/9pfs/xen-9p-backend.c +7 -1
@@ -513,7 +513,7 @@ static void xen_9pfs_alloc(struct XenLegacyDevice *xendev)xenstore_write_be_int (xendev,"max-ring-page-order" ,MAX_RING_ORDER ); } -const struct XenDevOps xen_9pfs_ops = { +static const struct XenDevOps xen_9pfs_ops = { .size =sizeof (Xen9pfsDev), .flags =DEVOPS_FLAG_NEED_GNTDEV , .alloc = xen_9pfs_alloc,
@@ -522,3 +522,9 @@ const struct XenDevOps xen_9pfs_ops = { .disconnect = xen_9pfs_disconnect, .free = xen_9pfs_free, }; + +static void xen_9pfs_register_backend (void ) +{ +xen_be_register ("9pfs" , &xen_9pfs_ops); +} +xen_backend_init (xen_9pfs_register_backend);
hw/display/xenfb.c +7 -1
@@ -972,7 +972,7 @@ static void fb_event(struct XenLegacyDevice *xendev)/* -------------------------------------------------------------------- */ -const struct XenDevOps xen_kbdmouse_ops = { +static const 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);
hw/usb/xen-usb.c +4 -10
@@ -1083,7 +1083,7 @@ static void usbback_event(struct XenLegacyDevice *xendev)qemu_bh_schedule (usbif->bh); } -const struct XenDevOps xen_usb_ops = { +static const struct XenDevOps xen_usb_ops = { .size =sizeof (struct usbback_info ), .flags =DEVOPS_FLAG_NEED_GNTDEV , .init = usbback_init,
@@ -1095,15 +1095,9 @@ const struct XenDevOps xen_usb_ops = { .event = usbback_event, }; -#else /* USBIF_SHORT_NOT_OK */ - -static int usbback_not_supported (void ) +static void xen_usb_register_backend (void ) { -return -EINVAL ; +xen_be_register ("qusb" , &xen_usb_ops); } - -const struct XenDevOps xen_usb_ops = { - .backend_register = usbback_not_supported, -}; - +xen_backend_init (xen_usb_register_backend);#endif
hw/xen/xen-legacy-backend.c +0 -16
@@ -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,const 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);
Signature · 1 line
2.41.0
Re: [PATCH v2 6/7] hw/xen: register legacy backends via xen_backend_init
Quoted 6 lines · Philippe Mathieu-Daudé
From: Paolo Bonzini <[email protected]>
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.
Quoted 7 lines
This makes it possible to remove them from the build without introducing undefined symbols in
xen_be_init(). It also removes the need for thebackend_registercallback, whose only purpose is to avoid registering nonfunctional backends.Signed-off-by Paolo Bonzini <[email protected]>Message-ID: <[email protected]>
Quoted 9 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen-legacy-backend.h | 11 ++--------- include/hw/xen/xen_pvdev.h | 1 - hw/9pfs/xen-9p-backend.c | 8 +++++++- hw/display/xenfb.c | 8 +++++++- hw/usb/xen-usb.c | 14 ++++---------- hw/xen/xen-legacy-backend.c | 16 ---------------- 6 files changed, 20 insertions(+), 38 deletions(-)
Re: [PATCH v2 6/7] hw/xen: register legacy backends via xen_backend_init
In reply to Philippe Mathieu-DaudéQuoted 14 lines · Philippe Mathieu-Daudé
From: Paolo Bonzini <[email protected]>
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 thebackend_registercallback, whose only purpose is to avoid registering nonfunctional backends.Signed-off-by Paolo Bonzini <[email protected]>Message-ID: <[email protected]>
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
--- include/hw/xen/xen-legacy-backend.h | 11 ++--------- include/hw/xen/xen_pvdev.h | 1 - hw/9pfs/xen-9p-backend.c | 8 +++++++- hw/display/xenfb.c | 8 +++++++- hw/usb/xen-usb.c | 14 ++++---------- hw/xen/xen-legacy-backend.c | 16 ---------------- 6 files changed, 20 insertions(+), 38 deletions(-)
PATCH v2 7/7 hw/xen: Register framebuffer backend via xen_backend_init()
In reply to Philippe Mathieu-DaudéAlign the framebuffer backend with the other legacy ones, register it via xen_backend_init() when '-vga xenfb' is used. It is safe because MODULE_INIT_XEN_BACKEND is called in xen_bus_realize(), long after CLI processing initialized the vga_interface_type variable.
--- include/hw/xen/xen-legacy-backend.h | 3 --- hw/display/xenfb.c | 9 +++++++-- hw/xenpv/xen_machine_pv.c | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-)
include/hw/xen/xen-legacy-backend.h +0 -3
@@ -66,9 +66,6 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev,return xen_be_unmap_grant_refs (xendev, ptr, &ref,1 ); } -/* backend drivers not included in all machines */ -extern const struct XenDevOps xen_framebuffer_ops;/* xenfb.c */ -/* configuration (aka xenbus setup) */ void xen_config_cleanup (void );int xen_config_dev_vfb (int vdev,const char *type);
hw/display/xenfb.c +7 -2
@@ -29,6 +29,7 @@#include "ui/input.h" #include "ui/console.h" +#include "sysemu/sysemu.h" #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/interface/io/fbif.h"
@@ -996,8 +997,12 @@ static const GraphicHwOps xenfb_ops = { .ui_info = xenfb_ui_info, }; -static void xen_vkbd_register_backend (void ) +static void xen_ui_register_backend (void ) {xen_be_register ("vkbd" , &xen_kbdmouse_ops); + +if (vga_interface_type ==VGA_XENFB ) { +xen_be_register ("vfb" , &xen_framebuffer_ops); + } } -xen_backend_init (xen_vkbd_register_backend); +xen_backend_init (xen_ui_register_backend);
hw/xenpv/xen_machine_pv.c +0 -2
@@ -50,8 +50,6 @@ static void xen_init_pv(MachineState *machine)break ; } -xen_be_register ("vfb" , &xen_framebuffer_ops); -/* configure framebuffer */ if (vga_interface_type ==VGA_XENFB ) {xen_config_dev_vfb (0 ,"vnc" );
Signature · 1 line
2.41.0
Re: [PATCH v2 7/7] hw/xen: Register framebuffer backend via xen_backend_init()
Quoted 6 lines · Philippe Mathieu-Daudé
Align the framebuffer backend with the other legacy ones, register it via
xen_backend_init()when '-vga xenfb' is used. It is safe becauseMODULE_INIT_XEN_BACKENDis called inxen_bus_realize(), long after CLI processing initialized thevga_interface_typevariable.
Quoted 7 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/xen/xen-legacy-backend.h | 3 --- hw/display/xenfb.c | 9 +++++++-- hw/xenpv/xen_machine_pv.c | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-)
ping?
Quoted 28 lines · Philippe Mathieu-Daudé
Respin of Paolo's Xen patches from
https://lore.kernel.org/qemu-devel/[email protected]/
rebased on one of my cleanup branches making backend structures const. Treat xenfb as other backends.Paolo Bonzini (2):
hw/xen: initialize legacy backends fromxen_bus_init()hw/xen: register legacy backends viaxen_backend_initPhilippe Mathieu-Daudé (5):
hw/xen: Remove declarations left over in 'xen-legacy-backend.h' hw/xen: ConstifyXenLegacyDevice::XenDevOps
hw/xen: Constifyxenstore_be::XenDevOps
hw/xen: Make XenDevOps structures const
hw/xen: Register framebuffer backend viaxen_backend_init()include/hw/xen/xen-legacy-backend.h | 15 +-------------- include/hw/xen/xen_pvdev.h | 3 +-- hw/9pfs/xen-9p-backend.c | 8 +++++++- hw/display/xenfb.c | 15 +++++++++++++-- hw/i386/pc.c | 1 - hw/usb/xen-usb.c | 14 ++++---------- hw/xen/xen-bus.c | 4 ++++ hw/xen/xen-hvm-common.c | 2 -- hw/xen/xen-legacy-backend.c | 24 ++++-------------------- hw/xenpv/xen_machine_pv.c | 7 +------ 10 files changed, 35 insertions(+), 58 deletions(-)
Quoted 9 lines · Philippe Mathieu-Daudé
Respin of Paolo's Xen patches from
https://lore.kernel.org/qemu-devel/[email protected]/
rebased on one of my cleanup branches making backend structures const. Treat xenfb as other backends.Paolo Bonzini (2):
hw/xen: initialize legacy backends fromxen_bus_init()hw/xen: register legacy backends viaxen_backend_init
Quoted 6 lines
Philippe Mathieu-Daudé (5):
hw/xen: Remove declarations left over in 'xen-legacy-backend.h' hw/xen: ConstifyXenLegacyDevice::XenDevOps
hw/xen: Constifyxenstore_be::XenDevOps
hw/xen: Make XenDevOps structures const
hw/xen: Register framebuffer backend viaxen_backend_init()
Thanks Paul for the review, unfortunately Paulo missed this and merged v1 as single commit 88f5ed7017 ("xen: register legacy backends via xen_backend_init") :(
Regards,
Phil.