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: Thu, 23 Aug 2012 10:53:37 +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.
> >
> 
> Maybe you just need to avoid accessing unsuitable physical addresses?
> Or maybe 'if (env->cr[0] & CR0_PG_MASK)' is not strong enough, may
> (CR0_PG_MASK | CR0_PE_MASK) be better?
> 
> At what stage does it hang? What CR3 value changes are observed before
> the hang?

  It's quite embarrassing. The code I posted before is buggy, and it dumps all
1024 * 1024 page table entries. It takes a lot of time, so that I think the
system hangs. Attach is the code snipt what I am using, which works fine now.
Another question is, I would like to know the hva corresponding to gpa (i.e.,
the guest page pointed by guest pte). Do you happen to know there is such
gpa2hva function in QEMU?

  Thanks.

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

Attachment: qemu.patch
Description: Text Data


reply via email to

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