Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cq2ax-000875-54 for qemu-devel@nongnu.org; Sun, 16 Jan 2005 00:04:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cq2aq-00084G-Pt for qemu-devel@nongnu.org; Sun, 16 Jan 2005 00:04:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cq2ap-00082t-T3 for qemu-devel@nongnu.org; Sun, 16 Jan 2005 00:04:51 -0500 Received: from [220.248.27.114] (helo=soulinfo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1Cq2DK-0004ne-IF for qemu-devel@nongnu.org; Sat, 15 Jan 2005 23:40:35 -0500 Date: Sun, 16 Jan 2005 12:38:27 +0800 From: hugang@soulinfo.com Subject: Re: [Qemu-devel] Re: 2.6.10-mm3: swsusp: out of memory on resume Message-ID: <20050116043827.GA6584@hugang.soulinfo.com> References: <200501131909.26021.rjw@sisk.pl> <20050114143400.GA27657@hugang.soulinfo.com> <200501150042.35377.rjw@sisk.pl> <20050115012120.GA4743@hugang.soulinfo.com> <41E90326.2020901@bellard.org> <20050115164056.GA28549@hugang.soulinfo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050115164056.GA28549@hugang.soulinfo.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, fabrice@bellard.org On Sun, Jan 16, 2005 at 12:40:56AM +0800, hugang@soulinfo.com wrote: > On Sat, Jan 15, 2005 at 12:48:54PM +0100, Fabrice Bellard wrote: ... > > When I using Qemu as X86_64 emulataion for testing software suspend, I > get the first oops the instruction is this, > IN: > 0xffffffff80116a8a: movzwl 0x8(%rbx),%eax > 0xffffffff80116a8e: mov %eax,%ss <- general protection > > That's in > arch/x86_64/kernel/suspend.c +105 > asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss)); <-- general protection. > > I don't why, but I check %eax and %ss are same value, so I just comment > this line, the oops go away, But still geting hang, Now I have no idea, > :) > > Ok, I enable the raise_exception_err, and catach this. ..... /* only works if protected mode and not VM86. seg_reg must be != R_CS */ void load_seg(int seg_reg, int selector) { uint32_t e1, e2; int cpl, dpl, rpl; SegmentCache *dt; int index; target_ulong ptr; selector &= 0xffff; if ((selector & 0xfffc) == 0) { /* null selector case */ if (seg_reg == R_SS) raise_exception_err(EXCP0D_GPF, 0); cpu_x86_load_seg_cache(env, seg_reg, selector, 0, 0, 0); } else { .... In the comment line, said must be != R_CS, But in code is check R_SS, I just change R_SS to R_CS, then the software-suspend suspend part passed in qemu, I geting hang at copyback memory in resume, Still debuging... :) Maybe that, also useful for other, Eg. Win2k disk full... -- Hu Gang .-. /v\ // \\ Linux User /( )\ [204016] GPG Key ID ^^-^^ http://soulinfo.com/~hugang/hugang.asc