From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.102858.1673648431325449447 for ; Fri, 13 Jan 2023 14:20:31 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Kvgb6QMO; spf=none, err=permanent DNS error (domain: linux.intel.com, ip: 192.55.52.151, mailfrom: kirill.shutemov@linux.intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673648431; x=1705184431; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kYRee6SEDeSRw1BGWOZXLgclS1shhcx9XIZ3iu9LATE=; b=Kvgb6QMOV+MsjmVrpCF0Idvt3x8Q+2ZIgVJuC+IqJruXlDi5jB0jfXEH T/vbytQmK0Sio8ASp8MFe1XMTa2ysLf9jS+RY3GKSKUkDy/176hkUVZo6 rlJOLZmo9lvee1wFAbWd1M2a2A5W8L4geF9GWd3TuWHMlMPt3QdTRklT9 RcxqSngVd6trA8qicsqg4h3RiXrX2ypySQE+2PpH9vz0F3fJQrgUP7Efn ODX3czYvOUEILIdG2+Yr5oWn56yPuYw28tOqTir5rdVM27w8YDtYer8cM siiATdg1QeBXtNI2Keh28rZBL3n7Y9o8W5i1l9aLekeogMqIrWbsjFfH1 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10589"; a="304495073" X-IronPort-AV: E=Sophos;i="5.97,215,1669104000"; d="scan'208";a="304495073" 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 In-Reply-To: <20230113212926.2904735-1-dionnaglaze@google.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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