Commit edfb4389 authored by Markus Armbruster's avatar Markus Armbruster Committed by Paolo Bonzini
Browse files

vl: Document why objects are delayed



Objects should not be "delayed" without a reason, as the previous
commit demonstrates.  The remaining ones have reasons.  State them.
and demand future ones come with such a statement.

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Message-Id: <20190604151251.9903-3-armbru@redhat.com>
Reviewed-by: default avatarMichal Privoznik <mprivozn@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9ea18ed2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2751,19 +2751,25 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
        exit(0);
    }

    /*
     * Objects should not be made "delayed" without a reason.  If you
     * add one, state the reason in a comment!
     */

    /* Reason: rng-egd property "chardev" */
    if (g_str_equal(type, "rng-egd")) {
        return false;
    }

#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
    /* Reason: cryptodev-vhost-user property "chardev" */
    if (g_str_equal(type, "cryptodev-vhost-user")) {
        return false;
    }
#endif

    /*
     * return false for concrete netfilters since
     * they depend on netdevs already existing
     * Reason: filter-* property "netdev" etc.
     */
    if (g_str_equal(type, "filter-buffer") ||
        g_str_equal(type, "filter-dump") ||