Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1385390imi; Sat, 23 Jul 2022 04:23:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8VpOTR7A7I0Niznz1/qSe2jqw6TOly2Ja/orv7aRmi3JsQLrM5gY1k+Q4BGbEgX/dxUiW X-Received: by 2002:a17:906:8a70:b0:72b:132b:1720 with SMTP id hy16-20020a1709068a7000b0072b132b1720mr3063634ejc.41.1658575385154; Sat, 23 Jul 2022 04:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658575385; cv=none; d=google.com; s=arc-20160816; b=qXjfblIfo/ene8Eu3A1zB0ZFZSaPmbhaKhLduEhPjHNPa0GA4q3PIcjuRGElk8CvWz q1TAduDvBZQlUnYNlEAlPfKCrmQSD9GZf+hvqQcn64S+UyOs2J3SfjT+Iilvgjzcf6ZA K7S7T2D6XMnKDncSc9WirV+Eybq4ZRTgAV/Xd/VGWB2HhmuXds7HtOzGlT0g2ytQ/WjI ycEshw8N5Ir7oFXvm0d2GeX4jdg+lJwYiiifFhdgcw40xtjYCjONxphmbwqmYhYxEJ4i 15suxE5V2k/s8/Jw/VEVZ6xusTYwyhqFQ9PVrnwX8YzkXrvVFFozM7whRkjbTF22Tn56 DxTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+NDFMrWDGNkuDr8EY19VFrxk14BSqPf8mRU4CYwXaEE=; b=TdvY48Zcwvh7ji3KxYNaLGVrwoaRNqg79ms+cVQ1nOYZd/tkKTxizzZV7og4Vc0gGR t+tjcyG0O9MzYa8J5oY2z7YjF/3AEOjJokIbh5scB3VytPgvZdSzJuJxFRML59tTx4O1 xqStB4dFD30yD5P22HTn/3D1YMvYl+oTjK5XFA+QKu04toFmN2yk+6T+CZcg2eTQKFKX 02tBUGy20U9fQCTtrvPhmL4rw2NbM6GtZdJYBeYRi9Cl2a72hf+Ur6mjQDtY/V6NWFmY GtEoQoe0luON4EuWzaWU3LD4tiWLhfMFV3GdLMzcUNC3mixk8JFqFe/vBqYIHUUNlgVD SruA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Idm4+tMy; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg32-20020a170907a42000b00722e7e8b484si4445955ejc.625.2022.07.23.04.22.39; Sat, 23 Jul 2022 04:23:05 -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=@kernel.org header.s=k20201202 header.b=Idm4+tMy; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235010AbiGWLOZ (ORCPT + 99 others); Sat, 23 Jul 2022 07:14:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236690AbiGWLOX (ORCPT ); Sat, 23 Jul 2022 07:14:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7CF82A70A; Sat, 23 Jul 2022 04:14:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9807CB80882; Sat, 23 Jul 2022 11:14:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F347C341D3; Sat, 23 Jul 2022 11:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658574859; bh=unUMya6BPYpKOwprp7McozAEYE9y437U/0E90Qn/PR4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Idm4+tMyOetJHMHm/JAVCocTOpDhH/4+H8/qgaG+NFgUICBZPSdxOWI37JM3gj4jD V/OvQrda6hV48GHEYYyJr2xsCS8G0WxITIICAUzHNOeUZHGM8byaEfem/GklOYd5gH JvghH3cTxQxj28q6wqE6BgHdL5BWoCOKeQD8R3DFh9Y9y2hrqspCAFre0Q7odymkit PbfzEelwOOQoCJa+SsljsBScBGvZh0aG6+dBH7mGbVmOQ0OV1xq+h5inC3QVGFjkIl B3CNOrcxJO9NYFM0Lzb9ojZddR7wJ5tbrspEtad7+ovslybBfnYDXxmHSdkrls8L8o /yiwejtDXqhMA== Received: by mail-ot1-f50.google.com with SMTP id k8-20020a9d4b88000000b0061c7f8c4f77so5129723otf.10; Sat, 23 Jul 2022 04:14:19 -0700 (PDT) X-Gm-Message-State: AJIora+IxwLs6tqUO9pbknYlbmjwFcX38q6whwJZ7u+Q0w0WAAdlDeWH /PW/VId2baDobTihv5AEhd/exMYxegSTGbM7zYs= X-Received: by 2002:a05:6830:441f:b0:61c:a5bb:9c6a with SMTP id q31-20020a056830441f00b0061ca5bb9c6amr1524623otv.265.1658574858208; Sat, 23 Jul 2022 04:14:18 -0700 (PDT) MIME-Version: 1.0 References: <20220627223808.ihgy3epdx6ofll43@black.fi.intel.com> <20220718172159.4vwjzrfthelovcty@black.fi.intel.com> <22d54786-bc12-ecc5-2b37-cbaa56090aa8@intel.com> In-Reply-To: From: Ard Biesheuvel Date: Sat, 23 Jul 2022 13:14:07 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory To: Dave Hansen Cc: Marc Orr , Borislav Petkov , 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 , 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" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Thu, 21 Jul 2022 at 19:13, Dave Hansen wrote: > > On 7/19/22 17:26, Marc Orr wrote: > > - Dave's suggestion to "2. Boot some intermediate thing like a > > bootloader that does acceptance ..." is pretty clever! So if upstream > > thinks this FW-kernel negotiation is not a good direction, maybe we > > (Google) can pursue this idea to avoid introducing yet another tag on > > our images. > > I'm obviously speaking only for myself here and not for "upstream" as a > whole, but I clearly don't like the FW/kernel negotiation thing. It's a > permanent pain in our necks to solve a very temporary problem. EFI is basically our existing embodiment of this fw/kernel negotiation thing, and iff we need it, I have no objection to using it for this purpose, i.e., to allow the firmware to infer whether or not it should accept all available memory on behalf of the OS before exiting boot services. But if we don't need this, even better. What I strongly object to is inventing a new bespoke way for the firmware to make inferences about the capabilities of the image by inspecting fields in the file representation of the image (which is not guaranteed by EFI to be identical to its in-memory representation, as, e.g., the PE/COFF header could be omitted by a loader without violating the spec) As for the intermediate thing: yes, that would be a valuable thing to have in OVMF (and I will gladly take EDK2 patches that implement this). However, I'm not sure how you decide whether or not this thing should be active or not, doesn't that just move the problem around?