multi-process: remote: add create_done condition
RFC PATCH 29/37 multi-process: remote: add create_done condition
From: Elena Ufimtseva <[email protected]>
Do not allow BAR,MMIO handlers and irq setup to run before the configuration of the devices completes.
Signed-off-by Jagannathan Raman <[email protected]>
Signed-off-by John G Johnson <[email protected]>
Signed-off-by Elena Ufimtseva <[email protected]>
--- remote/remote-main.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-)
remote/remote-main.c +20 -9
@@ -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)) {
Signature · 1 line
1.8.3.1