|
|
7711c0 |
From ae3fa9b069ad0e99fda95a34b18c68effe576f85 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Date: Fri, 17 May 2019 06:51:13 +0200
|
|
|
7711c0 |
Subject: [PATCH 46/53] vl: Create block backends before setting machine
|
|
|
7711c0 |
properties
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Message-id: <20190517065120.12028-25-armbru@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 87985
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 24/31] vl: Create block backends before setting machine properties
|
|
|
7711c0 |
Bugzilla: 1624009
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
qemu-system-FOO's main() acts on command line arguments in its own
|
|
|
7711c0 |
idiosyncratic order. There's not much method to its madness.
|
|
|
7711c0 |
Whenever we find a case where one kind of command line argument needs
|
|
|
7711c0 |
to refer to something created for another kind later, we rejigger the
|
|
|
7711c0 |
order.
|
|
|
7711c0 |
|
|
|
7711c0 |
Block devices get created long after machine properties get processed.
|
|
|
7711c0 |
Therefore, block device machine properties can be created, but not
|
|
|
7711c0 |
set. No such properties exist. But the next commit will create some.
|
|
|
7711c0 |
Time to rejigger again: create block devices earlier.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Message-Id: <20190308131445.17502-8-armbru@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit cda4aa9a5a08777cf13e164c0543bd4888b8adce)
|
|
|
7711c0 |
[Trivial conflict in vl.c due to lack of commit 2d5a3a8b02a]
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
vl.c | 9 +++++++--
|
|
|
7711c0 |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/vl.c b/vl.c
|
|
|
7711c0 |
index e0e60fb..15e87a4 100644
|
|
|
7711c0 |
--- a/vl.c
|
|
|
7711c0 |
+++ b/vl.c
|
|
|
7711c0 |
@@ -4465,6 +4465,13 @@ int main(int argc, char **argv, char **envp)
|
|
|
7711c0 |
exit(0);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
+ /*
|
|
|
7711c0 |
+ * Note: we need to create block backends before
|
|
|
7711c0 |
+ * machine_set_property(), so machine properties can refer to
|
|
|
7711c0 |
+ * them.
|
|
|
7711c0 |
+ */
|
|
|
7711c0 |
+ configure_blockdev(&bdo_queue, machine_class, snapshot);
|
|
|
7711c0 |
+
|
|
|
7711c0 |
machine_opts = qemu_get_machine_opts();
|
|
|
7711c0 |
if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
|
|
|
7711c0 |
NULL)) {
|
|
|
7711c0 |
@@ -4590,8 +4597,6 @@ int main(int argc, char **argv, char **envp)
|
|
|
7711c0 |
ram_mig_init();
|
|
|
7711c0 |
dirty_bitmap_mig_init();
|
|
|
7711c0 |
|
|
|
7711c0 |
- configure_blockdev(&bdo_queue, machine_class, snapshot);
|
|
|
7711c0 |
-
|
|
|
7711c0 |
if (qemu_opts_foreach(qemu_find_opts("mon"),
|
|
|
7711c0 |
mon_init_func, NULL, NULL)) {
|
|
|
7711c0 |
exit(1);
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|