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 4AE34C433EF for ; Tue, 15 Feb 2022 12:55:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCAE06B0078; Tue, 15 Feb 2022 07:55:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C7AB56B007B; Tue, 15 Feb 2022 07:55:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B68C86B007D; Tue, 15 Feb 2022 07:55:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id A86236B0078 for ; Tue, 15 Feb 2022 07:55:02 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6379F8F841 for ; Tue, 15 Feb 2022 12:55:02 +0000 (UTC) X-FDA: 79145009244.12.3AE31BB Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf23.hostedemail.com (Postfix) with ESMTP id 1355F140005 for ; Tue, 15 Feb 2022 12:54:53 +0000 (UTC) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B93571EC0535; Tue, 15 Feb 2022 13:54:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644929686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=lpJF0DPW1QUFslGQlkPrAV/yjkWVm5bvn5fjtUyMI5I=; b=hPdzK/P8wr/BQRHcNE7GCCG73SydOg0ztOwVWavDyYXP1xHLStzPoPF9L7G1/xyKJb03rd XQccaz/cSgNE76wjLP5r28HUq3WX/Wn3loTq/NL5I5SeP/lnt6u3H+pBlrNdIsElFhr/GB zzZ7ZiihZWxpZpJEaEE33jXMPf+JrV0= Date: Tue, 15 Feb 2022 13:54:48 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v10 21/45] x86/mm: Add support to validate memory when changing C-bit Message-ID: References: <20220209181039.1262882-1-brijesh.singh@amd.com> <20220209181039.1262882-22-brijesh.singh@amd.com> <0242e383-5406-7504-ff3d-cf2e8dfaf8a3@amd.com> <20220215124331.i4vgww733fv5owrx@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220215124331.i4vgww733fv5owrx@box.shutemov.name> Authentication-Results: imf23.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b="hPdzK/P8"; spf=temperror (imf23.hostedemail.com: error in processing during lookup of bp@alien8.de: DNS error) smtp.mailfrom=bp@alien8.de; dmarc=temperror reason="query timed out" header.from=alien8.de (policy=temperror) X-Rspamd-Server: rspam07 X-Rspam-User: X-Rspamd-Queue-Id: 1355F140005 X-Stat-Signature: bhytez9dazhpjs4q94fuppo9wkx3ye9b X-HE-Tag: 1644929693-425691 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, Feb 15, 2022 at 03:43:31PM +0300, Kirill A. Shutemov wrote: > I don't think it works. TDX and SME/SEV has opposite polarity of the mask. > SME/SEV has to clear the mask to share the page. TDX has to set it. > > Making a single global mask only increases confusion. Didn't you read the rest of the thread with Tom's suggestion? I think there's a merit in having a cc_vendor or so which explicitly states what type of HV the kernel runs on... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette