Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6005806pxb; Mon, 14 Feb 2022 12:58:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaKzuctkJIThgIW/kaaKNEGp9zIXaVm5TetFYQJC5YL+wujta9Jlgj6l0yxRes/e37gus6 X-Received: by 2002:a17:902:b692:: with SMTP id c18mr723481pls.85.1644872304763; Mon, 14 Feb 2022 12:58:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644872304; cv=none; d=google.com; s=arc-20160816; b=1CN//Qu9rTfFXbVS+o7iX8k5nwrGR+VtRr+YGbDjmY3Jlgmepg12xyJUaC59+HU2P4 ZK4EJO0KdDqLwbp0Bnmke/87jUJzZc/AH8t/Rh/vYgKdrf7G5XtX+OmPhPOMIlFeteFQ bpoUSEDS6ziMHjcVzzwDSzUEjKyQK8KRi0Znj01sAHA4Op/i6xei6EXkQLgUyh4rGyLa 7qMM3Xum9tDQAUirphRs4WujDsdS1I8k0/mI9iaChFiFEQ7cweYGYzlwNJmRhBxMr35L jZPJOEo9ixKLY9Cbvi5h8MiLNF7UxNfW7hDcW5bXsyLu5pEDXJtBvlHZzJvwI9XN4ZJa +Lzw== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=+25HsBYTrDWOCOW3K6j6tioZwHzZmYgthWlELlG8JSo=; b=paYjhvuHdxim8PDtJl5BwISDuaecNGxHQqen8uKuguJ3rT3zXk5iUGR+Wj82DL8px4 YnTu3730f7XcxLPmcikuGZvfFv3+ih7eDaoLNdToFtebXoS0ufJl9n7oUVW/cLm+eXu2 kRDMTM5+yJ1KUViKDCP03vE82m8Moxlm4p/00rKIwuWmLbHaYjyEa2v1/U9TnG46I0w/ h7+f4n8Ptc+SCi3s8BOcdCLHaIhzX3DN97Iob8sb4TvgLt5lR3+F7UwB0jziu9icnb3O H+sfNrSZ/+2O7vTfozRFfYIhrP8wiGF1A9HqRCXhz9ktAy3HeFUuNxy4rh3nnChrffTb i0Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jPvunWNq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a65si732416pge.169.2022.02.14.12.58.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 12:58:24 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jPvunWNq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DB486F8BB4; Mon, 14 Feb 2022 12:21:19 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343934AbiBNJ5X (ORCPT + 99 others); Mon, 14 Feb 2022 04:57:23 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343607AbiBNJuz (ORCPT ); Mon, 14 Feb 2022 04:50:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08A82657A4; Mon, 14 Feb 2022 01:41:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B00F61172; Mon, 14 Feb 2022 09:41:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71944C340EF; Mon, 14 Feb 2022 09:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831706; bh=WxH1Jvs2nKiTr7Ngr070ShsLHsw6r7eBxqgxaRmGV10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jPvunWNq7PgnQAZ2+lruoR5awVHY3niAZU+jgd0jzNiVQZRWzL5u653X4kzpqsS3s jc/YxXJ+lonsEY2TzBuAsxpBFUrAV92uTMQYUHnfn896/wW/fWkZVa1uHk4v6a6CEF 9jak/oavRbmCpVYC5ZELWKRp/KGBxycoY6ZPqYLA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vitaly Kuznetsov , Paolo Bonzini , Sasha Levin Subject: [PATCH 5.10 038/116] KVM: nVMX: eVMCS: Filter out VM_EXIT_SAVE_VMX_PREEMPTION_TIMER Date: Mon, 14 Feb 2022 10:25:37 +0100 Message-Id: <20220214092459.998110689@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 From: Vitaly Kuznetsov [ Upstream commit 7a601e2cf61558dfd534a9ecaad09f5853ad8204 ] Enlightened VMCS v1 doesn't have VMX_PREEMPTION_TIMER_VALUE field, PIN_BASED_VMX_PREEMPTION_TIMER is also filtered out already so it makes sense to filter out VM_EXIT_SAVE_VMX_PREEMPTION_TIMER too. Note, none of the currently existing Windows/Hyper-V versions are known to enable 'save VMX-preemption timer value' when eVMCS is in use, the change is aimed at making the filtering future proof. Signed-off-by: Vitaly Kuznetsov Message-Id: <20220112170134.1904308-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/vmx/evmcs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/evmcs.h b/arch/x86/kvm/vmx/evmcs.h index bd41d9462355f..011929a638230 100644 --- a/arch/x86/kvm/vmx/evmcs.h +++ b/arch/x86/kvm/vmx/evmcs.h @@ -59,7 +59,9 @@ DECLARE_STATIC_KEY_FALSE(enable_evmcs); SECONDARY_EXEC_SHADOW_VMCS | \ SECONDARY_EXEC_TSC_SCALING | \ SECONDARY_EXEC_PAUSE_LOOP_EXITING) -#define EVMCS1_UNSUPPORTED_VMEXIT_CTRL (VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL) +#define EVMCS1_UNSUPPORTED_VMEXIT_CTRL \ + (VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL | \ + VM_EXIT_SAVE_VMX_PREEMPTION_TIMER) #define EVMCS1_UNSUPPORTED_VMENTRY_CTRL (VM_ENTRY_LOAD_IA32_PERF_GLOBAL_CTRL) #define EVMCS1_UNSUPPORTED_VMFUNC (VMX_VMFUNC_EPTP_SWITCHING) -- 2.34.1