From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) (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 56CC833C6 for ; Thu, 11 Aug 2022 14:28:03 +0000 (UTC) Received: from zn.tnic (p200300ea971b9854329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:9854: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 0E4B81EC04E4; Thu, 11 Aug 2022 16:27:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1660228077; 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=Q1UCXPGlK9ZEkriLpD7+N2yKPvd0z3A6a2z6f1v9+Bo=; b=Nldl+5PixfhbhO4eEPFiuay5moOBlgPYXxT4tquajDJ80buKA8ustrVZnGOugYUz2yeVIa 6hINhKTqWDWfKf7cMCGHg8eU0u16CCkbqDK9T/1waCQXi5SL4XMaoPFkK4d4arYeiryh9w wuA8CCtq1Dbz2MYTUDemutSSXgNdqik= Date: Thu, 11 Aug 2022 16:27:53 +0200 From: Borislav Petkov To: "Kalra, Ashish" Cc: "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" , "Lendacky, Thomas" , "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" , "Roth, Michael" , "vbabka@suse.cz" , "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 09/49] x86/fault: Add support to handle the RMP fault for user address Message-ID: References: <0ecb0a4781be933fcadeb56a85070818ef3566e7.1655761627.git.ashish.kalra@amd.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Wed, Aug 10, 2022 at 10:00:57PM +0000, Kalra, Ashish wrote: > This is more like a sanity check and returning 1 will cause the fault > handler to return and ignore the fault for current #PF case. If the > page got unmapped, the fault will not happen again and there will be > no retry, so the fault in this case is being ignored. I know what will happen. I'm asking you to make this explicit in the code because this separate define documents the situation. One more return type != 0 won't hurt. > Ok, so you are suggesting that we remove this check and simply keep > this function wrapping around __split_huge_pmd(). This becomes a > generic utility function. Yes, it is in generic code so it better be generic function. That's why I'm questioning the vendor-specific check there. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette