Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4838115imw; Tue, 19 Jul 2022 14:25:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uCHgsXM7MFf7A1U7T9Rwz93BLoYMyun1e+kVfAsMRX+AWFjRD+XHZLGOsQjAv0dTSKgy9B X-Received: by 2002:a17:907:1dde:b0:72b:11ae:700b with SMTP id og30-20020a1709071dde00b0072b11ae700bmr31874473ejc.520.1658265914682; Tue, 19 Jul 2022 14:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658265914; cv=none; d=google.com; s=arc-20160816; b=qRBPEmBKvV9o+rSLq/lTkgnnNEzcfoo4jYfqpDTjohBr1DSWAou/VphaE312CmBZkI 9+noHEu6IytfMpAfnpq2S0jgUGCQ8e5J1FvXZXdTj1tVbIZPoP1yXoIy+O1J5rVqxks1 ri1VU9ejiQ6PRxTjVKl1XSgN2wayXxHyapHUxbzLt5zb3iaVpjidJDjt+/rsks+KRtog E5x5G1GHVcwNn2EUqkN161a2j6BZYQhceIQbsFC+eq36aQtMFe2m9j4QD9WvsuZnXWHC j2YqRBV6hLQL9kPpnEQ1h3r5lGlZNlKAH+jXqjjj48eCuIxOUM6iwKTCv1qSstW8R9lT SaPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9enq0fgxD5G4aG3v4Ve8uLcTEh3C8HVLu42xXwSENQs=; b=Nv1qoPKDMF9DPEhftDoFzjZY9aA7lOgr45tWreceJnl2ah+WJRlsahWRrnzRgjZylY 7Xy910Q6efjqYqgCPvx0EaceZ9I3K1TiSLx/jp7X6QbfwZdKS/r/l6VHPTJTBloa/i7l 0/uerepr/KMVPnwvwLOIKVjbyPrac716aJ0u+GidgCOzFcbj1bYSihDdghoOmKA83sr2 y0TEHv4VPDyx2oIJ1nor1YgdBVCM718GdCJcK3PO04mUYTgD/FATpIRc8NW5CJrL/0cW j5mosXdhdTWsyP70QKzg1bFTXdZA4TYytz9TOduAAtcGhrMGlDrpTBY8wzRBY+ii5td/ rK+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Nepl+Hfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt36-20020a1709072da400b0072b13abe376si22248156ejc.789.2022.07.19.14.24.49; Tue, 19 Jul 2022 14:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Nepl+Hfv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238262AbiGSVXp (ORCPT + 99 others); Tue, 19 Jul 2022 17:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237544AbiGSVXj (ORCPT ); Tue, 19 Jul 2022 17:23:39 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AF396170C; Tue, 19 Jul 2022 14:23:34 -0700 (PDT) Received: from zn.tnic (p200300ea97297609329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:7609:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E629F1EC0644; Tue, 19 Jul 2022 23:23:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658265808; 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:in-reply-to:in-reply-to: references:references; bh=9enq0fgxD5G4aG3v4Ve8uLcTEh3C8HVLu42xXwSENQs=; b=Nepl+HfvfnIeaiJV3nAMnxEVX+rd09745zFNBMV7IvHW/EAVv0blS62razb3b9KTO9qOoA S28eL2neJFYrwuoZl4vDQ+2PrCE5Ie0OcYUc+Ru6rBXZFKh1iPj+qp5/MuPLDQJf/1U2Me Lr2aHQ7qIx0xQpAbilMYQxlmcvQYAPk= Date: Tue, 19 Jul 2022 23:23:19 +0200 From: Borislav Petkov To: Ard Biesheuvel Cc: Dionna Amalie Glaze , "Kirill A. Shutemov" , Peter Gonda , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , Marcelo Cerri , tim.gardner@canonical.com, Khalid ElMously , philip.cox@canonical.com, the arch/x86 maintainers , Linux Memory Management List , linux-coco@lists.linux.dev, linux-efi , LKML , "Yao, Jiewen" Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory Message-ID: References: <20220627223808.ihgy3epdx6ofll43@black.fi.intel.com> <20220718172159.4vwjzrfthelovcty@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2022 at 10:45:06PM +0200, Ard Biesheuvel wrote: > So let's define a way for the EFI stub to signal to the firmware > (before EBS()) that it will take control of accepting memory. The > 'bootloader that calls EBS()' case can invent something along the > lines of what has been proposed in this thread to infer the > capabilities of the kernel (and decide what to signal to the > firmware). But we have no need for this additional complexity on > Linux. To tell you the truth, I've been perusing this thread from the sidelines and am wondering why does this need this special dance at all? If EFI takes control of accepting memory, then when the guest kernel boots, it'll find all memory accepted and not do anything. If EFI doesn't accept memory, then the guest kernel will boot and do the accepting itself. So either I'm missing something or we're overengineering this for no good reason... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette