On Thu, Apr 11, 2013 at 6:02 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 01/04/2013 10:20, Liu Ping Fan ha scritto: >> From: Liu Ping Fan <pingf...@linux.vnet.ibm.com> >> >> Signed-off-by: Liu Ping Fan <pingf...@linux.vnet.ibm.com> >> --- >> vl.c | 2 ++ >> 1 files changed, 2 insertions(+), 0 deletions(-) >> >> diff --git a/vl.c b/vl.c >> index 7643f16..46a25cf 100644 >> --- a/vl.c >> +++ b/vl.c >> @@ -4157,6 +4157,7 @@ int main(int argc, char **argv, char **envp) >> } >> >> os_set_line_buffering(); >> + hostmem_init(); >> >> qemu_init_cpu_loop(); >> qemu_mutex_lock_iothread(); >> @@ -4174,6 +4175,7 @@ int main(int argc, char **argv, char **envp) >> >> /* clean up network at qemu process termination */ >> atexit(&net_cleanup); >> + atexit(&hostmem_finalize); > > This should be in hostmem_init. > Ok, thanks. And extra, for the hostmem_init, what about something like #define block_init(function) module_init(function, MODULE_INIT_BLOCK)
Regards, Pingfan > Paolo > >> >> if (net_init_clients() < 0) { >> exit(1); >> >