qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang


From: Wei-Ren Chen
Subject: Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang
Date: Wed, 22 Aug 2012 10:20:26 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

> >   The system will hang while booting. However, if I comment
> > cpu_physical_memory_read in function dump_guest_pgtable, there
> > is no problem. What I am missing here? Thanks.
> 
> cpu_physical_memory_read() can cause faults or other side effects like
> MMIO. Using cpu_get_phys_page_debug() may help.

  PMM also suggest me looking on cpu_get_phys_page_debug. When I read
the code, I found something suspicious.

---
target_phys_addr_t cpu_get_phys_page_debug(CPUX86State *env, target_ulong addr)
{
    target_ulong pde_addr, pte_addr;

    ...

    pde = ldq_phys(pde_addr);

    ...
}
---

  The address of pde and pte should be (guest) physical address, right?
If so, then target_ulong should be replaced with target_phys_addr_t.
The other clue is the type of ldq_phys's parameter is target_phys_addr_t.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]