Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp3900170rwi; Wed, 2 Nov 2022 04:39:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ay8jYbRQCmDXPdN+r7yq0Tib+RW455b7Pzqx5/Thpsd1JHEjNlTnJYlUQ0NCOlTbrfN1w X-Received: by 2002:a05:6402:33c5:b0:447:e4a3:c930 with SMTP id a5-20020a05640233c500b00447e4a3c930mr24076041edc.401.1667389150455; Wed, 02 Nov 2022 04:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667389150; cv=none; d=google.com; s=arc-20160816; b=U+2pXwhdzFLPAVJoXxF0GDjVO/1e1BFrwvECWAYotdO51BJvyqXVXeQbpG5WjBqZYW JduOu7Tdo2vfQa1zlPXj/dT24siVCVFEAfoLszly/s1BB6UhOeDeY52axkvz6/Eby0gN /FD3NAWEh/CwCR/+kYjlAqyIGpDw6cTXLW02AKrVr1+UjW8sS/jlMctyHlzYoMjPg45n fD/ZR9FPX3+6e3uVHBy9AbhEDmIhzFe3uiXJXuHC+15Eb0zHISkDmV+1z4Aim6fJUNq8 1g0Rv1btcag3xZNBfybqg436WvJZWe2HodOyk2v2GUKUI7C+RThodgiwPra5y+BVyXFJ eslw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=stsEyPM3yshEwkVJFTjMEf1n3jksEvxwTfKS4NKFQ3M=; b=ODyD5PTj/RIq/qfbb5JsiUUoEj91QUq1cUXyMvn6+SrnncO1YfBym+EefSnS4wlG19 PhQLqYTsz6jaKfbb5sI1ehSTq3MNecKUvUSfO4F+zRPcMZKXEkK8MBgOqc+3iRLWlkc9 iOKpXlwBxECym7iZ074NN7kluCjm6D7vAFcXUNOEw0q8rxyJJlLJtQq49ZNeVO35eN22 Qr2c7zMC6RTI2UJwSPN0W7iCiFE4KZSvO1ogW+J/Owdeh5AvOWtTFwX47MgowHs+Ba6V eM4J4ZN/XtqkvPU7J3DnVgPmSc/4gnlltzoRnJuN7X+HnlAhFVVtp4Fx5DRjUNMxhqXQ FWTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bicSDEWq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fk3-20020a056402398300b00459681caecdsi12374070edb.286.2022.11.02.04.38.39; Wed, 02 Nov 2022 04:39:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=bicSDEWq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbiKBLWj (ORCPT + 99 others); Wed, 2 Nov 2022 07:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbiKBLWe (ORCPT ); Wed, 2 Nov 2022 07:22:34 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F4ED13FA6; Wed, 2 Nov 2022 04:22:28 -0700 (PDT) Received: from zn.tnic (p200300ea9733e741329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e741:329c:23ff:fea6:a903]) (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 D08081EC0567; Wed, 2 Nov 2022 12:22:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1667388146; 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=stsEyPM3yshEwkVJFTjMEf1n3jksEvxwTfKS4NKFQ3M=; b=bicSDEWqpmnYKra+kbGFh+j8MDU2fk8a81eXZBfoDvBd+piFoqJo7Zv/4XE6hgDQX1Kmi9 v7PXwWK8cAJrg2sSoRzHUsSxDumVASpNo323yy/TwAmtZGL7Zojtyj57cLIicAfpzlK84g 53QASmyBfQKtIAUiHL83CfI0vJvHUfk= Date: Wed, 2 Nov 2022 12:22:22 +0100 From: Borislav Petkov To: "Kalra, Ashish" Cc: vbabka@suse.cz, x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@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, dovmurik@linux.ibm.com, tobin@ibm.com, michael.roth@amd.com, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, dgilbert@redhat.com, jarkko@kernel.org, "Kaplan, David" Subject: Re: [PATCH Part2 v6 14/49] crypto: ccp: Handle the legacy TMR allocation when SNP is enabled Message-ID: References: <3a51840f6a80c87b39632dc728dbd9b5dd444cd7.1655761627.git.ashish.kalra@amd.com> <380c9748-1c86-4763-ea18-b884280a3b60@amd.com> <6511c122-d5cc-3f8d-9651-7c2cd67dc5af@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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-crypto@vger.kernel.org On Mon, Oct 31, 2022 at 04:58:38PM -0500, Kalra, Ashish wrote: > if (snp_lookup_rmpentry(pfn, &rmp_level)) { > do_sigbus(regs, error_code, address, VM_FAULT_SIGBUS); > return RMP_PF_RETRY; Does this issue some halfway understandable error message why the process got killed? > Will look at adding our own recovery function for the same, but that will > again mark the pages as poisoned, right ? Well, not poisoned but PG_offlimits or whatever the mm folks agree upon. Semantically, it'll be handled the same way, ofc. > Still waiting for some/more feedback from mm folks on the same. Just send the patch and they'll give it. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette