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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28F74C07E9B for ; Mon, 19 Jul 2021 13:11:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE60A60FF4 for ; Mon, 19 Jul 2021 13:11:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE60A60FF4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 515C78D00F5; Mon, 19 Jul 2021 09:11:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4EC268D00EC; Mon, 19 Jul 2021 09:11:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 368508D00F5; Mon, 19 Jul 2021 09:11:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id 0B9428D00EC for ; Mon, 19 Jul 2021 09:11:04 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A4BD71838E52A for ; Mon, 19 Jul 2021 13:11:02 +0000 (UTC) X-FDA: 78379372764.10.05AD682 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id 3876E7001944 for ; Mon, 19 Jul 2021 13:11:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ke5E2r71K5re74O8KD3NV6mcHn9J3BbG/GsMoE2tFNo=; b=vNRyorIWQt8Tm2eJNTedXLDqDs 8HAGRbpf7uyqD9miJT/RM/AdmydXZFqLNVBA3J6euBwAtf7ieN8u3HFC+OSvQc3Pu7m6x6dGLL9MA UsvotpTW63iz7obRRKfta8lVbu2qjvFGkH21pjiKGEiZP4dXOgLiFybi3F1P4YomuWEx6CTlsk6sz z+Ih/0qeawZL815B/sdJg4L+loEyhRmUQsLQPlmazkLI3H8jdW7MCZd6zqijjr9mTSBPgPCBpLu9I qBdV3eI8I9ZQcUCAZElB5QwG9FwWYsW/3Cl3GrqrqO9jK+ZaMI28gja4REF+RxKXjUh42UcTDXOx7 Y8pl/zJQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5Szn-006s7P-K7; Mon, 19 Jul 2021 13:08:14 +0000 Date: Mon, 19 Jul 2021 14:07:43 +0100 From: Matthew Wilcox To: Joerg Roedel Cc: David Rientjes , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Vlastimil Babka , "Kirill A. Shutemov" , Andi Kleen , Brijesh Singh , Tom Lendacky , Jon Grimm , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , "Kaplan, David" , Varad Gautam , Dario Faggioli , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev Subject: Re: Runtime Memory Validation in Intel-TDX and AMD-SNP Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3876E7001944 X-Stat-Signature: ziz7phm7g8wkuxzsrnbo5wkm6zw9h118 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=vNRyorIW; spf=none (imf27.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1626700262-495824 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 Mon, Jul 19, 2021 at 02:58:22PM +0200, Joerg Roedel wrote: > I'd like to get some movement again into the discussion around how to > implement runtime memory validation for confidential guests and wrote up > some thoughts on it. > Below are the results in form of a proposal I put together. Please let > me know your thoughts on it and whether it fits everyones requirements. I think this proposal skips (intentionally?) something that s390 already implemented: the secure guest deliberately allowing the hypervisor to access certain pages for a period and then re-validating them. I hope x86 can use the same interface as s390 for this, or if not, the interface can be modified to be usable by all architectures. See commit f28d43636d6f ("mm/gup/writeback: add callbacks for inaccessible pages").