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 75E79C43461 for ; Fri, 16 Apr 2021 16:46:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0ADDB61042 for ; Fri, 16 Apr 2021 16:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0ADDB61042 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 88F466B0071; Fri, 16 Apr 2021 12:46:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 866E96B0072; Fri, 16 Apr 2021 12:46:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7077F6B0074; Fri, 16 Apr 2021 12:46:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0253.hostedemail.com [216.40.44.253]) by kanga.kvack.org (Postfix) with ESMTP id 50E8E6B0071 for ; Fri, 16 Apr 2021 12:46:30 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F132018244EDE for ; Fri, 16 Apr 2021 16:46:29 +0000 (UTC) X-FDA: 78038808498.01.D9CC162 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id E3BE940002CF for ; Fri, 16 Apr 2021 16:46:26 +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=BxSXtPsAmxUFlWPdD98J/97elcMLJtVAfMQiYC0wrec=; b=nS9gVgOCNBVzeS3pqL5W4rnkMr aJPl02WUaeZA81Upi/OJP409n6KoLw5d8mcWR1zbyR3sRlv3hWbP5IATF7arA4qjeE2dYjUz7jtk2 hkT9rqZA5KXsM3f1MBCDH6wckYcadrBJOeTcSh8a5k8zp1u40wZMEEl9OGDBA8wtTBBeKEz4IcJTO IDPmCDeLvJRDctFn+NglDOY+rpPbvZODAksJGozKVR0R1K36mHGFor4GcQtHcTvdAmP0oR8h7+DxW aNZcG/TM1aoyO6aSzAv0HEmqXT426M26Ii64sQNZv6AB8/hqbY68PvJKE2sTrzV7PK7iDrulkxgsg WC+0UejQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lXRbW-00ACjP-BC; Fri, 16 Apr 2021 16:46:04 +0000 Date: Fri, 16 Apr 2021 17:46:02 +0100 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Dave Hansen , Andy Lutomirski , Peter Zijlstra , Sean Christopherson , Jim Mattson , David Rientjes , "Edgecombe, Rick P" , "Kleen, Andi" , "Yamahata, Isaku" , Erdem Aktas , Steve Rutherford , Peter Gonda , David Hildenbrand , x86@kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFCv2 00/13] TDX and guest memory unmapping Message-ID: <20210416164602.GN2531743@casper.infradead.org> References: <20210416154106.23721-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210416154106.23721-1-kirill.shutemov@linux.intel.com> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E3BE940002CF X-Stat-Signature: 9k1jhs7nepawuawmtun5bg8grsz6yz99 Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618591586-749596 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 Fri, Apr 16, 2021 at 06:40:53PM +0300, Kirill A. Shutemov wrote: > TDX integrity check failures may lead to system shutdown host kernel must > not allow any writes to TD-private memory. This requirment clashes with > KVM design: KVM expects the guest memory to be mapped into host userspace > (e.g. QEMU). > > This patchset aims to start discussion on how we can approach the issue. > > The core of the change is in the last patch. Please see more detailed > description of the issue and proposoal of the solution there. This seems to have some parallels with s390's arch_make_page_accessible(). Is there any chance to combine the two, so we don't end up with duplicated hooks all over the MM for this kind of thing? https://patchwork.kernel.org/project/kvm/cover/20200214222658.12946-1-borntraeger@de.ibm.com/ and recent THP/Folio-related discussion: https://lore.kernel.org/linux-mm/20210409194059.GW2531743@casper.infradead.org/