* [Qemu-devel] [RFC PATCH v2 27/35] multi-process: remote: add create_done condition
@ 2019-06-17 18:16 elena.ufimtseva
0 siblings, 0 replies; only message in thread
From: elena.ufimtseva @ 2019-06-17 18:16 UTC (permalink / raw)
To: qemu-devel
Cc: elena.ufimtseva, john.g.johnson, jag.raman, konrad.wilk,
ross.lagerwall, liran.alon, stefanha, kanth.ghatraju
From: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Do not allow BAR,MMIO handlers and irq setup to run before
the configuration of the devices completes.
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
---
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 5c26339ed7..c1362be93e 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)
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)
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)) {
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-17 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 18:16 [Qemu-devel] [RFC PATCH v2 27/35] multi-process: remote: add create_done condition elena.ufimtseva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).