[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v3 PATCH 26/45] multi-process: remote: add create_done
From: |
Jagannathan Raman |
Subject: |
[Qemu-devel] [RFC v3 PATCH 26/45] multi-process: remote: add create_done condition |
Date: |
Tue, 3 Sep 2019 16:37:52 -0400 |
From: Elena Ufimtseva <address@hidden>
Do not allow BAR,MMIO handlers and irq setup to run before
the configuration of the devices completes.
Signed-off-by: Jagannathan Raman <address@hidden>
Signed-off-by: John G Johnson <address@hidden>
Signed-off-by: Elena Ufimtseva <address@hidden>
---
remote/remote-main.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/remote/remote-main.c b/remote/remote-main.c
index e284d5f..0c0e085 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -67,6 +67,7 @@
static ProxyLinkState *proxy_link;
PCIDevice *remote_pci_dev;
+bool create_done;
static void process_config_write(ProcMsg *msg)
{
@@ -369,21 +370,31 @@ static void process_msg(GIOCondition cond, ProcChannel
*chan)
case INIT:
break;
case CONF_WRITE:
- process_config_write(msg);
+ if (create_done) {
+ process_config_write(msg);
+ }
+
break;
case CONF_READ:
- process_config_read(msg);
+ if (create_done) {
+ process_config_read(msg);
+ }
+
break;
case BAR_WRITE:
- process_bar_write(msg, &err);
- if (err) {
- goto finalize_loop;
+ if (create_done) {
+ process_bar_write(msg, &err);
+ if (err) {
+ error_report_err(err);
+ }
}
break;
case BAR_READ:
- process_bar_read(msg, &err);
- if (err) {
- goto finalize_loop;
+ if (create_done) {
+ process_bar_read(msg, &err);
+ if (err) {
+ error_report_err(err);
+ }
}
break;
case SYNC_SYSMEM:
@@ -403,7 +414,7 @@ static void process_msg(GIOCondition cond, ProcChannel
*chan)
qemu_mutex_lock_iothread();
qemu_run_machine_init_done_notifiers();
qemu_mutex_unlock_iothread();
-
+ create_done = true;
break;
case DRIVE_OPTS:
if (setup_drive(msg, &err)) {
--
1.8.3.1
- [Qemu-devel] [RFC v3 PATCH 17/45] multi-process: modify BARs read/write to support dev_id, (continued)
- [Qemu-devel] [RFC v3 PATCH 17/45] multi-process: modify BARs read/write to support dev_id, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 19/45] multi-process: Add LSI device proxy object, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 22/45] multi-process: configure remote side devices, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 20/45] multi-process: Synchronize remote memory, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 21/45] multi-process: create IOHUB object to handle irq, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 25/45] multi-process: remote: use fd for socket from parent process, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 24/45] multi-process: remote: add setup_devices and setup_drive msg processing, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 27/45] multi-process: add processing of remote drive and device command line, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 26/45] multi-process: remote: add create_done condition,
Jagannathan Raman <=
- [Qemu-devel] [RFC v3 PATCH 23/45] multi-process: add qdev_proxy_add to create proxy devices, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 29/45] multi-process: refractor vl.c code to re-use in remote, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 28/45] multi-process: Introduce build flags to separate remote process code, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 30/45] multi-process: add remote option, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 32/45] multi-process: add parse_cmdline in remote process, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 31/45] multi-process: add remote options parser, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 34/45] multi-process: add heartbeat timer and signal handler, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 33/45] multi-process: add support for multiple devices, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 35/45] multi-process: handle heartbeat messages in remote process, Jagannathan Raman, 2019/09/03
- [Qemu-devel] [RFC v3 PATCH 37/45] multi-process: perform device reset in the remote process, Jagannathan Raman, 2019/09/03