Message ID | 20240510104908.76908-1-philmd@linaro.org |
---|---|
Headers | show |
Series | hw/xen: Simplify legacy backends handling | expand |
On 10/5/24 12:49, Philippe Mathieu-Daudé wrote: > From: Paolo Bonzini <pbonzini@redhat.com> > > 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> > Message-ID: <20240509170044.190795-8-pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > 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(-)
ping? On 10/5/24 12:49, Philippe Mathieu-Daudé wrote: > Respin of Paolo's Xen patches from > https://lore.kernel.org/qemu-devel/20240509170044.190795-1-pbonzini@redhat.com/ > 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(-) >
On 10/05/2024 11:49, Philippe Mathieu-Daudé wrote: > XenDevOps @ops is not updated, mark it const. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > include/hw/xen/xen-legacy-backend.h | 2 +- > hw/xen/xen-legacy-backend.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Paul Durrant <paul@xen.org>
On 10/05/2024 11:49, Philippe Mathieu-Daudé wrote: > Keep XenDevOps structures in .rodata. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > 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(-) > Reviewed-by: Paul Durrant <paul@xen.org>
On 10/05/2024 11:49, Philippe Mathieu-Daudé wrote: > From: Paolo Bonzini <pbonzini@redhat.com> > > 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> > Message-ID: <20240509170044.190795-8-pbonzini@redhat.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > 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(-) > Reviewed-by: Paul Durrant <paul@xen.org>
On 10/05/2024 11:49, Philippe Mathieu-Daudé wrote: > 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. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > 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(-) > Reviewed-by: Paul Durrant <paul@xen.org>
On 10/5/24 12:49, Philippe Mathieu-Daudé wrote: > Respin of Paolo's Xen patches from > https://lore.kernel.org/qemu-devel/20240509170044.190795-1-pbonzini@redhat.com/ > 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() 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.