On Thu, Oct 24, 2019 at 05:08:53AM -0400, Jagannathan Raman wrote: > int main(int argc, char *argv[]) > { > + Error *err = NULL; > + > module_call_init(MODULE_INIT_QOM); > > + bdrv_init_with_whitelist(); > + > + if (qemu_init_main_loop(&err)) { > + error_report_err(err); > + return -EBUSY; > + } > + > + qemu_init_cpu_loop(); > + > + page_size_init(); > + > current_machine = MACHINE(REMOTE_MACHINE(object_new(TYPE_REMOTE_MACHINE))); > > + mpqemu_link = mpqemu_link_create(); > + if (!mpqemu_link) { > + printf("Could not create MPQemu link\n"); > + return -1; > + } > + > + mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, STDIN_FILENO); > + mpqemu_link_set_callback(mpqemu_link, process_msg); > + > + mpqemu_start_coms(mpqemu_link); Can you use util/main-loop.c instead of an mpqemu-specific event loop? I think that file is needed anyway because lots of QEMU code depends on it.