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 1B00CC433EF for ; Tue, 17 May 2022 17:45:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 482AB8D0001; Tue, 17 May 2022 13:45:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 40B4E6B0074; Tue, 17 May 2022 13:45:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 286E18D0001; Tue, 17 May 2022 13:45:21 -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 1159F6B0073 for ; Tue, 17 May 2022 13:45:21 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E3F2B33398 for ; Tue, 17 May 2022 17:45:20 +0000 (UTC) X-FDA: 79475961600.26.A8449F8 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 29CD71600BD for ; Tue, 17 May 2022 17:45:03 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3596C61471; Tue, 17 May 2022 17:45:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91C64C34117; Tue, 17 May 2022 17:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1652809518; bh=Wkrtqr3rOaqaCRASAupK7gEG4fgoea9JOZy/ydbtpwM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lbMyTYFNAzvAJn7IBKycNxoYEW2j/SSGDuhFClpvpe2tJR3JK0H45xtb43rFwZVUO IK24yWGmXP+e5qXaBjsNhFUIFPrV4Xw5PR8hJIQCWBceIJDVhe7rc7Op+uK+nEYi7l OuYwpkwYCo1hTv5qVPZBX8Bc4l6WXxS8jFAR04eY= Date: Tue, 17 May 2022 10:45:16 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: Borislav Petkov , Andy Lutomirski , Sean Christopherson , Joerg Roedel , Ard Biesheuvel , 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@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCHv6 02/15] mm: Add support for unaccepted memory Message-Id: <20220517104516.16fb0be5cb28153104b80654@linux-foundation.org> In-Reply-To: <20220517153444.11195-3-kirill.shutemov@linux.intel.com> References: <20220517153444.11195-1-kirill.shutemov@linux.intel.com> <20220517153444.11195-3-kirill.shutemov@linux.intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 29CD71600BD X-Stat-Signature: oyu98mryrt95zbt5ktjw8usqo9mtdban Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=lbMyTYFN; spf=pass (imf08.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1652809503-49593 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 Tue, 17 May 2022 18:34:31 +0300 "Kirill A. Shutemov" wrote: > UEFI Specification version 2.9 introduces the concept of memory > acceptance. Some Virtual Machine platforms, such as Intel TDX or AMD > SEV-SNP, require memory to be accepted before it can be used by the > guest. Accepting happens via a protocol specific to the Virtual Machine > platform. > > ... > > --- a/include/linux/page-flags.h > +++ b/include/linux/page-flags.h > @@ -928,6 +928,14 @@ static inline bool is_page_hwpoison(struct page *page) > #define PG_offline 0x00000100 > #define PG_table 0x00000200 > #define PG_guard 0x00000400 > +#define PG_unaccepted 0x00000800 "For pages that are never mapped to userspace (and aren't PageSlab), page_type may be used." Is that true of these pages?