multi-process: setup a machine object for remote device process
RFC PATCH v2 10/35 multi-process: setup a machine object for remote device process
From: Jagannathan Raman <[email protected]>
remote-machine object sets up various subsystems of the remote device process. Instantiate PCI host bridge object and initialize RAM, IO & PCI memory regions.
Signed-off-by John G Johnson <[email protected]>
Signed-off-by Jagannathan Raman <[email protected]>
Signed-off-by Elena Ufimtseva <[email protected]>
--- exec.c | 3 +- include/exec/address-spaces.h | 2 + include/remote/machine.h | 46 +++++++++++++ remote/Makefile.objs | 1 + remote/machine.c | 118 ++++++++++++++++++++++++++++++++++ remote/remote-main.c | 7 ++ 6 files changed, 175 insertions(+), 2 deletions(-) create mode 100644 include/remote/machine.h create mode 100644 remote/machine.c
exec.c +1 -2
@@ -194,7 +194,6 @@ typedef struct subpage_t {#define PHYS_SECTION_WATCH 3static void io_mem_init (void ); -static void memory_map_init (void );static void tcg_commit (MemoryListener *listener);static MemoryRegion io_mem_watch;
@@ -3106,7 +3105,7 @@ static void tcg_commit(MemoryListener *listener)tlb_flush (cpuas->cpu); } -static void memory_map_init (void ) +void memory_map_init (void ) { system_memory =g_malloc (sizeof (*system_memory));
include/exec/address-spaces.h +2 -0
@@ -33,6 +33,8 @@ MemoryRegion *get_system_memory(void);*/ MemoryRegion *get_system_io (void ); +void memory_map_init (void ); +extern AddressSpace address_space_memory;extern AddressSpace address_space_io;
include/remote/machine.h new file +46 -0
46 lines not on this page · raw message
remote/Makefile.objs +1 -0
@@ -1,2 +1,3 @@ remote-pci-obj-$(CONFIG_MPQEMU) += remote-main.o remote-pci-obj-$(CONFIG_MPQEMU) += pcihost.o +remote-pci-obj-$(CONFIG_MPQEMU) += machine.o
remote/machine.c new file +118 -0
118 lines not on this page · raw message
remote/remote-main.c +7 -0
@@ -26,10 +26,17 @@#include "qemu/osdep.h" #include "qemu/module.h" +#include "remote/pcihost.h" +#include "remote/machine.h" +#include "hw/boards.h" +#include "hw/qdev-core.h" +#include "qemu/main-loop.h" int main (int argc,char *argv[]) {module_call_init (MODULE_INIT_QOM ); + current_machine =MACHINE (REMOTE_MACHINE (object_new (TYPE_REMOTE_MACHINE ))); +return 0 ; }
Signature · 1 line
2.17.1