From patchwork Mon Feb 18 17:44:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 221425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C88012C0040 for ; Tue, 19 Feb 2013 04:45:27 +1100 (EST) Received: from localhost ([::1]:44718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7UmL-0008Bn-NM for incoming@patchwork.ozlabs.org; Mon, 18 Feb 2013 12:45:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Um1-00086k-SJ for qemu-devel@nongnu.org; Mon, 18 Feb 2013 12:45:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7Um0-0005pC-N5 for qemu-devel@nongnu.org; Mon, 18 Feb 2013 12:45:05 -0500 Received: from mail-ve0-f172.google.com ([209.85.128.172]:38476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Um0-0005nP-K2 for qemu-devel@nongnu.org; Mon, 18 Feb 2013 12:45:04 -0500 Received: by mail-ve0-f172.google.com with SMTP id cz11so5179386veb.3 for ; Mon, 18 Feb 2013 09:45:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-gm-message-state; bh=aB21OHhvqYSBpZkUY0yu40uh8aVOha5fpyMxghiqhnk=; b=hviyFVmmna33ExHhemDQIhV9ObObQj1Gug4y+OI1JDBKKtofQ9+TV2MVvQDVgvYPTs X6qmCwrS/gediGJCYSNNtBdlZzcRN1/S3LjPTXajZvOMAaJld9TsMvIOUWGRzmFg7i3A V0j5d/8Eemm6GkbyjlHUGcXHLwL4Uy/PweqIXER12YVNqQYScSMPaCXCP2Li+6gW0tK3 hbl1l3AWs9kasu9tWX8OR3nWvkFb8XUXG7ErulWxgxmshpv3AMTD3Jq0+Od1+5F+Ugao 3v2qndTTqkTW5qjl+NaMGIVRq7oazIeoBOW0afjdzxZvTMDsZZo3bCgwq3hASwgRL4wS O9pg== X-Received: by 10.52.67.75 with SMTP id l11mr14633709vdt.29.1361209503285; Mon, 18 Feb 2013 09:45:03 -0800 (PST) Received: from localhost (207-172-165-101.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com. [207.172.165.101]) by mx.google.com with ESMTPS id yu12sm80639244vec.6.2013.02.18.09.45.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 18 Feb 2013 09:45:00 -0800 (PST) Date: Mon, 18 Feb 2013 12:44:59 -0500 From: Kevin O'Connor To: Laszlo Ersek Message-ID: <20130218174459.GA21352@morn.localdomain> References: <511D4BDF.2000506@redhat.com> <1360880674.27246.20.camel@shinybook.infradead.org> <511E8470.1020707@redhat.com> <1360961820.17260.13.camel@i7.infradead.org> <511EE2D5.9090804@redhat.com> <1361184025.13482.90.camel@i7.infradead.org> <1361191995.13482.107.camel@i7.infradead.org> <51226117.6080804@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <51226117.6080804@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQn//PyVYuVxhv7teCX15pVCAglYMUS6yAgFu/coWepnFvsh+Ct2KvNV1OTQpGGa+fjZq3yd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.128.172 Cc: "edk2-devel@lists.sourceforge.net" , David Woodhouse , seabios , "qemu-devel@nongnu.org" Subject: Re: [Qemu-devel] [SeaBIOS] [edk2] (PAM stuff) reset doesn't work on OVMF + SeaBIOS CSM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Mon, Feb 18, 2013 at 06:12:55PM +0100, Laszlo Ersek wrote: > On 02/18/13 13:53, David Woodhouse wrote: > I single-stepped qemu-1.3.1 in x86_cpu_reset() / > cpu_x86_load_seg_cache(), and we seem to set the correct base. However > when I pause the VM when it's spinning in the reset loop, and I issue > the following in virsh: [...] > EIP=0000fff0 EFL=00000002 [-------] CPL=3 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 0000f300 > CS =f000 000f0000 0000ffff 0000f300 If you're seeing the CPU running at 0x000ffff0 then that would certainly be wrong. It needs to run at 0xfffffff0. Maybe this has something to do with KVM's difficulty with executing in "big real" mode? Just to verify this is a cpu eip issue and not a memory mapping issue, one could try applying the patch below to seabios. On a working system during a reboot the patch should report "before val=1/0" and "after val=2/0" (the second value could be anything, but should not change). If you do see the second value changing it would indicate memory mapping issues. -Kevin --- a/src/resume.c +++ b/src/resume.c @@ -129,6 +129,12 @@ tryReboot(void) { dprintf(1, "Attempting a hard reboot\n"); + dprintf(1, "before val=%x/%x\n", HaveRunPost, *(int*)((void*)&HaveRunPost + 0xfff00000)); + barrier(); + HaveRunPost = 2; + barrier(); + dprintf(1, "after val=%x/%x\n", HaveRunPost, *(int*)((void*)&HaveRunPost + 0xfff00000)); + // Setup for reset on qemu. qemu_prep_reset();