problem about writing a hello world for VM

于爱民 <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <023201c882c2$9a2dfab0$2905a8c0@wubinibm>
hello, every one!

  I was reading the source code of ResourceMon. As I see in load_current_module() function, when resourcemon has variable vm_is_multi_module set, it would check whether a next VM definition is found. If it is, then vm->start_vm() will be called to start the current vm. 
  The corresponding code is as following:
  bool module_manager_t::load_current_module(){ 
    .....
    if( vm_is_multi_module )
    {
    .....
      L4_Word_t mod_idx = this->current_module + 1;
     while( mod_idx < vm_modules->get_total() )
     {
         vm_modules->get_module_info( mod_idx, mod_cmdline, 
          mod_haddr_start, mod_size );
         if( cmdline_has_vmstart(mod_cmdline) )
      break; // We found the next VM definition.
        }
    }
     ......
    if( !vm->start_vm() )
    {
     printf( "Unable to start the virtual machine.\n");
     goto err_out;
    }

    return true;
.....
  }
My question is : where does the resourcemon load and start the next vm?

Funther, I would write my own VM, can someone give a "hello world" sample code which can run as a VM?

Thanks very much!!!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.