[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v4 PATCH 23/49] multi-process: remote: add create_done condition
From: |
Jagannathan Raman |
Subject: |
[RFC v4 PATCH 23/49] multi-process: remote: add create_done condition |
Date: |
Thu, 24 Oct 2019 05:09:04 -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 cb2829e..80d8c02 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -68,6 +68,7 @@
static MPQemuLinkState *mpqemu_link;
PCIDevice *remote_pci_dev;
+bool create_done;
static void process_config_write(MPQemuMsg *msg)
{
@@ -370,21 +371,31 @@ static void process_msg(GIOCondition cond, MPQemuChannel
*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:
@@ -404,7 +415,7 @@ static void process_msg(GIOCondition cond, MPQemuChannel
*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
- [RFC v4 PATCH 10/49] multi-process: setup a machine object for remote device process, (continued)
- [RFC v4 PATCH 10/49] multi-process: setup a machine object for remote device process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 13/49] multi-process: introduce proxy object, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 14/49] mutli-process: build remote command line args, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 16/49] multi-process: Add LSI device proxy object, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 15/49] multi-process: PCI BAR read/write handling for proxy & remote endpoints, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 19/49] multi-process: configure remote side devices, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 18/49] multi-process: create IOHUB object to handle irq, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 20/49] multi-process: add qdev_proxy_add to create proxy devices, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 21/49] multi-process: remote: add setup_devices and setup_drive msg processing, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 22/49] multi-process: remote: use fd for socket from parent process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 23/49] multi-process: remote: add create_done condition,
Jagannathan Raman <=
- [RFC v4 PATCH 24/49] multi-process: add processing of remote drive and device command line, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 26/49] multi-process: refractor vl.c code to re-use in remote, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 27/49] multi-process: add remote option, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 28/49] multi-process: add remote options parser, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 30/49] multi-process: send heartbeat messages to remote, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 31/49] multi-process: handle heartbeat messages in remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 32/49] multi-process: Use separate MMIO communication channel, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 34/49] multi-process/mon: choose HMP commands based on target, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 35/49] multi-process/mon: stub functions to enable QMP module for remote process, Jagannathan Raman, 2019/10/24
- [RFC v4 PATCH 36/49] multi-process/mon: enable QMP module support in the remote process, Jagannathan Raman, 2019/10/24