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 B7D90C433EF for ; Wed, 23 Feb 2022 11:47:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239202AbiBWLrp (ORCPT ); Wed, 23 Feb 2022 06:47:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236216AbiBWLrm (ORCPT ); Wed, 23 Feb 2022 06:47:42 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BDF85FCB for ; Wed, 23 Feb 2022 03:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645616834; x=1677152834; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=a4XrRLzJgCeKX3RMtmk/h3LXQfDWPVmPOqxxh3Pn1c0=; b=DbJALNwmEgLlvUmVmzesRR3H4UI7OINNLCl21QUIbT9IgJULXAv7pMo4 Qo9kPDQaDNJfemayPxEaYz63/m401N4sZX/pvyyEYiYnpSbpO9ZRwRjZ7 gxYOL7b9/6hAsYQ7Lw/a6/kuwZwxQUnYMObw6/RibYPDt4/EdV6zegUSS gsOwki6oTRh8C9oJuAWqey5tRRw2V2rqOzaxMJzrfar74WZkCwC0lzuQX LPZOoZ8MYPYBs9IIE7bJQte7e2NwB4lsa0r8ViyX7rT+5dH0b/Kzs7xPf 6nTT4S4uKXNvR69xJRkya1smMYwiXiQETk2CfdV+tZ6GkgGi+ruqnAGzT w==; X-IronPort-AV: E=McAfee;i="6200,9189,10266"; a="251681026" X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="251681026" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 03:47:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,390,1635231600"; d="scan'208";a="505884390" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 23 Feb 2022 03:47:07 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 8903A142; Wed, 23 Feb 2022 13:47:24 +0200 (EET) Date: Wed, 23 Feb 2022 14:47:24 +0300 From: "Kirill A. Shutemov" To: Tianyu Lan Cc: Borislav Petkov , Wei Liu , tglx@linutronix.de, mingo@redhat.com, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jmattson@google.com, seanjc@google.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Dexuan Cui , Tianyu Lan Subject: Re: [PATCH 1/4] x86/hyperv: Add missing ARCH_HAS_CC_PLATFORM dependency Message-ID: <20220223114724.4luaemfi3tyedlvh@black.fi.intel.com> References: <20220222185740.26228-1-kirill.shutemov@linux.intel.com> <20220222185740.26228-2-kirill.shutemov@linux.intel.com> <4769a3c0-449b-184a-5c61-a0e155f9c5b4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 23, 2022 at 07:02:49PM +0800, Tianyu Lan wrote: > On 2/23/2022 6:56 PM, Borislav Petkov wrote: > > On Wed, Feb 23, 2022 at 06:43:40PM +0800, Tianyu Lan wrote: > > > Hyper-V code check cpuid during runtime and there is no Hyper-V > > > isolation VM option. > > > > So how does "Current Hyper-V Isolation VM requires AMD_MEM_ENCRYPT" work > > exactly? > > > > Please explain in detail and not in piecemeal sentences. > > > The kernel in the image needs to select AMD_MEM_ENCRYPT option > otherwise the kernel can't boot up due to missing SEV support and > sev_es_ghcb_hv_call() always return error. If kernel boots under SEV, doesn't it mean we have 'sme_me_mask' initialized? If it is non zero hv_is_isolation_supported() check in cc_platform_has() has zero effect as it checked after 'sme_me_mask'. I still have no idea what is going on. How SEV related to HyperV isolation? How detection happens? Could you give full picture? -- Kirill A. Shutemov