Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3413067iog; Mon, 27 Jun 2022 15:49:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tn42MyvYBSTttp2DC5J6U4NzrRwpwtkJHU1jes7KX32+O26QRdj/HPEWc0GUj3E1hpy/nJ X-Received: by 2002:a17:907:7e97:b0:718:f4d4:c970 with SMTP id qb23-20020a1709077e9700b00718f4d4c970mr14727794ejc.250.1656370161085; Mon, 27 Jun 2022 15:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656370161; cv=none; d=google.com; s=arc-20160816; b=cM+3z8al1L204HKsay3kwaGqkNDwEKGUybepYqvDlP46xpgNiQXGDonfXJtmU9EVa7 FkM3V03FlDF6uq08v5dRYbxl21LMGRiyp+xyCsBDPZEpA9L95zMO3JZlh68uF+TzEWpS TkISiBoKq97/HxnaQoZSxj5U/ocL9L3MvvXYhIIKz7HVBYV/nn3HpOnVNdFPov6uUlq+ 5g22y5hxw5lEfJLEagFQ59wpTszegOENGOPs5p9HFG6Bejrc6yxwJxeI/B4ZxzpZV2CQ toMeus1kXwMA7cbOp1FwPhkTkcCj/KibW8tjLRET7JXxqshvT/uI3QIwi4gf3kCgd7Tx PSew== 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=6dfeagS61kjta/hGF7t5uqLC6OFjDmMU15cw4A+mLKs=; b=f/hWZ9o3R7kz0liVDQB4q3UJFii4W0i79y/9EWctY1lnM4uQxWNy6Wqcuwh54Xbi8d Q8k+1pzbOdK6OnK5VraoMnWWj1LG7cEWGVott5axPODYwEI5z989L+TxjRsRcshumcT0 xTC4rW1KYPDwsHLiCvlIx5ca4r7ifssfGd6hUngFc3Yjlsjnus+zftJsckgmQwcEH/MP 3SJV/toaTWWAZIxwDcklm5DV+dYEQAa0XmuTxt3P5kPQBZYuK0YZ69CSvK0GMvkDlTUD +kh/n2jWsx2ZK9tam839zppYrJeJP3o8aAZsd6tF4R7rf59mRaJWnbd4X3sCdigjTO45 HSNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HqW6K+Eu; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a056402281600b0043577827670si16574489ede.354.2022.06.27.15.48.56; Mon, 27 Jun 2022 15:49:21 -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=@intel.com header.s=Intel header.b=HqW6K+Eu; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230184AbiF0Wi0 (ORCPT + 99 others); Mon, 27 Jun 2022 18:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243039AbiF0WiM (ORCPT ); Mon, 27 Jun 2022 18:38:12 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDBC310F1; Mon, 27 Jun 2022 15:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656369490; x=1687905490; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t0fJ1EB2Kg/aNY0pT1VtDftqiRsIkXLbIkW27zDJlwM=; b=HqW6K+Euarlnhkn4SoFUnMHaDoVWjvVhuX3RMWNlUagTgBQqn5vh2qyF Ts+qi2XMY+Y+7jCKJsK2GKp3isxPa9M/dPTWT1eT0Vt+nLX+XuLYM4R6L VS6+M7fkdEhrLpeQ8qev9PTYYBgh1aXx8XQoyZHGNLlVycMPthANpR8lt gtHS2ReGbbLJ8UHaA5SVNVyMkfFRUt8ZDJfkW1ucqV80fGoerDG0+QgeT a3V3SQVEQvJapkZeHw+3VKkblftLNUsm3yPodo64hK55/hTWcXHjKgfnK qnBT2qmPwn30lm/7mSewXIg3vWCsgCZ7ePghWIPoyBmKo85bbC/qsnjiy w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="270324317" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="270324317" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.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: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 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