From patchwork Wed May 24 06:16:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Gao X-Patchwork-Id: 98315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2635097vqo; Tue, 23 May 2023 23:32:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5D96PUHPbbsrBxCEiZaFfnImuVL2hMI8d5zRi7X/yoM6LQH+oFujjWloC6rRSQ6GO4zE7j X-Received: by 2002:a17:903:1103:b0:1ac:6d4c:c26a with SMTP id n3-20020a170903110300b001ac6d4cc26amr21224890plh.14.1684909969654; Tue, 23 May 2023 23:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684909969; cv=none; d=google.com; s=arc-20160816; b=OENDNeE+2fZ2dd3WpxOCUwJSCMwRcenjO+Nt8DC9klMqEGn9X+n8ax5UrcVOASwm4b UpX0yGMhQEAbQX7txRyukn+OI8+cJVxgp8+ZlsM2avg+C6jztPzBEPOz+AJbi2A33nHj GVXqhVtgsOSeN5ITzeHo0YqnFjpeQ3qgeEckUReVQIX5a0ZUGkZJrdDZBBve/UC9vymG P8kbMg7SOp49aPaf+3okQqM7X7k+Btbp9wGBvAwjI6vlL7sUeGfzv2T5G8Nj3x1FHTkD +CxFIgKJQ0XVBhW+0awA1ySRi3DCEgnZrnzketA75hUMw5RnySS3pfBQcPa+hdbjC/w6 0mgw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2TnoHVDAQSoAT08BR2j6xi/x8ZdshzsyYG/sjWY3DUU=; b=iDagDtdAq7weaRRDtnpl0zW9pjwnsV2NnZD9MI9CRJXsCSWFT0J9TvIpf75T5RneQg 5fp537H61AYK9+3+8xE1ehcA+39PGoYwDVZ/Uk8hY+/V+maxvjSeRX77woTsa3zsKs5S xMq9O71Hau0lEo+jo2zVuabCv4w026E5fvvM334rWZlU1MN3Xss1QAIuxbKWBlCdN76h mJOisKfvRPoG19gHiVNHwqYtH7ETzPU4z0PBuvz9MI6mQJGnSNtqmaSSPkcUBgafPp7T N8lOO+9lzvQx1D5Dh+fhY4P5Bx5KHgpzeY/hf01Bn0yYS1KgE8u3YkdV76iTv6v3k6To 1Weg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PTtxsesT; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r22-20020a170902be1600b001ab23ced2d2si363922pls.613.2023.05.23.23.32.33; Tue, 23 May 2023 23:32:49 -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=PTtxsesT; 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 S239025AbjEXGRI (ORCPT + 99 others); Wed, 24 May 2023 02:17:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239434AbjEXGRD (ORCPT ); Wed, 24 May 2023 02:17:03 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0BCD184; Tue, 23 May 2023 23:17: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=1684909022; x=1716445022; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7vaTJBMgJbDhDFplct7qOkwK8w6awR4n+tSruHTzGdk=; b=PTtxsesT9hL38AB1F84P7+QNFte/WksGlj1EwlM8VWWuGIFdez++WOwf Aqgn1gk2DjIoLPJdo5cpG27yF+8vzvzs/cBUSc9f4KsYPu8NunqMtUyGH 5gynR2/o6oXgrAel46gJwih8uv57Et8boJHD7z5FdCErFJt1jtLnoOyvu bAXNkkLsE8E5sKTa0DIDsiKX3a1MWLq6X3MFIRR2llhbSvmrgfGl3KU2P KAhtKFu0wMmJNM7jf1h0ERBzV5eibmJOi2IJByD6YOxUiluiTNd1SkijK 5oGuW0g+IdAswixhbUNnEJNIuh9GwGSEqexZ7nmRalm3RKBqim/5qArl3 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="356695083" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="356695083" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 23:17:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10719"; a="704212397" X-IronPort-AV: E=Sophos;i="6.00,188,1681196400"; d="scan'208";a="704212397" Received: from spr.sh.intel.com ([10.239.53.106]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 23:16:57 -0700 From: Chao Gao To: kvm@vger.kernel.org, x86@kernel.org Cc: xiaoyao.li@intel.com, Chao Gao , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] KVM: x86: Correct the name for skipping VMENTER l1d flush Date: Wed, 24 May 2023 14:16:32 +0800 Message-Id: <20230524061634.54141-3-chao.gao@intel.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230524061634.54141-1-chao.gao@intel.com> References: <20230524061634.54141-1-chao.gao@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766756156270394917?= X-GMAIL-MSGID: =?utf-8?q?1766756156270394917?= There is no VMENTER_L1D_FLUSH_NESTED_VM. It should be ARCH_CAP_SKIP_VMENTRY_L1DFLUSH. Signed-off-by: Chao Gao Reviewed-by: Xiaoyao Li --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2408b5f554b7..f7838260c183 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1631,7 +1631,7 @@ static u64 kvm_get_arch_capabilities(void) * If we're doing cache flushes (either "always" or "cond") * we will do one whenever the guest does a vmlaunch/vmresume. * If an outer hypervisor is doing the cache flush for us - * (VMENTER_L1D_FLUSH_NESTED_VM), we can safely pass that + * (ARCH_CAP_SKIP_VMENTRY_L1DFLUSH), we can safely pass that * capability to the guest too, and if EPT is disabled we're not * vulnerable. Overall, only VMENTER_L1D_FLUSH_NEVER will * require a nested hypervisor to do a flush of its own.