Blame SOURCES/kvm-monitor-move-init-global-earlier.patch

7711c0
From 6d69ed6b8b79cf43a8e0fa72167e7550fe6a936f Mon Sep 17 00:00:00 2001
7711c0
From: Markus Armbruster <armbru@redhat.com>
7711c0
Date: Fri, 17 May 2019 06:50:50 +0200
7711c0
Subject: [PATCH 23/53] monitor: move init global earlier
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-2-armbru@redhat.com>
7711c0
Patchwork-id: 87989
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 01/31] monitor: move init global earlier
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
From: Peter Xu <peterx@redhat.com>
7711c0
7711c0
Before this patch, monitor fd helpers might be called even earlier than
7711c0
monitor_init_globals().  This can be problematic.
7711c0
7711c0
After previous work, now monitor_init_globals() does not depend on
7711c0
accelerator initialization any more.  Call it earlier (before CLI
7711c0
parsing; that's where the monitor APIs might be called) to make sure it
7711c0
is called before any of the monitor APIs.
7711c0
7711c0
Suggested-by: Markus Armbruster <armbru@redhat.com>
7711c0
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
Reviewed-by: Markus Armbruster <armbru@redhat.com>
7711c0
Signed-off-by: Peter Xu <peterx@redhat.com>
7711c0
Message-Id: <20180608035511.7439-7-peterx@redhat.com>
7711c0
Signed-off-by: Markus Armbruster <armbru@redhat.com>
7711c0
(cherry picked from commit d32749deb61513c5456901f20e19887e1bc3d7f3)
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 vl.c | 7 +------
7711c0
 1 file changed, 1 insertion(+), 6 deletions(-)
7711c0
7711c0
diff --git a/vl.c b/vl.c
7711c0
index 92a98ab..a22da93 100644
7711c0
--- a/vl.c
7711c0
+++ b/vl.c
7711c0
@@ -3157,6 +3157,7 @@ int main(int argc, char **argv, char **envp)
7711c0
 
7711c0
     runstate_init();
7711c0
     postcopy_infrastructure_init();
7711c0
+    monitor_init_globals();
7711c0
 
7711c0
     if (qcrypto_init(&err) < 0) {
7711c0
         error_reportf_err(err, "cannot initialize crypto: ");
7711c0
@@ -4591,12 +4592,6 @@ int main(int argc, char **argv, char **envp)
7711c0
     default_drive(default_floppy, snapshot, IF_FLOPPY, 0, FD_OPTS);
7711c0
     default_drive(default_sdcard, snapshot, IF_SD, 0, SD_OPTS);
7711c0
 
7711c0
-    /*
7711c0
-     * Note: qtest_enabled() (which is used in monitor_qapi_event_init())
7711c0
-     * depends on configure_accelerator() above.
7711c0
-     */
7711c0
-    monitor_init_globals();
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