From patchwork Wed Mar 11 19:19:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 449142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6E1B4140119 for ; Thu, 12 Mar 2015 06:20:03 +1100 (AEDT) Received: from localhost ([::1]:56482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVmAh-0003Ap-UE for incoming@patchwork.ozlabs.org; Wed, 11 Mar 2015 15:19:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVmAL-0002tK-Re for qemu-devel@nongnu.org; Wed, 11 Mar 2015 15:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVmAF-00010J-01 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 15:19:37 -0400 Received: from mail-qg0-f45.google.com ([209.85.192.45]:42262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVmAE-00010B-QJ for qemu-devel@nongnu.org; Wed, 11 Mar 2015 15:19:30 -0400 Received: by qgfi50 with SMTP id i50so12602018qgf.9 for ; Wed, 11 Mar 2015 12:19:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=3Cu2cB+ug3aVPnmlxer+UNhGDxxjriri4MH7FqwQfFI=; b=izv3bt7DxR5kr5Q7VFyLqg6OG4Zrek8trmcmrs8gV3MD7mnKrK2bStSzOU+lCKr+8e v0d7+zi85xL3VcCq+hvO+wDqPKonRtRxY8c6SqZFS2/GbRaihS9RDVrLZ96tHJWeYEOg B9bGvY/BihsJM2phIpSPH0i9J5NlzBWbh2iXOkKbP2wJdgiVxZJj0L09NH/a11h3aIqR mktdJhrbRnndJgy/GyNg8Mj7R05AcIADdR7m5bzACredb7Jn9/tBt0TalsK+JkItc1lF YBTPjEuIXd1Ujz68p34YLG4t35k/VC20T3iI3e2MwiOhfojdGNy9Zg4VIq9VP4VCWFdS 83Ow== X-Gm-Message-State: ALoCoQlK8cBH6MynD8fz/5e7+2hC1eDT4/WDT5xMID/6NvNLoyKOH6MKht5pfkbDO4X87k6YlxMP X-Received: by 10.140.239.140 with SMTP id k134mr6745768qhc.98.1426101570339; Wed, 11 Mar 2015 12:19:30 -0700 (PDT) Received: from localhost (207-172-170-53.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com. [207.172.170.53]) by mx.google.com with ESMTPSA id 21sm3162375qgi.36.2015.03.11.12.19.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 12:19:29 -0700 (PDT) Date: Wed, 11 Mar 2015 15:19:28 -0400 From: Kevin O'Connor To: "Dr. David Alan Gilbert" Message-ID: <20150311191928.GA14695@morn.localdomain> References: <20150311134556.GH2334@work-vm> <20150311154220.GA26463@morn.localdomain> <20150311155306.GK2334@work-vm> <20150311163739.GA29522@morn.localdomain> <20150311165203.GL2334@work-vm> <20150311173738.GD29522@morn.localdomain> <20150311175904.GN2334@work-vm> <20150311184039.GA7341@morn.localdomain> <20150311184531.GA11423@morn.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150311184531.GA11423@morn.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.45 Cc: Andrey Korolyov , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , Bandan Das , kraxel@redhat.com, Paolo Bonzini Subject: Re: [Qemu-devel] E5-2620v2 - emulation stop error 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 Wed, Mar 11, 2015 at 02:45:31PM -0400, Kevin O'Connor wrote: > On Wed, Mar 11, 2015 at 02:40:39PM -0400, Kevin O'Connor wrote: > > For what it's worth, I can't seem to trigger the problem if I move the > > cmos read above the SIPI/LAPIC code (see patch below). > > Ugh! > > That's a seabios bug. Main processor modifies the rtc index > (rtc_read()) while APs try to clear the NMI bit by modifying the rtc > index (romlayout.S:transition32). > > I'll put together a fix. The seabios patch below resolves the issue for me. -Kevin --- a/src/romlayout.S +++ b/src/romlayout.S @@ -22,7 +22,8 @@ // %edx = return location (in 32bit mode) // Clobbers: ecx, flags, segment registers, cr0, idt/gdt DECLFUNC transition32 -transition32_for_smi: +transition32_nmi_off: + // transition32 when NMI and A20 are already initialized movl %eax, %ecx jmp 1f transition32: @@ -205,7 +206,7 @@ __farcall16: entry_smi: // Transition to 32bit mode. movl $1f + BUILD_BIOS_ADDR, %edx - jmp transition32_for_smi + jmp transition32_nmi_off .code32 1: movl $BUILD_SMM_ADDR + 0x8000, %esp calll _cfunc32flat_handle_smi - BUILD_BIOS_ADDR @@ -216,8 +217,10 @@ entry_smi: DECLFUNC entry_smp entry_smp: // Transition to 32bit mode. + cli + cld movl $2f + BUILD_BIOS_ADDR, %edx - jmp transition32 + jmp transition32_nmi_off .code32 // Acquire lock and take ownership of shared stack 1: rep ; nop