Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2112190pxj; Sat, 5 Jun 2021 13:15:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDjratCNi4nNvsyrwDIudVUN0eidfDxc6uqjjtgZYEp708lGAjaF+E8B5e9gXBf8MWCe+i X-Received: by 2002:aa7:cfc7:: with SMTP id r7mr8675684edy.13.1622924107827; Sat, 05 Jun 2021 13:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622924107; cv=none; d=google.com; s=arc-20160816; b=pfhArWOPphbIUuAbOxnCASZ7giTtcKlYu3HbwrZrzzzKLpzXnDnkT6cU3Iha1Q2WNd MDyx7buqvwiYCWzrrkETO4jFx1tuKQo6HaTEV9H/6783tbj+3VGLBk8m8amGyLvVieAx h6wQKWASFzs+cr8W4GQW5sslz7lUlPstIscFnwPCA5x6XSH7YxONpuBmtEvGgE2wbDuE fwi32gWOGHAgowBmjqwVMe/hTnnPSLr2+xciR0UziG6Tw0EzHY+1k2ktcXGDnb//p/Bi BCd9Eo6fFcbWUb49exxYALN1+r5z5VWJLkuoq1mbIGy9nTMI8F1yY14RprzyQ0VS3vPt J9vQ== 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=tlaf54Z6nPA4PCg8qfxuo7bdPsfGPi8WRyfq8gVLZNw=; b=l8TOocjT5MMAqPCbtAjldySZiQTSFMcKFdxTG6BfBZotg70ZlFuQaEAhdR+JoY4Ncw ouB2soNz1HExDXUfBg3y7XLch9S1Cg7S77Li90VdFCUFQmOfxdVSgHeOS2gGeen2n4Bh aNIHkdxjsJAAYmN6n53+466C0cphiablebBtEcdDanhcb5nbA/fTruWNLnycalnlEHD6 cu48Xv5B8V7HHv1chBOYExD6B3FBBQaBNUViUO9hRsrr1bDhclQ9aDBphgB3dshotqg9 M3nBLYwJJMQ3WO9QFvBQWFtI+wOsjHGhBr1a3ZYWl3dRdU4TkrP4GC3VkLl4X3sFOaTL 4OXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kGUY90Mc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si9320795eji.591.2021.06.05.13.14.44; Sat, 05 Jun 2021 13:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kGUY90Mc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S230116AbhFEUKr (ORCPT + 99 others); Sat, 5 Jun 2021 16:10:47 -0400 Received: from mail.skyhub.de ([5.9.137.197]:52760 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbhFEUKr (ORCPT ); Sat, 5 Jun 2021 16:10:47 -0400 Received: from zn.tnic (p200300ec2f2a750019e0f27448df8285.dip0.t-ipconnect.de [IPv6:2003:ec:2f2a:7500:19e0:f274:48df:8285]) (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 CA2141EC034B; Sat, 5 Jun 2021 22:08:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1622923737; 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=tlaf54Z6nPA4PCg8qfxuo7bdPsfGPi8WRyfq8gVLZNw=; b=kGUY90Mc7nH3WGYqzWk+Uau34ZMi6g+5vTX1+3mTYjk4FoCM+nk4w2MN+hwZgQJU8OHgHA xl62wiBlVy9R/ONEdZkyIE5r7onaLobTnE2IrQd0H5qbMqlObJzJ8y8R+PPf+pV24sxSJ+ ABQRRYOSzOZDgC87Ud1WArh/R9GiaIs= Date: Sat, 5 Jun 2021 22:08:52 +0200 From: Borislav Petkov To: "Kuppuswamy, Sathyanarayanan" Cc: Tom Lendacky , Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org Subject: Re: [RFC v2-fix-v2 1/1] x86: Introduce generic protected guest abstractionn Message-ID: References: <20210527042356.3983284-2-sathyanarayanan.kuppuswamy@linux.intel.com> <20210601211417.2177598-1-sathyanarayanan.kuppuswamy@linux.intel.com> <1c8938fb-c9e9-af51-5224-70fc869eedea@amd.com> <12bba26f-5605-fabf-53ea-f0bc1bb9db44@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 05, 2021 at 11:12:57AM -0700, Kuppuswamy, Sathyanarayanan wrote: > cc_has() or protected_guest_has() or prot_guest_has() or protected_boot_has() Even if I still think it is not optimal, prot_guest_has() seems to be best what we have because protected_guest_has() together with the flag will become just too long to scan at a quick glance. And if you have to do two tests, you'd have to break the line. > For flag prefix either PR_GUEST_* or CC_* PR_GUEST_* sounds ok to me. The "cc" prefix stuff is nice and short but it doesn't say what it means because it is simply too short. And code readability is very important. I'd say. Still open for better suggestions though. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette