[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 11/10] migration: add comment for TYPE_MIGRATE
From: |
Peter Xu |
Subject: |
[Qemu-devel] [PATCH v6 11/10] migration: add comment for TYPE_MIGRATE |
Date: |
Wed, 28 Jun 2017 15:15:44 +0800 |
It'll be strange that the migration object inherits TYPE_DEVICE. Add
some explanations to it.
Signed-off-by: Peter Xu <address@hidden>
---
migration/migration.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index b1b0825..2398a9d 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2046,6 +2046,14 @@ 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.
+ */
.parent = TYPE_DEVICE,
.class_init = migration_class_init,
.class_size = sizeof(MigrationClass),
--
2.7.4
- Re: [Qemu-devel] [PATCH v6 08/10] migration: move skip_section_footers, (continued)
[Qemu-devel] [PATCH v6 10/10] migration: hmp: dump globals, Peter Xu, 2017/06/27
[Qemu-devel] [PATCH v6 11/10] migration: add comment for TYPE_MIGRATE,
Peter Xu <=