> -----Original Message----- > From: Jason Andryuk [mailto:jandr...@gmail.com] > Sent: 11 March 2019 18:02 > To: qemu-de...@nongnu.org > Cc: xen-devel@lists.xenproject.org; marma...@invisiblethingslab.com; Jason > Andryuk > <jandr...@gmail.com>; Stefano Stabellini <sstabell...@kernel.org>; Anthony > Perard > <anthony.per...@citrix.com>; Paul Durrant <paul.durr...@citrix.com>; Paolo > Bonzini > <pbonz...@redhat.com>; Richard Henderson <r...@twiddle.net>; Eduardo Habkost > <ehabk...@redhat.com>; > Michael S. Tsirkin <m...@redhat.com>; Marcel Apfelbaum > <marcel.apfelb...@gmail.com> > Subject: [PATCH 3/6] xen: Skip backend initialization for stubdom > > When QEMU is running in a stubdom, it does not provide any > Paravirtualized backends. Those still run in dom0 or another driver > domain. Therefore we skip backend initialization (xen_bus_init and > xen_be_init) for the stubdom case. > > Original patch by Anthony PERARD <anthony.per...@citrix.com> > > Signed-off-by: Jason Andryuk <jandr...@gmail.com>
Reviewed-by: Paul Durrant <paul.durr...@citrix.com> > --- > hw/i386/xen/xen-hvm.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c > index c20c4b27f6..4b62f070cb 100644 > --- a/hw/i386/xen/xen-hvm.c > +++ b/hw/i386/xen/xen-hvm.c > @@ -1485,8 +1485,6 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion > **ram_memory) > QLIST_INIT(&state->dev_list); > device_listener_register(&state->device_listener); > > - xen_bus_init(); > - > xenstore = xs_open(0); > if (!xenstore) { > error_report("Can't connect to xenstored"); > @@ -1495,12 +1493,16 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion > **ram_memory) > > qemu_set_fd_handler(xs_fileno(xenstore), xenstore_update, NULL, NULL); > > - /* Initialize backend core & drivers */ > - if (xen_be_init() != 0) { > - error_report("xen backend core setup failed"); > - goto err; > + if (!xen_stubdom_enabled()) { > + xen_bus_init(); > + > + /* Initialize backend core & drivers */ > + if (xen_be_init() != 0) { > + error_report("xen backend core setup failed"); > + goto err; > + } > + xen_be_register_common(); > } > - xen_be_register_common(); > > QLIST_INIT(&xen_physmap); > xen_read_physmap(state); > -- > 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel