Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1015249rwb; Fri, 28 Jul 2023 03:31:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlHY+APnvr9dOP7OXSL3/qxU9tQvCUzA6d+MtVDv9+qY5mX2WVDTs998F7pgmUK1T7Ujj18T X-Received: by 2002:a05:6a00:3a21:b0:67d:b924:54ca with SMTP id fj33-20020a056a003a2100b0067db92454camr1279363pfb.34.1690540274077; Fri, 28 Jul 2023 03:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690540274; cv=none; d=google.com; s=arc-20160816; b=Y5DAb3Z8x3IWYP16elAkFSTufgrs5vXh1P8pcJztP6R5Dusz+pqFpehMQDBNS1Rjk3 TjP5UR/LO07yz0C34Fgby4Uh7X/XTGmwUXA/rAz45YXChZMrWK01l35FVJ1BFDAIKiML s+crfbiWMorqUi+aPBnXb+8UQRGQsmBgvRU8MimZZ66TYXsqffMLfeLatLjreafBOn54 aTVwK/jQfBBxDzPZgkC9umNLkoAjjdIGsnV7w1re4vlnbmZcanzdRtDy86UYzo9RsSsT NGzHkOtUPRsVZtwJUTr4kEHlnXR1DF3/la/ZBH+XmKn+iWxSCLFIzI3KaEdL2duKEh77 cHXQ== 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=Ki+mdspMMzVI6BZl620xTg/8s40e+vzAj90XXcit17Q=; fh=4cfoCDM5g9VvfWMuMESLBDI8FTDo1+NfoVfLyV1wkEs=; b=CbdcUj0kquYJw5NX6y4qs4oWne0zo+r4P2yLVBLuuwk/aQ9DqzvMRQi4rIVl5mNqqe Yk1eGpwu9zrIA3RtNGiB+jUnZtiw8kLs3O6bp3kx8QsIvYb37z8OJ57gLmAk8Biq4pcv yn7RJoDzQIFFCTiqLXIwydvHMgQlMF6ApwJlSc6g2jwwFVfhQQJn588HH2UtzF4vDayo UDYPwogahc4BZmgNNuFzwPENlTYHwFPF9E9mTlDzcWGDgjAM9sONcvw4d6+llVTz+upy npHuR6gy9RiIvADzPfu9SupqrMbhwC+paI8Z+yZIrytjilRdmHGDIF0dBwQlFQZ1X3/u uYrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aHJLItSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s38-20020a056a0017a600b0065b4e2b52c5si3007386pfg.196.2023.07.28.03.31.00; Fri, 28 Jul 2023 03:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aHJLItSn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235374AbjG1JMr (ORCPT + 99 others); Fri, 28 Jul 2023 05:12:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235272AbjG1JMX (ORCPT ); Fri, 28 Jul 2023 05:12:23 -0400 Received: from mgamail.intel.com (unknown [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEBAA2736; Fri, 28 Jul 2023 02:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690535402; x=1722071402; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Rqk2T5QIInIjCc2H4aYC47SdXPaqVKq+CdMnqIdBEvM=; b=aHJLItSn07CMGRfNKE9HLBC4GgOBnPn0V0tXwqWztn6VUQFMqz2ol2p8 45X5JdtXIVW7GcZnI0ZJ4+dK0Yk3gbMSg3JX2nCeh+tFPSkPNvzIjzLho z1IwxcZnWsP2gVrP/KZ4rQopGFej6ftvhbX5J0u2juib6eBd7nozKqwtr ovRk0po9IDkpAExySD5cZJHme9sfR8Sl6SgBhC5FPU9tAk0FCmZ4LzE/A EBKkRg9wVj6FFx4mT1QHOXDKzOJfc1HDLGXjB+U8Om3jG7G5xcs/v2cAN C23tRqBbfHuxTRajATQN3GaOzhO4lsRPGsCgoz5InLFsqmKk1pO4/k1q/ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="353454147" X-IronPort-AV: E=Sophos;i="6.01,237,1684825200"; d="scan'208";a="353454147" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2023 02:09:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10784"; a="851120209" X-IronPort-AV: E=Sophos;i="6.01,237,1684825200"; d="scan'208";a="851120209" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by orsmga004.jf.intel.com with ESMTP; 28 Jul 2023 02:09:56 -0700 Date: Fri, 28 Jul 2023 17:08:03 +0800 From: Xu Yilun To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Andrew Cooper , Kai Huang , Chao Gao Subject: Re: [PATCH v4 10/19] x86/virt: KVM: Move VMXOFF helpers into KVM VMX Message-ID: References: <20230721201859.2307736-1-seanjc@google.com> <20230721201859.2307736-11-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721201859.2307736-11-seanjc@google.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On 2023-07-21 at 13:18:50 -0700, Sean Christopherson wrote: > Now that VMX is disabled in emergencies via the virt callbacks, move the > VMXOFF helpers into KVM, the only remaining user. Not sure if it's too early to mention. Intel TDX Connect could be a future user, it is the TDX extension for device security. TDX uses SEAMCALL to interact with TDX Module, and SEAMCALL execution requires VMXON. This is also true for TDX Connect. But TDX Connect covers more controls out of KVM scope, like PCI IDE, SPDM, IOMMU. IOW, other driver modules may use SEAMCALLs and in turn use VMXON/OFF for TDX Connect. I'm wondering if then we should again move VMXON/OFF helpers back to virtext.h Or, could we just keep vmxoff unchanged now? Thanks, Yilun