Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp135375iob; Tue, 17 May 2022 21:26:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6XNh5GTwnzmJX/3f8grWJALXAbH6lgvqjL59hybjkyZasYqWKzWjHaJ7jGANmnQCnl6JD X-Received: by 2002:a63:1841:0:b0:3f2:543e:6bc1 with SMTP id 1-20020a631841000000b003f2543e6bc1mr14289209pgy.156.1652848002316; Tue, 17 May 2022 21:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652848002; cv=none; d=google.com; s=arc-20160816; b=YgR0Y6rp1MsV7LSPjlx1r7/uPdtVFwgLZmM2hH3vAaTYkEUMABuRZQhC+6HopROVy6 pl8zcje823Q+tqTf+MBMiUkxILHvc9fSdZ2jQLHNrBhO6fOJ+d/DTR6CyLbOdLNdrg+q 7OwWRmKUUpjwAHZkbYFMgENYJ9vlpHir/PsimOuO16BwpYK8j81NceZGycZTSToVkIci AQYFun4O/iAJPRHLr2dezKEGv+KdoxM2iIGZcenyDPjiyKM35xXoU554EDWz6o4qX7Tm tALoLqDfkdr9ou1gmeXL6fU7cJuyZKmZei95N4OQ+4sSWhEJlErJ8JJfG0OWyzNg+tkO eBIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ANJSq0j9awX1dT/qRV1h/EzeVYNDx0wHsQqMoINhoeU=; b=ZmqAnBdeMcz6DTVT3r6S/wGgMgOqR0lZMTofgP3myAWTkozhMMWCKSvpNBqoK9pJlM ueykG/u7vh/HK4LHr7/XN2wZSczYPOaKjyadXwN4si++g5vQ2qnE1pHL68TRB3HNMVvp V2ept98EqQvXJq8Dwh628Fa2ZvQjGaZOeXkzGlCwFsKhzBs+SDRs7/gVavDfl49GvOwo p84w9qLrGwJO0WtGORfFHW0qIUKKTA5rmXEohN3+IgoJ05GluUEk1phRXdnmHHe97xfN 6YhYx+vmQHYWHpnnXwp4ByKIctALnO2xPu5BOVuhtQQk2BNiBXQ0lZPLP23AmPgjPaIM uRQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lbMyTYFN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e1-20020a656bc1000000b003c622eb7a63si1101779pgw.512.2022.05.17.21.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:26:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lbMyTYFN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0EE26AE247; Tue, 17 May 2022 20:50:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351584AbiEQRpZ (ORCPT + 99 others); Tue, 17 May 2022 13:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237818AbiEQRpV (ORCPT ); Tue, 17 May 2022 13:45:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 332CF4EDD4; Tue, 17 May 2022 10:45:21 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id DC11EB81B36; 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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?