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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95F67C43217 for ; Tue, 7 Dec 2021 09:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234320AbhLGJug (ORCPT ); Tue, 7 Dec 2021 04:50:36 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38582 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234223AbhLGJuf (ORCPT ); Tue, 7 Dec 2021 04:50:35 -0500 Received: from zn.tnic (dslb-088-067-202-008.088.067.pools.vodafone-ip.de [88.67.202.8]) (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 0C8C41EC0512; Tue, 7 Dec 2021 10:47:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1638870420; 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=wRE0vGa0fNJQQgdPcGxdfvPKi0PLqxdR04fFjmBBpUY=; b=cz2oWQLH06+YeLVYP0B8dsSse8TDIxm+kRm8PQ7oDI9AlFqc0hCQRm0Ehi7YBpIgPTgDOo +0LEN/izPXYL7h+K7KjaOZiGmCWrIHSEPBrg2CJ65pOFaaUOI+tcqVWYIIBpNmrCbCAy41 wDvwWgGs9ZnpiaHLkYCu2f36mGkRLO4= Date: Tue, 7 Dec 2021 10:47:01 +0100 From: Borislav Petkov To: Tianyu Lan Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, davem@davemloft.net, kuba@kernel.org, jejb@linux.ibm.com, martin.petersen@oracle.com, arnd@arndb.de, hch@infradead.org, m.szyprowski@samsung.com, robin.murphy@arm.com, Tianyu.Lan@microsoft.com, thomas.lendacky@amd.com, michael.h.kelley@microsoft.com, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, vkuznets@redhat.com, brijesh.singh@amd.com, konrad.wilk@oracle.com, hch@lst.de, joro@8bytes.org, parri.andrea@gmail.com, dave.hansen@intel.com Subject: Re: [PATCH V6 2/5] x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has() Message-ID: References: <20211207075602.2452-1-ltykernel@gmail.com> <20211207075602.2452-3-ltykernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211207075602.2452-3-ltykernel@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 07, 2021 at 02:55:58AM -0500, Tianyu Lan wrote: > From: Tianyu Lan > > Hyper-V provides Isolation VM which has memory encrypt support. Add > hyperv_cc_platform_has() and return true for check of GUEST_MEM_ENCRYPT > attribute. You need to refresh on how to write commit messages - never say what the patch is doing - that's visible in the diff itself. Rather, you should talk about *why* it is doing what it is doing. > bool cc_platform_has(enum cc_attr attr) > { > + if (hv_is_isolation_supported()) > + return hyperv_cc_platform_has(attr); Is there any reason for the hv_is_.. check to come before... > + > if (sme_me_mask) > return amd_cc_platform_has(attr); ... the sme_me_mask check? What's in sme_me_mask on hyperv? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette