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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F06E3C3DA78 for ; Fri, 13 Jan 2023 22:20:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229450AbjAMWUe (ORCPT ); Fri, 13 Jan 2023 17:20:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbjAMWUb (ORCPT ); Fri, 13 Jan 2023 17:20:31 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5CE676AE9; Fri, 13 Jan 2023 14:20:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673648430; x=1705184430; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kYRee6SEDeSRw1BGWOZXLgclS1shhcx9XIZ3iu9LATE=; b=NcmMEspQMBoNrNPHUT7rwiM4zQLJybxJnHaGmqGoqw4ZO3fgtO0lVAXG gCHUcs1djtY6VlNUshY54ujuMzpnAN0UlUpTLVISzn0Ajk3GfskFFMOUp 8gq6KHf/oIlzG2Ruv7JDGEhtjxnAeKOaFJQ7lQZnuToBD+TGKjIXBSQU4 VU2Xa6Y4NtUmKUr8cG1I/ttEmVM7sYmWRYkSbgO872eH95aI7+59G2uYj 8M/l0NEbtqOrfB4uYmCZ7jgJdFBjLFkrljBwlVKuahYGSyAZxXSNYId00 Lsptv7ft3l6qCugXmz18O1GMXbH9gspiDvTMZK1dz+6kmCNpyarvftBkI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="304495071" X-IronPort-AV: E=Sophos;i="5.97,215,1669104000"; d="scan'208";a="304495071" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 14:20:30 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="747070008" X-IronPort-AV: E=Sophos;i="5.97,215,1669104000"; d="scan'208";a="747070008" Received: from wkoter-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.40.50]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 14:20:27 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id E6D41109AF4; Sat, 14 Jan 2023 01:20:24 +0300 (+03) Date: Sat, 14 Jan 2023 01:20:24 +0300 From: "Kirill A. Shutemov" To: Dionna Glaze Cc: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, x86@kernel.org, jiewen.yao@intel.com, devel@edk2.groups.io, Ard Biescheuvel , "Min M. Xu" , Gerd Hoffmann , James Bottomley , Tom Lendacky , Erdem Aktas , Dave Hansen Subject: Re: [PATCH v2] x86/efi: Safely enable unaccepted memory in UEFI Message-ID: <20230113222024.rp2erl54vx3grdbd@box.shutemov.name> References: <20230113212926.2904735-1-dionnaglaze@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230113212926.2904735-1-dionnaglaze@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2023 at 09:29:26PM +0000, Dionna Glaze wrote: > This patch depends on Kirill A. Shutemov's series > > [PATCHv8 00/14] mm, x86/cc: Implement support for unaccepted memory > > The UEFI v2.9 specification includes a new memory type to be used in > environments where the OS must accept memory that is provided from its > host. Before the introduction of this memory type, all memory was > accepted eagerly in the firmware. In order for the firmware to safely > stop accepting memory on the OS's behalf, the OS must affirmatively > indicate support to the firmware. I think it is a bad idea. This approach breaks use case with a bootloader between BIOS and OS. As the bootloader does ExitBootServices() it has to make the call on behalf of OS when it has no idea if the OS supports unaccepted. Note that kexec is such use-case: original kernel has to make a decision on whether it is okay to leave some memory unaccepted for the new kernel. And we add this protocol to address very temporary problem: once unaccepted memory support get upstream it is just a dead weight. Let's not do this. -- Kiryl Shutsemau / Kirill A. Shutemov