Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2239943pxb; Wed, 30 Mar 2022 20:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxANInb8dDYgpKFy6QA/WJB4JIFBBktYke3JEIERSB6APSXnTdA9m2KdSUdvWjhTVxkQ0Mh X-Received: by 2002:a17:902:e812:b0:154:19ec:538b with SMTP id u18-20020a170902e81200b0015419ec538bmr3196771plg.102.1648696992242; Wed, 30 Mar 2022 20:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648696992; cv=none; d=google.com; s=arc-20160816; b=JroIjPQ1BtznfL3e9ao4ak2J7ZP5iDDIl9yqNdk6a4aAjINh5z0BPfOD8tXBBXvYKO yugleSRlBTSt+dBKiHZrPKDRR4WUMMMrok4QDKyszJVbLRDyeViyatRburoUxv55kn5F HfsbvU9BPKs2oa396BIQ0ZbWsxJkZDckdMnBepkns7hl8zwov/D6HmeOuYINlemW01xg yvAgyOuGZWMFbhx5f5vQGhPUJUIPxOgBZKm1chsArKw2LQuGnH6+Ng3LDNsbyLDVnNEq TfPaC0vo7OAC2GxfFsKqQdP/FmLF3k0DHNKRWkVavIECv4MnS61acWpZNW3fC+SeSVoQ JGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=N66uYBiCyqezPD2Pg41nNFdiiU3cf7zZORHbZTGO+s4=; b=Hgwn/Cc0Fx0yTPAXqlOQnScZ/q5v8P+/2zMDzILeS7A9SLNUllTbQsRqDLdhol8YMW kweJWEhL6aDnwtptJKUcUmu+nr5yZofD0OkPziVY4Kn1GYKU1GGFpE6O3FSdWbaMM8in 8lJz7Nf2jhzJx1qzlfD339UPluMs/HSwRrqRiMtACemLN3se6rZp3yWRg/uFcNBIxkD0 kwVrIF9fmKZJMhdGjeySxGSS1y8n8Mb9Nxj/WNtX/27hg/stbMG2Bd4V2BaS6fdAYQqU uLi+dDxV3l9Kf1m/Y7h0jD0WdWUUBkISAWG39G0z839txgZ5Jp9vrfk6u2JGCtIFrzPZ oiiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O9FR3XY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m17-20020a63f611000000b003816043ee67si21838305pgh.92.2022.03.30.20.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=O9FR3XY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CD3A1114FCB; Wed, 30 Mar 2022 19:53:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352216AbiCaBEE (ORCPT + 99 others); Wed, 30 Mar 2022 21:04:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346065AbiCaBEC (ORCPT ); Wed, 30 Mar 2022 21:04:02 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 885E165D31; Wed, 30 Mar 2022 18:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648688536; x=1680224536; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=1dlEDgQKh23w/zXDxJY2KzGHeDnj9hNUwJGYdrUoU24=; b=O9FR3XY9HKZUsnbRXtOpPvfWryXx/4HX5AR2rz1o/xXol8pkRjIEM9pE eHkU4k2PiMCLERjW4shTRiIVMul79BU3DQZS92zs+iBnUe9/IDtzv7h6S 6NogvLY2Fh6C5N+06s6H/Iq18rvotBRWyEhH+BOURjOWeWwisLHevRrYJ rXJRefy1Sd2tiiDv8aVKkQuuX+/UpZlfmSwvLdJglnJtlY62g1YpxUu3h N+CXEH8JP6oxCWKvNW8Ew1yq/J1ysyvhYuM09mNJFP1UF/D0IMl5CQnr+ vWWomJXAIosUuNrZsrmhaBAbgeKG8AZ6sVOtSqotfkI3hpyYYfDfK/kPN g==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="259656694" X-IronPort-AV: E=Sophos;i="5.90,224,1643702400"; d="scan'208";a="259656694" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 18:02:15 -0700 X-IronPort-AV: E=Sophos;i="5.90,224,1643702400"; d="scan'208";a="554867541" Received: from dhathawa-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.53.226]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 18:02:13 -0700 Message-ID: Subject: Re: [RFC PATCH v5 008/104] KVM: TDX: Add a function to initialize TDX module From: Kai Huang To: Sean Christopherson , Isaku Yamahata Cc: Paolo Bonzini , isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jim Mattson , erdemaktas@google.com, Connor Kuehl Date: Thu, 31 Mar 2022 14:02:11 +1300 In-Reply-To: References: <05aecc5a-e8d2-b357-3bf1-3d0cb247c28d@redhat.com> <20220314194513.GD1964605@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > - VMXON on all pCPUs: The TDX module initialization requires to enable VMX > > (VMXON) on all present pCPUs. vmx_hardware_enable() which is called on creating > > guest does it. It naturally fits with the TDX module initialization at creating > > first TD. I wanted to avoid code to enable VMXON on loading the kvm_intel.ko. > > That's a solvable problem, though making it work without exporting hardware_enable_all() > could get messy. Could you elaborate a little bit on how to resolve? -- Thanks, -Kai