From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.5897.1592482261751522670 for ; Thu, 18 Jun 2020 05:11:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a3Dok4pC; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592482260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Nrspa4hOzTrYymIliSvdVaBWLqHCCdIwGfJXtdIvrfY=; b=a3Dok4pC4jWtrwQff6VCN3IuXqA4N78ci61EKv1YS9Ux5On8v1XlzY39GLfPG7ryR/5FTM fao3U0PkEUHXix3NKRkYeyTA1U2RYddU/keJyCUE7Ox6RjYNompFRrAWlMX4qwaNMdKPwL bp+2ONoBpuI3PTEvYUKb6LyMit9xVQw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-h6jZAeG4ObWAy56qgvT0ZQ-1; Thu, 18 Jun 2020 08:10:56 -0400 X-MC-Unique: h6jZAeG4ObWAy56qgvT0ZQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3CBDC835B40; Thu, 18 Jun 2020 12:10:55 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-60.ams2.redhat.com [10.36.113.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D0977FEB3; Thu, 18 Jun 2020 12:10:52 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH] OvmfPkg: End timer interrupt later to avoid stack overflow under load To: devel@edk2.groups.io, igor.druzhinin@citrix.com, Paolo Bonzini Cc: jordan.l.justen@intel.com, ard.biesheuvel@arm.com, anthony.perard@citrix.com, julien@xen.org, Ray Ni References: <1592275782-9369-1-git-send-email-igor.druzhinin@citrix.com> <1d4cd50f-9479-0361-2d23-edda83037243@redhat.com> <8f885a46-f72b-bf13-db55-28e6db8b5bff@redhat.com> <291ce7e8-c1ce-df38-de48-e39671c9c894@redhat.com> <5f9198c8-b89d-a313-8237-5178af9cf484@citrix.com> From: "Laszlo Ersek" Message-ID: <58b6a1c7-10ad-ec54-545e-ab17ec3e2aa3@redhat.com> Date: Thu, 18 Jun 2020 14:10:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5f9198c8-b89d-a313-8237-5178af9cf484@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 06/17/20 19:23, Igor Druzhinin wrote: > On 17/06/2020 17:59, Paolo Bonzini wrote: >> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. >> >> On 17/06/20 17:46, Laszlo Ersek wrote: >>>> That said, Igor's patch seems correct to me. In fact, I'd even move >>>> DisableInterrupts before gBS->RestoreTPL unless there's a good reason >>>> not to do so. >>> OK, thank you! >>> >>> Igor, please confirm if you'd like to submit v2 with the update >>> suggested by Paolo, or if you prefer the current version. We're at the >>> beginning of the current development cycle, so I guess we can apply the >>> patch and see how it works in practice. If it ends up wreaking havoc on >>> some platforms, we can always revert the patch in time for the next >>> stable tag (edk2-stable202008). >> >> For what it's worth "correct" means that I don't see anything that could >> break and in fact I find it good policy hygienic not to allow recursive >> interrupts. >> >> v1 is okay for me too, so: >> >> Reviewed-by: Paolo Bonzini > > Thanks, unfortunately it's not possible to move DisableInterrupts inside > TPL block as RestoreTPL would immediately enable them according to current > logic. > > IMO RaiseTPL could technically save interrupt state inside it (in that > case it was disabled) and then honor it in RestoreTPL but that might have > more surprise consequences than the proposed change I reckon. > > I will create a BZ ticket as requested. Merged via as commit 239b50a86370, with the following updates: [lersek@redhat.com: add BZ ref; rewrap msg to silence PatchCheck.py] Thanks! Laszlo