From patchwork Mon Dec 21 18:47:14 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: 559678 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 13F741402A8 for ; Tue, 22 Dec 2015 05:47:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=koconnor-net.20150623.gappssmtp.com header.i=@koconnor-net.20150623.gappssmtp.com header.b=JcMgcU60; dkim-atps=neutral Received: from localhost ([::1]:46818 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB5Ui-0000Xm-S3 for incoming@patchwork.ozlabs.org; Mon, 21 Dec 2015 13:47:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB5UT-0000FW-0V for qemu-devel@nongnu.org; Mon, 21 Dec 2015 13:47:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aB5UP-0007kY-RB for qemu-devel@nongnu.org; Mon, 21 Dec 2015 13:47:24 -0500 Received: from mail-qg0-x22d.google.com ([2607:f8b0:400d:c04::22d]:34650) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aB5UP-0007kU-JF for qemu-devel@nongnu.org; Mon, 21 Dec 2015 13:47:21 -0500 Received: by mail-qg0-x22d.google.com with SMTP id 74so46317862qgh.1 for ; Mon, 21 Dec 2015 10:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koconnor-net.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=83hhQfdx5hPNCHGxtrtCZNmwkaY1NYAeDL4j2WVWJZE=; b=JcMgcU60idIzJl2nA7K7+L9L8j17jnhZNwEKLXYnXPmaedS4Tby2HTFVHjIPPtQhGa M9jVgfN0QMGRtTox0f+2LM6azG2ZKgEuks6feTurZ0XNzbERqAKjHvLlPeu7CvP2VsZ5 iKTk0Oj+sVECSGUFG4xTfO8D5xGDI63KwbB61fiMcL6nhziSNKgHx0FXJkBpdxzqU6j6 x2bKngQIAYKqHF6LC4fJsV/mD3zIYEFcevYTdN3I5oLRRQqqIKVWqPI//V8m51oDAbip 8UGwXC1kR/z2MYxufsERAPVFIHHO7nG9UhrXO2fIvuOm22yYI6fHWj8C8XxHbo7QcHNn Xe7A== 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=83hhQfdx5hPNCHGxtrtCZNmwkaY1NYAeDL4j2WVWJZE=; b=WXmnpkk5X4QyAQGDhnRvLr4U5JuIXVe05VAXxfX1fyzMGKNArLGE7uaoYRYXlFoCe3 jd6yIwXHm2/0fVEdK0PAVmcO0jvSFI1o4MGH2k1K8KPl/LvRGRNiU0bylSr76DD2ONAn 94bz+DeCYgoWkxfbXeMGs6YRcrhX5BsSwBV03uFL/QmxnwzVgarWzLT0T8VbRJpAkg/i Qcdtgb7MIPledO638ojN7ze+ce7MVLp1MLTwWC+th4Srr5fDZ1F1egXFl/zWU/p5QPa7 20N37tE4+5cb5hhlFVSyPQ6FeSPN8t8suexyH+1YtovH1jKsxPu0OZbjHl7LCWVUAnz3 p7uQ== X-Gm-Message-State: ALoCoQkwR7KOgRZUZy5jtphlCTJirYdTWQsArZwt/j/Nt8zRKBsTBdFAgR1ilSz0CPO4X54ZGGXJJ25PNopIcZLqw8OAgL1hIg== X-Received: by 10.140.109.33 with SMTP id k30mr26854558qgf.75.1450723640871; Mon, 21 Dec 2015 10:47:20 -0800 (PST) Received: from localhost (209-122-232-221.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com. [209.122.232.221]) by smtp.gmail.com with ESMTPSA id e10sm14672912qka.1.2015.12.21.10.47.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Dec 2015 10:47:20 -0800 (PST) Date: Mon, 21 Dec 2015 13:47:14 -0500 From: Kevin O'Connor To: "Gonglei (Arei)" Message-ID: <20151221184714.GB27329@morn.lan> References: <8E78D212B8C25246BE4CE7EA0E645FE52B5BE3@SZXEMI504-MBS.china.huawei.com> <8E78D212B8C25246BE4CE7EA0E645FE52B72B7@SZXEMI504-MBS.china.huawei.com> <20151119134039.GA27717@morn.lan> <33183CC9F5247A488A2544077AF19020B02B72BA@SZXEMA503-MBS.china.huawei.com> <20151218231326.GA4138@morn.lan> <33183CC9F5247A488A2544077AF19020B02B7A73@SZXEMA503-MBS.china.huawei.com> <20151219151159.GA22542@morn.lan> <33183CC9F5247A488A2544077AF19020B02B7BC2@SZXEMA503-MBS.china.huawei.com> <20151220143320.GA23942@morn.lan> <33183CC9F5247A488A2544077AF19020B02B7D39@SZXEMA503-MBS.china.huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <33183CC9F5247A488A2544077AF19020B02B7D39@SZXEMA503-MBS.china.huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::22d Cc: "Huangweidong \(C\)" , "kvm@vger.kernel.org" , Radim Krcmar , "seabios@seabios.org" , "Xulei \(Stone\)" , qemu-devel , Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform 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, Dec 21, 2015 at 09:41:32AM +0000, Gonglei (Arei) wrote: > When the gurb of OS is booting, then the softirq and C function send_disk_op() > may use extra stack of SeaBIOS. If we inject a NMI, romlayout.S: irqentry_extrastack > is invoked, and the extra stack will be used again. And the stack of first calling > will be broken, so that the SeaBIOS stuck. > > You can easily reproduce the problem. > > 1. start on guest > 2. reset the guest > 3. inject a NMI when the guest show the grub surface > 4. then the guest stuck Does the SeaBIOS patch below help? I'm not familiar with how to "inject a NMI" - can you describe the process in more detail? -Kevin --- a/src/romlayout.S +++ b/src/romlayout.S @@ -548,7 +548,9 @@ entry_post: ENTRY_INTO32 _cfunc32flat_handle_post // Normal entry point ORG 0xe2c3 - IRQ_ENTRY 02 + .global entry_02 +entry_02: + ENTRY handle_02 // NMI handler does not switch onto extra stack ORG 0xe3fe .global entry_13_official