From: elena.ufimtseva@oracle.com
To: qemu-devel@nongnu.org
Cc: elena.ufimtseva@oracle.com, ross.lagerwall@citrix.com,
stefanha@redhat.com, liran.alon@oracle.com,
kanth.ghatraju@oracle.com, john.g.johnson@oracle.com,
jag.raman@oracle.com, konrad.wilk@oracle.com,
sstabellini@kernel.org
Subject: [Qemu-devel] [multiprocess RFC PATCH 29/37] multi-process: remote: add create_done condition
Date: Wed, 6 Mar 2019 23:22:36 -0800 [thread overview]
Message-ID: <20190307072236.9548-1-elena.ufimtseva@oracle.com> (raw)
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 fa32f2a..3fa6cbd 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)
{
@@ -355,21 +356,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:
@@ -389,7 +400,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)) {
--
1.8.3.1
reply other threads:[~2019-03-07 7:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190307072236.9548-1-elena.ufimtseva@oracle.com \
--to=elena.ufimtseva@oracle.com \
--cc=jag.raman@oracle.com \
--cc=john.g.johnson@oracle.com \
--cc=kanth.ghatraju@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=liran.alon@oracle.com \
--cc=qemu-devel@nongnu.org \
--cc=ross.lagerwall@citrix.com \
--cc=sstabellini@kernel.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).