Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp800186qtx; Mon, 31 Oct 2022 14:16:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6giDC2fcEPJm6qW/ravJGxapcMLNXPQ0vtLx6W6WMDjqN96FMVqBwYOhifIGEkcASgyFq+ X-Received: by 2002:a63:1521:0:b0:43c:9566:7a6a with SMTP id v33-20020a631521000000b0043c95667a6amr14397222pgl.339.1667251000605; Mon, 31 Oct 2022 14:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667251000; cv=none; d=google.com; s=arc-20160816; b=Mp2soe9ZlZ5lgXRYI2WZJmZKAIQ70AzzMFAFdz7zYJ3Vtwewt2CE++dea9N4DSn1C3 5VyXRUKzG0yi8Tl6+dBvWS/UHfixPR1EsPxI/xzYxI3jmyqZpfyDwA+grfb/FneMT2UR cRabEAXoHTHouBXz3pxr6GDsnhj4HMPCiPqtQk7bxAxQ83DSQFX3aD2f9HLOQlUgDv10 bZkbBYDoT9ATbQ2om2njISCJaH44y0QQYywS8iB9qhc1nv4JB91U2+P5pVnZ0YeMRFPq Z5CjmjFE57OQAsyGQP1DyhlI2rFUF4W3Uwvwub2YDW2HHxwLFHurPgmy43dIReXC89is fugg== 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=DgU+XgOhdBAORYCQvXhnNLYByJbTFJfkVBopLrqf9iI=; b=IfnqK7KUjnPkEWJXYSLSW4ZWL1GMIZu+xOCHqqD4BVM57Ax+gUX55azzHvEGKQguBt Z4aRjNdE71uS02RRdYuYM6aC4swyg9CgA0URgPkugJWPReb+oVWC1CtzFwuAoZ0xRIYV 82dhsAyZsdascbzVXMhd4LaeffBsqPQNnP5PnGppuGV4sx1O6bNHsEJorN7vCbpSb7i+ emahvW4ITVt7jtSq3+eQhTKCjx2iYRSgu4nhTLcif3ye324vACmUjSmyStwDI5Us/nYg R0DfYHxDPNSBD6WGkJLhIpRxImhZacgm2Dnq7Qx3dsB7oD88BpsLaEY0bUAQ+ZuwOjW4 DMsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UBchbjp0; 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 n4-20020a170903110400b001867db1d29csi10598519plh.60.2022.10.31.14.16.20; Mon, 31 Oct 2022 14:16:40 -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=UBchbjp0; 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 S230267AbiJaVPr (ORCPT + 99 others); Mon, 31 Oct 2022 17:15:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbiJaVPr (ORCPT ); Mon, 31 Oct 2022 17:15:47 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E6DBF02; Mon, 31 Oct 2022 14:15:46 -0700 (PDT) Received: from zn.tnic (p200300ea9733e7f5329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7f5: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 DFF1F1EC0430; Mon, 31 Oct 2022 22:15:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1667250944; 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=DgU+XgOhdBAORYCQvXhnNLYByJbTFJfkVBopLrqf9iI=; b=UBchbjp0cXfAYDiw9MvIMfTMohAQvNHSEOqD0qqH300draA9eAuqTP3tB0n+GzdafOpSSF Wn3qr3VbpZy/af3JUemdiT8IjltBlnFK4Jwa7BMsG/jgkXRWcGI5AozcGEKCyqA4ThKP5g w59EfXwJZcbCayMtLfvJao65kEkVlNU= Date: Mon, 31 Oct 2022 22:15:41 +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 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: <6511c122-d5cc-3f8d-9651-7c2cd67dc5af@amd.com> 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 03:10:16PM -0500, Kalra, Ashish wrote: > Just to add here, writing to any of these pages from the Host > will trigger a RMP #PF which will cause the RMP page fault handler > to send a SIGBUS to the current process, as this page is not owned > by Host. And kill the host process? So this is another "policy" which sounds iffy. If we kill the process, we should at least say why. Are we doing that currently? > So calling memory_failure() is proactively doing the same, marking the > page as poisoned and probably also killing the current process. But the page is not suffering a memory failure - it cannot be reclaimed for whatever reason. Btw, how can that reclaim failure ever happen? Any real scenarios? Anyway, memory failure just happens to fit what you wanna do but you can't just reuse that - that's hacky. What is the problem with writing your own function which does that? Also, btw, please do not top-post. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette