[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 23/50] multi-process: remote: add create_done condition
From: |
Jagannathan Raman |
Subject: |
[PATCH v5 23/50] multi-process: remote: add create_done condition |
Date: |
Mon, 24 Feb 2020 15:55:14 -0500 |
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 | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/remote/remote-main.c b/remote/remote-main.c
index 455cfb6..ec1ce2c 100644
--- a/remote/remote-main.c
+++ b/remote/remote-main.c
@@ -55,6 +55,7 @@
static MPQemuLinkState *mpqemu_link;
PCIDevice *remote_pci_dev;
+bool create_done;
static void process_config_write(MPQemuMsg *msg)
{
@@ -332,21 +333,29 @@ static void process_msg(GIOCondition cond, MPQemuChannel
*chan)
process_get_pci_info_msg(remote_pci_dev, msg);
break;
case PCI_CONFIG_WRITE:
- process_config_write(msg);
+ if (create_done) {
+ process_config_write(msg);
+ }
break;
case PCI_CONFIG_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:
@@ -366,7 +375,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 DEV_OPTS:
if (setup_device(msg, &err)) {
--
1.8.3.1
- [PATCH v5 12/50] multi-process: remote process initialization, (continued)
- [PATCH v5 12/50] multi-process: remote process initialization, Jagannathan Raman, 2020/02/24
- [PATCH v5 14/50] mutli-process: build remote command line args, Jagannathan Raman, 2020/02/24
- [PATCH v5 13/50] multi-process: introduce proxy object, Jagannathan Raman, 2020/02/24
- [PATCH v5 15/50] multi-process: PCI BAR read/write handling for proxy & remote endpoints, Jagannathan Raman, 2020/02/24
- [PATCH v5 16/50] multi-process: Synchronize remote memory, Jagannathan Raman, 2020/02/24
- [PATCH v5 18/50] multi-process: configure remote side devices, Jagannathan Raman, 2020/02/24
- [PATCH v5 17/50] multi-process: create IOHUB object to handle irq, Jagannathan Raman, 2020/02/24
- [PATCH v5 20/50] multi-process: add qdev_proxy_add to create proxy devices, Jagannathan Raman, 2020/02/24
- [PATCH v5 19/50] multi-process: Retrieve PCI info from remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 21/50] multi-process: remote: add setup_devices msg processing, Jagannathan Raman, 2020/02/24
- [PATCH v5 23/50] multi-process: remote: add create_done condition,
Jagannathan Raman <=
- [PATCH v5 25/50] multi-process: Introduce build flags to separate remote process code, Jagannathan Raman, 2020/02/24
- [PATCH v5 24/50] multi-process: add processing of remote device command line, Jagannathan Raman, 2020/02/24
- [PATCH v5 26/50] multi-process: refractor vl.c code, Jagannathan Raman, 2020/02/24
- [PATCH v5 22/50] multi-process: remote: use fd for socket from parent process, Jagannathan Raman, 2020/02/24
- [PATCH v5 27/50] multi-process: add remote option, Jagannathan Raman, 2020/02/24
- [PATCH v5 29/50] multi-process: add parse_cmdline in remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 28/50] multi-process: add remote options parser, Jagannathan Raman, 2020/02/24
- [PATCH v5 32/50] multi-process: Use separate MMIO communication channel, Jagannathan Raman, 2020/02/24
- [PATCH v5 33/50] multi-process: perform device reset in the remote process, Jagannathan Raman, 2020/02/24
- [PATCH v5 34/50] multi-process/mon: choose HMP commands based on target, Jagannathan Raman, 2020/02/24