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 3147C72 for ; Fri, 13 Aug 2021 16:31:51 +0000 (UTC) Received: from zn.tnic (p200300ec2f0a0d00fd43514a4e38f781.dip0.t-ipconnect.de [IPv6:2003:ec:2f0a:d00:fd43:514a:4e38:f781]) (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 4D3041EC01A9; Fri, 13 Aug 2021 18:31:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1628872304; 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=NdcAaQ22ajLR1RVBUmtY/+BY0x+jRUM1hOLQmWgEtUs=; b=PyDgosI4i/QB5H11RsoENB8QrV6viOuQxdZz6jMCz6J5QLBtV8lyslxjQ5R8YQC5/Bst2i l5mSrdzRZcTOoBq0b3dpee2je9Id2FcVSPRpTor4k9w4j5ddcW2LE1l8uHcCSR0KhqE/Vf bPxKuiRZ0l//nG4r1Su9bwSs5SsiPqw= Date: Fri, 13 Aug 2021 18:32:23 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , tony.luck@intel.com, npmccallum@redhat.com, brijesh.ksingh@gmail.com Subject: Re: [PATCH Part2 RFC v4 33/40] KVM: SVM: Add support to handle MSR based Page State Change VMGEXIT Message-ID: References: <20210707183616.5620-1-brijesh.singh@amd.com> <20210707183616.5620-34-brijesh.singh@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 Mon, Jul 19, 2021 at 06:55:54PM +0000, Sean Christopherson wrote: > I've no objection to using PSC for enums and whatnot, and I'll happily > defer to Boris for functions in the core kernel and guest, but for KVM > I'd really like to spell out the name for the two or so main handler > functions. Well, - we abbreviate things in the kernel all the time - this is no exception. We don't name it secure_nested_paging_handle_page_state_change() either. :-) - If you don't know what PSC means, now you do :-P Also, comments above the function names help. - I asked for the shortening because those function names were a mouthful and when you see snp_handle_page_state_change() I wonder, it is "handling", is it "changing" or what is it doing. And the page state change is a thing so the "handle" is important here. Thus the snp_handle_psc() variant. Also, shorter function names make the code more readable. I'm sure you've read firmware code or other OS code before to understand what I mean. Anyway, I felt I should give my arguments why I requested the shortening. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette