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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 292ACC19F2D for ; Tue, 9 Aug 2022 11:11:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 482FD6B0071; Tue, 9 Aug 2022 07:11:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 40BE96B0072; Tue, 9 Aug 2022 07:11:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ABEF8E0001; Tue, 9 Aug 2022 07:11:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 176FD6B0071 for ; Tue, 9 Aug 2022 07:11:47 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E4108C0FA1 for ; Tue, 9 Aug 2022 11:11:46 +0000 (UTC) X-FDA: 79779789012.13.F918256 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf28.hostedemail.com (Postfix) with ESMTP id D7FCEC0156 for ; Tue, 9 Aug 2022 11:11:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660043505; x=1691579505; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=g4riI1Cedm0YyxvcNI2oLRUNfvQrlF8b9RCytIm1Osc=; b=OVJoBS1btqv+Ihl4BHzsIYkeepFtXkKH69p2rjqcOfsbiBnSpVJXflf7 K1EcTJQUHhqS/jgX7rUc9a8A33n5IA8lXIIFvuGYQxz8PJhBIIh3UZaEP Pj28SLuWKTH6W49Q3OMMU8hDANsMDnBMV4MGpznxMRiHcIH63oZQZvCQk GsRarFL1RcvhUqoP01stRTk+g3EBHFmlm4AQuhmaqVWxDoECpbKS/FxuL vZDjf5lRF2RJ/l1iSE/W/KRtjlEA+leL9C5ELp+NnT+dvp19XKlRKcI9W PFGvwG7J5l0v6/eZNW4h4p2q0ucUeSZ/mTLrorjvJx9WTb9X1n5PmacsV Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10433"; a="316738462" X-IronPort-AV: E=Sophos;i="5.93,224,1654585200"; d="scan'208";a="316738462" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2022 04:11:44 -0700 X-IronPort-AV: E=Sophos;i="5.93,224,1654585200"; d="scan'208";a="694105197" Received: from labukara-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.214.212]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2022 04:11:37 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id B515D103886; Tue, 9 Aug 2022 14:14:36 +0300 (+03) Date: Tue, 9 Aug 2022 14:14:36 +0300 From: "Kirill A. Shutemov" To: Ard Biesheuvel Cc: Dave Hansen , Marc Orr , Borislav Petkov , Dionna Amalie Glaze , 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" Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory Message-ID: <20220809111436.kudwg2nprnnsfvuh@box.shutemov.name> References: <22d54786-bc12-ecc5-2b37-cbaa56090aa8@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660043506; a=rsa-sha256; cv=none; b=DglN4E4Zb7GGJUK3KbBcbavirtaNdbWHbym8dTmKnEGTkvMWvXu5Kjee1MhRtr/ir6Ju9g nZVsaRiLQrLMP9zJ4H0bq3jf9Lzx6Tc+808ZMk29cA4/13KUII0wEETzqly3wFI4MMtFqo 50k/bMW2jazSEWFPgrqWXUoqKfJcVdM= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=OVJoBS1b; spf=none (imf28.hostedemail.com: domain of kirill.shutemov@linux.intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660043506; h=from:from:sender: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:dkim-signature; bh=w2E3J2lllioAttArXfjkC3sMNnXMJO4kEK/XZcj6Fdk=; b=h1lVyj4TyGd5uvU8ZW4HIURGjkQVpUxftkBSyeTtDCeYenH9lKM7+giSosUQ8peTFU1NYY a/Lvq4Fyr7vkS6z89nHieCwzeYtt4HamgES1m9mnR5TBwqUEDiMd6duEoiWWKHNvStCDhQ VqXRwI2ZU7V3qasIgDSq08xRYiI3t6k= X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: e94skq9ahbdy9c1dhnct9cdnnjo3ujie X-Rspamd-Queue-Id: D7FCEC0156 Authentication-Results: imf28.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=OVJoBS1b; spf=none (imf28.hostedemail.com: domain of kirill.shutemov@linux.intel.com has no SPF policy when checking 192.55.52.88) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=fail reason="No valid SPF" header.from=intel.com (policy=none) X-HE-Tag: 1660043505-394342 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Jul 23, 2022 at 01:14:07PM +0200, Ard Biesheuvel wrote: > 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. FW/kernel negotiation does not work if there's a boot loader in the middle that does ExitBootServices(). By the time kernel can announce if it supports unaccepted memory there's nobody to announce to. -- Kiryl Shutsemau / Kirill A. Shutemov