Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1BD9185C for ; Tue, 17 May 2022 17:45:18 +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) Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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?