From d5a193a4b838b00b064d441da5c038a5ff251f8b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 6 Jun 2019 19:31:39 +0100 Subject: [PATCH 9/9] vl: Document why objects are delayed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Markus Armbruster Message-id: <20190606193139.31976-3-armbru@redhat.com> Patchwork-id: 88610 O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] vl: Document why objects are delayed Bugzilla: 1714891 RH-Acked-by: Paolo Bonzini RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Philippe Mathieu-Daudé 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: Markus Armbruster Message-Id: <20190604151251.9903-3-armbru@redhat.com> Reviewed-by: Michal Privoznik Signed-off-by: Paolo Bonzini (cherry picked from commit edfb4389c26cbfd873707306024130bda6049780) Signed-off-by: Danilo C. L. de Paula --- vl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 627e37d..686c639 100644 --- a/vl.c +++ b/vl.c @@ -2852,19 +2852,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") || -- 1.8.3.1