From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id CF4AF7803D1 for ; Tue, 22 Aug 2023 06:25:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=yLsiAmjyDIFZO4fcWui+d/WrNl2f/UNIsj/+C5nBgrI=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1692685531; v=1; b=NIJnXe9S0aqmulX/YE4DQTKffRMWDLALk9od/weJtSjxQo5Q4Q1+FxMtbaVjJYIN7+Q+mGSt eLqaQoxLUvZk42cY/e/iNLODw3s9dhGHyxv4nq6Zw0FF1lKovsVtrNLoyvoSk1A7K5RvQAM4Dlm SJdHpob73RmHtXvFTf+isPa4= X-Received: by 127.0.0.2 with SMTP id YEv2YY7687511xdBvq4VM4z0; Mon, 21 Aug 2023 23:25:31 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.2651.1692685530695723438 for ; Mon, 21 Aug 2023 23:25:30 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-184-qzmLeX_MP2uQf60Ao5eVJg-1; Tue, 22 Aug 2023 02:25:28 -0400 X-MC-Unique: qzmLeX_MP2uQf60Ao5eVJg-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B680785CBE0; Tue, 22 Aug 2023 06:25:27 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.194.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 70DA440C206F; Tue, 22 Aug 2023 06:25:27 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 36A61180078D; Tue, 22 Aug 2023 08:25:26 +0200 (CEST) Date: Tue, 22 Aug 2023 08:25:26 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, ardb@kernel.org Cc: Jiewen Yao , Michael Brown Subject: Re: [edk2-devel] [RFC/RFT PATCH] OvmfPkg/IoMmuDxe: don't rely on TPLs for re-entrancy Message-ID: References: <20230720134557.3903923-1-ardb@kernel.org> MIME-Version: 1.0 In-Reply-To: <20230720134557.3903923-1-ardb@kernel.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8T3yg5dDGlmyaa1ET8J82V7nx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=NIJnXe9S; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Thu, Jul 20, 2023 at 03:45:57PM +0200, Ard Biesheuvel wrote: > Instead of relying on raising the TPL to protect the critical sections > that manipulate the global bitmask that keeps track of bounce buffer > allocations, use compare-and-exchange to manage the global variable, and > tweak the logic to line up with that. > > Given that IoMmuDxe implements a singleton protocol that is shared > between multiple drivers, and considering the elaborate and confusing > requirements in the UEFP spec regarding TPL levels at which protocol > methods may be invoked, not relying on TPL levels at all is a more > robust approach in this case. > > Cc: Gerd Hoffmann > Cc: Jiewen Yao > Cc: Michael Brown > Link: https://bugzilla.redhat.com/show_bug.cgi?id=2211060 > Signed-off-by: Ard Biesheuvel Looks good to me. What is the status? Merged? Or waiting for testing still? If so I can create a test build with the patch and ask our QE department to check it. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107946): https://edk2.groups.io/g/devel/message/107946 Mute This Topic: https://groups.io/mt/100256049/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-