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 8D067C4332F for ; Tue, 15 Nov 2022 14:27:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9EA586B0071; Tue, 15 Nov 2022 09:27:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 99B516B0072; Tue, 15 Nov 2022 09:27:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 862A76B0073; Tue, 15 Nov 2022 09:27:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 78F3F6B0071 for ; Tue, 15 Nov 2022 09:27:24 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4D47941019 for ; Tue, 15 Nov 2022 14:27:24 +0000 (UTC) X-FDA: 80135904408.23.A251349 Received: from relay.hostedemail.com (unirelay02 [10.200.18.65]) by imf01.hostedemail.com (Postfix) with ESMTP id 3745440015 for ; Tue, 15 Nov 2022 14:27:22 +0000 (UTC) Received: from relay.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id B14EF120724 for ; Tue, 15 Nov 2022 14:27:21 +0000 (UTC) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 94DC640A17 for ; Tue, 15 Nov 2022 14:27:21 +0000 (UTC) X-FDA: 80135904282.19.23844B6 Received: from mail.skyhub.de (unknown [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP id 1FC818000D for ; Tue, 15 Nov 2022 14:27:12 +0000 (UTC) Received: from zn.tnic (p200300ea9733e7da329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7da: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 865261EC050D; Tue, 15 Nov 2022 15:26:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1668522402; 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=mSkPxqdKIqJjoCwL26RYPkRZ1rkw1woL6hZqVtjIER8=; b=Rk6ExyGQg6KpnHG67DqmVpaDPDRg4H6/QXSTwRysN4jwjMHW0j1f8H90Ud4rRe4XVUHICo KAl9r8Ns4EWBwJHHqrnr6BtRxTCdWwd8AKcARDRslAmMG4qgyJHZS2ZYypcBGzWYw8RQ28 88jMHnryUdQFUtdIEzmJ8MUzujt8q8k= Date: Tue, 15 Nov 2022 15:26:38 +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: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668522442; h=from:from:sender: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:dkim-signature; bh=mSkPxqdKIqJjoCwL26RYPkRZ1rkw1woL6hZqVtjIER8=; b=Cy1tfK65vbYamT2I4vlGDwgar3OctIPnKBKVu/JFNDT0Idtz54WjaKOIWDiuLdQVNBQO7P d1b0JRaEoIJ194ebWIua+3zd7hbzCepq2lgrHbkFxx0FkW2bTfBnu3RIeblJHGSUmyN10o Tsv5iQPbIKbxB9XJLmpQLm/r/3tHS+c= ARC-Authentication-Results: i=1; imf01.hostedemail.com; none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668522442; a=rsa-sha256; cv=none; b=rZtWAe2WI3O8c1EjsDHVBegsr6sA4moygbQPEW8QLruC5pN627Y/DNzC9G4c3nKxsfmk1G pGwVNQqmyMQuRF9pFwJJO43PhEUOgQddzyqI6X2ga/K2ZSVgYl43ORZNaFlDzWv0fj7Bf8 5iNq7f0333uf9hF3SAU8X+AWxqBggr4= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 3745440015 X-Rspam-User: X-HE-Tag-Orig: 1668522432-507992 Authentication-Results: imf01.hostedemail.com; none X-Stat-Signature: ya5xwndow1a89r15hqqnhyg7jhq39hkm X-HE-Tag: 1668522442-442826 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 Mon, Nov 14, 2022 at 05:36:29PM -0600, Kalra, Ashish wrote: > But there is still added complexity of handling hugepages as part of > reclamation failures (both HugeTLB and transparent hugepages) and that Why? You want to offline pfns of 4K pages. What hugepages? > means calling more static functions in mm/memory_failure.c > > There is probably a more appropriate handler in mm/memory-failure.c: > > soft_offline_page() - this will mark the page as HWPoisoned and also has > handling for hugepages. And we can avoid adding a new page flag too. So if some other code wants to dump the amount of all hwpoisoned pages, it'll dump those too. Don't you see what is wrong with this picture? And btw, reusing the hwpoison flag PG_offlimits = PG_hwpoison like previously suggested doesn't help here either. IOW, I really don't like this lumping of semantics together. ;-\ -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette