tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Xen 3.3: Problem HVM guest

Michael Litchard wrote:
Christoph, how did you isolate the problem? I'll take any opportunity
to learn more troubleshooting techniques.

Launch xend by hand with 'trace_start' instead of 'start'. Then you get
a /var/log/xen/xend.trace file. Look at it how far it comes there and find the python routine. I figured out, it stopped running further when
it calls xc.build_hvm() from the lowlevel/xs python module which in turn
calls xc_build_hvm() in tools/libxc/xc_hvm_build.c. With debug printf's,
I tracked it down to what I have shown here.


On Tue, Aug 12, 2008 at 2:54 PM, Christoph Egger 
<> wrote:
Christoph Egger wrote:

When launching a HVM guest, the process hangs and does not even block any
xmlrpc communication, there's a significant system slowdown until reboot.

I finally indentified the place of hang. It is in the xentools33 package
in ${WRKSRC}/libxc/xc_hvm_build.c , function setup_guest().

At the end of setup_guest(), there's this junk of code:

   /* Insert JMP <rel32> instruction at address 0x0 to reach entry point.
   entry_eip = elf_uval(&elf, elf.ehdr, e_entry);
   if ( entry_eip != 0 )    {
       char *page0 = xc_map_foreign_range(
           xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, 0);
       if ( page0 == NULL )
           goto error_out;
       page0[0] = 0xe9;               <------------ "hang"
       *(uint32_t *)&page0[1] = entry_eip - 5;
       munmap(page0, PAGE_SIZE);

The "hang" happens when executing page0[0] = 0xe9;

I'm CC this to tech-kern, because I'm not sure if this is a bug in
xentools or if I found a UVM/pmap bug.
Here is an URL to the diff where this hunk has been added including the
commit log:

Home | Main Index | Thread Index | Old Index