summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-01 11:08:26 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-02 13:50:01 +0200
commit0427b6257e2a901d60c58cad6f1b750a76fad4a8 (patch)
treec98c182f9839fccdc30fce0fe6c993bf81c2fa13
parentdaff7f0bbe9950d045bb5b74f202295f70ab3aaa (diff)
downloadqemu-0427b6257e2a901d60c58cad6f1b750a76fad4a8.zip
vl: Document dependencies hiding in global and compat props
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190401090827.20793-5-armbru@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
-rw-r--r--vl.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 0d517a09e1..c696ad2a13 100644
--- a/vl.c
+++ b/vl.c
@@ -4286,16 +4286,36 @@ int main(int argc, char **argv, char **envp)
current_machine->maxram_size = maxram_size;
current_machine->ram_slots = ram_slots;
+ /*
+ * Note: uses machine properties such as kernel-irqchip, must run
+ * after machine_set_property().
+ */
configure_accelerator(current_machine, argv[0]);
+ /*
+ * Beware, QOM objects created before this point miss global and
+ * compat properties.
+ *
+ * Global properties get set up by qdev_prop_register_global(),
+ * called from user_register_global_props(), and certain option
+ * desugaring. Also in CPU feature desugaring (buried in
+ * parse_cpu_model()), which happens below this point, but may
+ * only target the CPU type, which can only be created after
+ * parse_cpu_model() returned the type.
+ *
+ * Machine compat properties: object_set_machine_compat_props().
+ * Accelerator compat props: object_set_accelerator_compat_props(),
+ * called from configure_accelerator().
+ */
+
if (!qtest_enabled() && machine_class->deprecation_reason) {
error_report("Machine type '%s' is deprecated: %s",
machine_class->name, machine_class->deprecation_reason);
}
/*
- * Migration object can only be created after global properties
- * are applied correctly.
+ * Note: creates a QOM object, must run only after global and
+ * compat properties have been set up.
*/
migration_object_init();