Message ID | 20171125151610.20547-6-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
Series | Replace has_dynamic_sysbus with list of allowed device types | expand |
Hi, On Sat, Nov 25, 2017 at 4:16 PM, Eduardo Habkost <ehabkost@redhat.com> wrote: > There's no need to make the machine allow every possible sysbus > device. We can now just add xen-sysdev to the allowed list. > > Cc: Stefano Stabellini <sstabellini@kernel.org> > Cc: Anthony Perard <anthony.perard@citrix.com> > Cc: xen-devel@lists.xenproject.org > Cc: Juergen Gross <jgross@suse.com> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> > --- > Changes series v1 -> v2: > * New patch added to series > --- > hw/xen/xen_backend.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c > index 82380ea9ee..7445b506ac 100644 > --- a/hw/xen/xen_backend.c > +++ b/hw/xen/xen_backend.c > @@ -564,12 +564,7 @@ static void xen_set_dynamic_sysbus(void) > ObjectClass *oc = object_get_class(machine); > MachineClass *mc = MACHINE_CLASS(oc); > > - /* > - * Emulate old mc->has_dynamic_sysbus=true assignment > - * > - *TODO: add only Xen devices to the list > - */ > - machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SYS_BUS_DEVICE); > + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_XENSYSDEV); It looks like it's the last patch in the series without review. It would be nice if a Xen maintainer could look at it, or test it, as I dont know how to test it tbh. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > } > > int xen_be_register(const char *type, struct XenDevOps *ops) > -- > 2.13.6 > >
On Sat, Nov 25, 2017 at 01:16:09PM -0200, Eduardo Habkost wrote: > There's no need to make the machine allow every possible sysbus > device. We can now just add xen-sysdev to the allowed list. > > Cc: Stefano Stabellini <sstabellini@kernel.org> > Cc: Anthony Perard <anthony.perard@citrix.com> > Cc: xen-devel@lists.xenproject.org > Cc: Juergen Gross <jgross@suse.com> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> I've tested the patch series with every hotplug things I could think of, and it worked fine. Acked-by: Anthony PERARD <anthony.perard@citrix.com> > --- > Changes series v1 -> v2: > * New patch added to series > --- > hw/xen/xen_backend.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c > index 82380ea9ee..7445b506ac 100644 > --- a/hw/xen/xen_backend.c > +++ b/hw/xen/xen_backend.c > @@ -564,12 +564,7 @@ static void xen_set_dynamic_sysbus(void) > ObjectClass *oc = object_get_class(machine); > MachineClass *mc = MACHINE_CLASS(oc); > > - /* > - * Emulate old mc->has_dynamic_sysbus=true assignment > - * > - *TODO: add only Xen devices to the list > - */ > - machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SYS_BUS_DEVICE); > + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_XENSYSDEV); > } > > int xen_be_register(const char *type, struct XenDevOps *ops)
diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index 82380ea9ee..7445b506ac 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_backend.c @@ -564,12 +564,7 @@ static void xen_set_dynamic_sysbus(void) ObjectClass *oc = object_get_class(machine); MachineClass *mc = MACHINE_CLASS(oc); - /* - * Emulate old mc->has_dynamic_sysbus=true assignment - * - *TODO: add only Xen devices to the list - */ - machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SYS_BUS_DEVICE); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_XENSYSDEV); } int xen_be_register(const char *type, struct XenDevOps *ops)
There's no need to make the machine allow every possible sysbus device. We can now just add xen-sysdev to the allowed list. Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: xen-devel@lists.xenproject.org Cc: Juergen Gross <jgross@suse.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Changes series v1 -> v2: * New patch added to series --- hw/xen/xen_backend.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)