Message ID | 1499049848-18012-5-git-send-email-peterx@redhat.com |
---|---|
State | New |
Headers | show |
Peter Xu <peterx@redhat.com> wrote: > [Peter collected Eduardo's patch comment and formatted into patch] > > Suggested-by: Eduardo Habkost <ehabkost@redhat.com> > Signed-off-by: Peter Xu <peterx@redhat.com> > --- Reviewed-by: Juan Quintela <quintela@redhat.com>
On Mon, Jul 03, 2017 at 10:44:08AM +0800, Peter Xu wrote: > [Peter collected Eduardo's patch comment and formatted into patch] > > Suggested-by: Eduardo Habkost <ehabkost@redhat.com> > Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Peter Xu <peterx@redhat.com> writes: > [Peter collected Eduardo's patch comment and formatted into patch] > > Suggested-by: Eduardo Habkost <ehabkost@redhat.com> > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > migration/migration.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/migration/migration.c b/migration/migration.c > index dbdc121..6c64b99 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -2052,12 +2052,15 @@ static void migration_instance_init(Object *obj) > static const TypeInfo migration_type = { > .name = TYPE_MIGRATION, > /* > - * NOTE: "migration" itself is not really a device. We used > - * TYPE_DEVICE here only to leverage some existing QDev features > - * like "-global" properties, and HW_COMPAT_* fields (which are > - * finally applied as global properties as well). If one day the > - * global property feature can be migrated from QDev to QObject in > - * general, then we can switch to QObject as well. > + * NOTE: > + * > + * TYPE_MIGRATION is not really a device, as the object is not > + * created using qdev_create(), it is not attached to the qdev > + * device tree, and it is never realized. > + * > + * If one day we allow non-device QOM objects to use the global > + * property system, we can switch this from TYPE_DEVICE to > + * TYPE_OBJECT. Suggest to turn this paragraph into a TODO: * TODO Make this TYPE_OBJECT once QOM provides something like * TYPE_DEVICE's "-global" properties. > */ > .parent = TYPE_DEVICE, > .class_init = migration_class_init,
On Tue, Jul 04, 2017 at 10:04:01AM +0200, Markus Armbruster wrote: > Peter Xu <peterx@redhat.com> writes: > > > [Peter collected Eduardo's patch comment and formatted into patch] > > > > Suggested-by: Eduardo Habkost <ehabkost@redhat.com> > > Signed-off-by: Peter Xu <peterx@redhat.com> > > --- > > migration/migration.c | 15 +++++++++------ > > 1 file changed, 9 insertions(+), 6 deletions(-) > > > > diff --git a/migration/migration.c b/migration/migration.c > > index dbdc121..6c64b99 100644 > > --- a/migration/migration.c > > +++ b/migration/migration.c > > @@ -2052,12 +2052,15 @@ static void migration_instance_init(Object *obj) > > static const TypeInfo migration_type = { > > .name = TYPE_MIGRATION, > > /* > > - * NOTE: "migration" itself is not really a device. We used > > - * TYPE_DEVICE here only to leverage some existing QDev features > > - * like "-global" properties, and HW_COMPAT_* fields (which are > > - * finally applied as global properties as well). If one day the > > - * global property feature can be migrated from QDev to QObject in > > - * general, then we can switch to QObject as well. > > + * NOTE: > > + * > > + * TYPE_MIGRATION is not really a device, as the object is not > > + * created using qdev_create(), it is not attached to the qdev > > + * device tree, and it is never realized. > > + * > > + * If one day we allow non-device QOM objects to use the global > > + * property system, we can switch this from TYPE_DEVICE to > > + * TYPE_OBJECT. > > Suggest to turn this paragraph into a TODO: > > * TODO Make this TYPE_OBJECT once QOM provides something like > * TYPE_DEVICE's "-global" properties. Sure. Will modify in next version. Thanks,
diff --git a/migration/migration.c b/migration/migration.c index dbdc121..6c64b99 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2052,12 +2052,15 @@ static void migration_instance_init(Object *obj) static const TypeInfo migration_type = { .name = TYPE_MIGRATION, /* - * NOTE: "migration" itself is not really a device. We used - * TYPE_DEVICE here only to leverage some existing QDev features - * like "-global" properties, and HW_COMPAT_* fields (which are - * finally applied as global properties as well). If one day the - * global property feature can be migrated from QDev to QObject in - * general, then we can switch to QObject as well. + * NOTE: + * + * TYPE_MIGRATION is not really a device, as the object is not + * created using qdev_create(), it is not attached to the qdev + * device tree, and it is never realized. + * + * If one day we allow non-device QOM objects to use the global + * property system, we can switch this from TYPE_DEVICE to + * TYPE_OBJECT. */ .parent = TYPE_DEVICE, .class_init = migration_class_init,
[Peter collected Eduardo's patch comment and formatted into patch] Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> --- migration/migration.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)