From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D1C0CDB474 for ; Tue, 17 Oct 2023 10:19:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343743AbjJQKTs (ORCPT ); Tue, 17 Oct 2023 06:19:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234974AbjJQKT1 (ORCPT ); Tue, 17 Oct 2023 06:19:27 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBBDE12E; Tue, 17 Oct 2023 03:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fxvZNgF+It9/pkutyTdBwQ2drZbf8d9h7gItHyVyZtc=; b=UywmqRqXVi95xSI8PqvFWe4u1k Wxct0bmVsIzqbVqHIRow1Dv39c81o8Aw3R57nSINroRmme67pBE39wLzPEoIBW1w8GkpHoGa1GHQ3 VcjF2ANQNyKIzBGqgpppAOdsA6GMmWW5jRSKIjeLzwaUL5YAHroY5o+n7yf4psX+UFP2kKbWX6dLc Ra/qER2vpnnWzDn3DLXaaNkKilQRvyq/tTKXrgLjDnV8ho677Gd8EbhwEh7kkGeDOQFfiyYxxIRI2 SgEWk9gV0FBFju9II/84Bsf0T8uCgzD3NrBSXTtaRYr1HUMMLItbWzWm40hygwym22LIoJY6PaZ4N usMeJ3Xg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qsh8Y-00Bjm7-Nd; Tue, 17 Oct 2023 10:17:18 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 15DE030058D; Tue, 17 Oct 2023 12:17:18 +0200 (CEST) Date: Tue, 17 Oct 2023 12:17:17 +0200 From: Peter Zijlstra To: Ard Biesheuvel Cc: "Kirill A. Shutemov" , Matthew Wilcox , Borislav Petkov , Andy Lutomirski , Dave Hansen , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org, Nikolay Borisov Subject: Re: [PATCHv2] efi/unaccepted: Fix soft lockups caused by parallel memory acceptance Message-ID: <20231017101717.GJ33217@noisy.programming.kicks-ass.net> References: <20231016163122.12855-1-kirill.shutemov@linux.intel.com> <20231016213932.6cscnn6tsnzsnvmf@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 17, 2023 at 09:42:13AM +0200, Ard Biesheuvel wrote: > One question I have is whether the sequence > > spin_lock_irqsave(&unaccepted_memory_lock, flags); > ... > spin_unlock(&unaccepted_memory_lock); > arch_accept_memory(phys_start, phys_end); > spin_lock(&unaccepted_memory_lock); > ... > spin_unlock_irqrestore(&unaccepted_memory_lock, flags); > > is considered sound and is supported by all architectures? Yes.