Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp2026432rdb; Sun, 21 Jan 2024 04:30:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpe8SnR1ho5aZxeB4tZC3prxA7iE68ApVb0tIJcUcffpNXgKqWEkgtN/Y/pmz2cM9kjcWJ X-Received: by 2002:a05:600c:3847:b0:40e:66cf:81a9 with SMTP id s7-20020a05600c384700b0040e66cf81a9mr1811533wmr.111.1705840214151; Sun, 21 Jan 2024 04:30:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705840214; cv=pass; d=google.com; s=arc-20160816; b=QtmyBSbVYDqH7hW2xMAAmyY2yao8kv2R4oTDWgje0tUDdvkkg/SKSs5f1k8z6OiFXI DrKyi2gjpBBB45VyZoWLEOSj02hPP7TzM6+Lafq9+Sfd/lxgxjosUdoEKsf9iRQ55Yu0 xCB/2j6ToML9M+b58eNLVD1FiEOkTQ5p8urJT6cDxkT3pZV/0cGwRxnEGH3GGewlZMIg ta2FZo7D0u/WOnnix36PIYZqDlsqeDoJLQulalmeuUFxXULoC6yXDDx93Hy35kz73UXJ S1kPUdfEzaV6gEMuC55vvvLhR4JDjrYwfp+UqMM/newn+1Tvd0WDwRZdWeo3jRDQdCrC z/9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lJOxa1NCDjYe68V4/rORBTiQrTtE7y7uT1l5Klq2ts0=; fh=PAJLcGNsgpyT0FrcvY89yVOVQNGKU/6iE6GpJZktfr8=; b=rQPEcvRFIiMBVeplErS+hMaAAP8RqqYbYdLv8cXgOeVr6AWfLiwXBtzIDCi+RZsQPP q3CdOS0wsViUVbVoqDaeIxugtBC0lomzW6xOfAQ/RUTYtJ6UQJ0apktgfUyGdQ+47/Sv b5LsKIedJ5yad3k02xiA8N0F8Z4Dvk6TB1l8wL4w+wRSG/ufQaxOf228oxh48pYLqoBt Z9ya6rHjnUEWJ88Y8Ey5lqLUMJYT0+sb1aXAmd56P1DCglgTOEO0PsxafRh7acrNAQLg lPQ4AEVUWeo55wiJexYbTV/mt7QPcYcspXv1vseFjUeItM4SfuoYincckcFqZ+ZDZpWH SgGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=HoXqq8RL; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-crypto+bounces-1505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id en7-20020a056402528700b005581b9ede20si10485189edb.44.2024.01.21.04.30.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 04:30:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=HoXqq8RL; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-crypto+bounces-1505-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DC0011F21FA0 for ; Sun, 21 Jan 2024 12:30:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0FBC36B0F; Sun, 21 Jan 2024 12:30:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="HoXqq8RL" X-Original-To: linux-crypto@vger.kernel.org Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 EE29E1EB37; Sun, 21 Jan 2024 12:30:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705840208; cv=none; b=Q9gCkq7OkU7mww2553BRrq6MCmgEaoMZLkt7lB0e1SxGlVKMcF0EgV5aBhNzBTG+RjCHH/3hbjYJ7OU5J7d+WZBe+sgXylyNL5gZTFsQzjAHmoDPS1z/ZrUM2BI71VnXEdn/Hv2euhG37FRIygiUKBAkUb9A5Ty4H/PCDhlkYXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705840208; c=relaxed/simple; bh=ztkX7DRtmPZ9xFv88EQYh8GKYpQQYTtlDcny+ZecGMM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qT8grWN6l6R7Yot+GNqqzv7GBTazY5MQy4yKzr6g3NRMphwUy98VVnyUdVVdrLVw+Dy2HUMEeU3MaCYW2YEtVd2zVvCr+NgOxPT7lHObpTQwFePhKzRWSNMkVmg3V0E0UQzH3S4BFUdIBrYI/TmHFGfWgCuuTFuvD9RgBjlaqkc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=HoXqq8RL; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 258FA40E01B2; Sun, 21 Jan 2024 12:30:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ajngsX_v5-la; Sun, 21 Jan 2024 12:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1705840201; bh=lJOxa1NCDjYe68V4/rORBTiQrTtE7y7uT1l5Klq2ts0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HoXqq8RLCkrmpO1QjbLu1QiCwSLvezQ5ioigMzvYr66LSize0qo3TpiqiL3Yn2Nmh HC6JckuX70qENvSuyYR8ynjc+jc3rdWJUaCamJgQMsw427FJCNEKl3FualnU2PvdVH yffKTLyLwQQh9694fcNi3HYSkuUUB0+QKxYAG1fToyzyAZZypqqvja562aJYk5HIu4 Pc79qQYcWZkrNeyEsSyMfj9v6Tz6w71IvHPaao5IBMVRqyuf7M/YadI910GrXWgvaf 6KS6s2sxb98gs638wTLulRLGl6WxkJZDEVSlJT2Rwl84d+0EG18EBWShkc00G+NRr/ ZBbnsB6y2TpRZMWVPTOTcccrHBENDFcQXegSCBsijmZ5QdO0krPWcARIBe1I/4Ecyk UxFz7hnMgjqvlImjR4pDQgRplQ7gREMljXGRcMmzcdIL2Dc9+MeIPoAG6jdzrbzeis zqtdBGy1inZ8R9eLSmVTczviJ1TqlYF84k4uwFhnknnmVT1srVdxPjf8z2ZDGrb6Yw oWLDfB0TUkNXFMr/uqyWAx69H+1gKxH1SlAohCZkG0WG1qP18s1rev/U/HW5qLV9RC YNoGWwIkXh3xKJxGtSxtzXMZmq5oxCn2V9bvdgJMBqMXtC8pkCwJJJp9X6klrUC8AX hBNfZ6xIXOm+lBiCqr0HWBy0= Received: from zn.tnic (pd953099d.dip0.t-ipconnect.de [217.83.9.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5303540E016C; Sun, 21 Jan 2024 12:29:25 +0000 (UTC) Date: Sun, 21 Jan 2024 13:29:20 +0100 From: Borislav Petkov To: Michael Roth Cc: x86@kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, tobin@ibm.com, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, jarkko@kernel.org, ashish.kalra@amd.com, nikunj.dadhania@amd.com, pankaj.gupta@amd.com, "liam.merwick@oracle.com Brijesh Singh" Subject: Re: [PATCH v1 24/26] crypto: ccp: Add the SNP_PLATFORM_STATUS command Message-ID: <20240121122903.GNZa0OD21W0UxLmOAm@fat_crate.local> References: <20231230161954.569267-1-michael.roth@amd.com> <20231230161954.569267-25-michael.roth@amd.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231230161954.569267-25-michael.roth@amd.com> On Sat, Dec 30, 2023 at 10:19:52AM -0600, Michael Roth wrote: > + /* Change the page state before accessing it */ > + if (snp_reclaim_pages(__pa(data), 1, true)) { > + snp_leak_pages(__pa(data) >> PAGE_SHIFT, 1); > + return -EFAULT; > + } This looks weird and it doesn't explain why this needs to happen. SNP_PLATFORM_STATUS text doesn't explain either. So, what's up? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette