qemu-kvm/kvm-vl-Document-why-objects...

67 lines
2.2 KiB
Diff

From d5a193a4b838b00b064d441da5c038a5ff251f8b Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
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 <armbru@redhat.com>
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 <pbonzini@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
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 <armbru@redhat.com>
Message-Id: <20190604151251.9903-3-armbru@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit edfb4389c26cbfd873707306024130bda6049780)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
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