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 0BF20C43334 for ; Mon, 27 Jun 2022 22:38:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 862DC8E0002; Mon, 27 Jun 2022 18:38:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 810668E0001; Mon, 27 Jun 2022 18:38:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D8478E0002; Mon, 27 Jun 2022 18:38:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 5EFDE8E0001 for ; Mon, 27 Jun 2022 18:38:26 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 309D92070B for ; Mon, 27 Jun 2022 22:38:26 +0000 (UTC) X-FDA: 79625481012.07.787EB28 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by imf07.hostedemail.com (Postfix) with ESMTP id 5835C4003D for ; Mon, 27 Jun 2022 22:38:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656369503; x=1687905503; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t0fJ1EB2Kg/aNY0pT1VtDftqiRsIkXLbIkW27zDJlwM=; b=bwejNaTfyztbHzLRjFK6vy7Oi1o/7gp2lTienryNaNxsZoohKyD36Rz8 hGzgRp0w4sllMx0yKLJ07ZdQsGX8mxdA+LNbZcfAqggFOVQYkyqDMLlfs yJ0MT5ELGQ2TfeUydeTEPXi4DV9lFU8krB5uq1CBUphJx2h119lxl65Tj 4apPkdoIdwJNvD5E+q+xz7alOJJKFlDVFRY/wIwxsD+KK0o7royttIK+2 7eu1+fPwOUou+LW5SeDqpQCL1aXu8u7tvIdSB7rWTarU/UFwF7mTg8zef hi1jvZBA45Lf1cfQXNcy3/kBrdjUKcJ+qo/b6BnDxMkqQCPn/47jyRlYa w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="307055667" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="307055667" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 15:38:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="766943905" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 27 Jun 2022 15:38:03 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 1AEF7D9; Tue, 28 Jun 2022 01:38:08 +0300 (EEST) Date: Tue, 28 Jun 2022 01:38:08 +0300 From: "Kirill A. Shutemov" To: Ard Biesheuvel Cc: Peter Gonda , Borislav Petkov , 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 Subject: Re: [PATCHv7 00/14] mm, x86/cc: Implement support for unaccepted memory Message-ID: <20220627223808.ihgy3epdx6ofll43@black.fi.intel.com> References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220627113019.3q62luiay7izhehr@black.fi.intel.com> <20220627122230.7eetepoufd5w3lxd@black.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=bwejNaTf; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf07.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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656369505; 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=6dfeagS61kjta/hGF7t5uqLC6OFjDmMU15cw4A+mLKs=; b=aGbVQHXRO/bEAjbyzTKT71zjntZ5T0WBe9BOYji9lQDooyaikGcR/ctTHRIfpZHD9ZKgdb 8JkYtwUJ0OaVRiuBHrEeJ4V/rZ9Rb70GQRCxwgWb9p2WZ7c8cmh0s3MILJ0lww54ZqRaHy UIP61xnx96DEffrLLhltKkob5ctiwNw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656369505; a=rsa-sha256; cv=none; b=vuIRPzLunehjt5wbrBXuCWU0EWuR0AZ2vNqPMgMRZJMpnBFr8bQvn0vVQFNt7YUI/KpQVt F2JFOhIJneGBo0H7q0FFZE/e5sUsiHF11qOmSX6jLCsOUisW74WdzVqdw706hBinHnzqRo 3t+DL+gtoV2Os7IyVHR4fI7APcyjXLM= X-Stat-Signature: qnyz4afsde7n13m6je399y3u5rj7bfna X-Rspamd-Queue-Id: 5835C4003D X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=bwejNaTf; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf07.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 X-Rspamd-Server: rspam12 X-HE-Tag: 1656369503-724075 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 Mon, Jun 27, 2022 at 06:33:51PM +0200, Ard Biesheuvel wrote: > > > > > > > > > > Just as an idea, we can put info into UTS_VERSION which can be read from > > > > > the built bzImage. We have info on SMP and preeption there already. > > > > > > > > > > > > > Instead of hacking this into the binary, couldn't we define a protocol > > > > that the kernel will call from the EFI stub (before EBS()) to identify > > > > itself as an image that understands unaccepted memory, and knows how > > > > to deal with it? > > > > > > > > That way, the firmware can accept all the memory on behalf of the OS > > > > at ExitBootServices() time, unless the OS has indicated there is no > > > > need to do so. > > > > > > I agree it would be better. But I think it would require change to EFI > > > spec, no? > > > > Could this somehow be amended on to the UEFI Specification version 2.9 > > change which added all of the unaccepted memory features? > > > > Why would this need a change in the EFI spec? Not every EFI protocol > needs to be in the spec. My EFI knowledge is shallow. Do we do this in other cases? -- Kirill A. Shutemov