Message ID | 20221117143242.102721-2-mlevitsk@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp433550wrr; Thu, 17 Nov 2022 06:35:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf7npehtXa9Pa+BiuABimX3znirOiS2pVcdkYo+wFpKfhaKShhX30X92JIg+8ho+oWAUlFfT X-Received: by 2002:a17:90b:3d05:b0:215:d625:1076 with SMTP id pt5-20020a17090b3d0500b00215d6251076mr8893992pjb.26.1668695750962; Thu, 17 Nov 2022 06:35:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668695750; cv=none; d=google.com; s=arc-20160816; b=a/DfP6EvrHU5NUPVmTHaIMlpRTCDvf7LXWw1tqkouDomLbneJSCEIiaQtEcgA6UjMD G/8tKkCGH/YtDSEfuUJEbrOYxALBSUo5y06E6uKHvWrTGQa2BH510CziGnPvyKB3WQ4U nTA2JsjGgJNGWJJC/zOaf9yPw5I08IuggttBp84R3PftonQdMdzCx9XVxXD34qjIjGys +cOqadK9d0AR6EZnhQ6a+P8DBlD6y1y+CxKKpMP5p7jJHhVw4y2GRtubJOjcYHQtDdC7 lrdnYW+pXocFWvaC4b+RaxvSo8AQZQ4rbw2yMxcWaXLdgxHP0fefmuLtntPrRIii5svB o+5Q== 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=8a16/QIb5ZY6hIpK40udiXgAOk2ByX1wL+XeLc7pIZ4=; b=sY4LskGkW+nXPE80YnXg0O291oyMDEuoWSvNR7M0JI/pwUZ5DMlZzD8NpWBqJXZ5Ko mLENYpTQMOyI4LQ1KzIknl/hqH0eaE6Q7xE/LtfT+hpEOLHKGBTjnmqfYXUrW0N+43Nl zT3fa5S6JeDK9jtTVa6BPOb+BDYmZHeHJNDEzM9lnENFcOMdHCD0nUWcYFOiIpAIhu06 yJfSRP6S5Eve7O5MWgi/wu2ULyhycxNvoOFz9XGkFPGotohvHQ2MKqkb4g91YXy1EDt3 16/ST58YhoBrIk838CEQGIUaCdbYZllDHrcfDHHrkAr/quyELL8chX986JXODZnB/GOh hHqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OC1G/GMv"; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a170902820200b00186f2ef80bbsi1053249pln.308.2022.11.17.06.35.35; Thu, 17 Nov 2022 06:35:50 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="OC1G/GMv"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240457AbiKQOen (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 09:34:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233651AbiKQOeK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 09:34:10 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84EC17C005 for <linux-kernel@vger.kernel.org>; Thu, 17 Nov 2022 06:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668695579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8a16/QIb5ZY6hIpK40udiXgAOk2ByX1wL+XeLc7pIZ4=; b=OC1G/GMvxvtJqEdqB6LU7Q4f7KpIkJYc5HIsSchQEuXglU3JSPNbjGKAzOzUMXaVlraPIk YS6VE1uOLONz4gaeDnZXyTvcSrzW4Pb9996MRHKPZ+lRyiOD+0LtsYebhbmTYIc3LR58ka rOJr8J1T+H0NihStLQIz61UUJayCzMs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-176-rXWC5-RGPv-ylL7A0A_gxQ-1; Thu, 17 Nov 2022 09:32:52 -0500 X-MC-Unique: rXWC5-RGPv-ylL7A0A_gxQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 25CE0811E67; Thu, 17 Nov 2022 14:32:51 +0000 (UTC) Received: from amdlaptop.tlv.redhat.com (dhcp-4-238.tlv.redhat.com [10.35.4.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id C52332166B29; Thu, 17 Nov 2022 14:32:47 +0000 (UTC) From: Maxim Levitsky <mlevitsk@redhat.com> To: kvm@vger.kernel.org Cc: Paolo Bonzini <pbonzini@redhat.com>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Dave Hansen <dave.hansen@linux.intel.com>, linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Sandipan Das <sandipan.das@amd.com>, Daniel Sneddon <daniel.sneddon@linux.intel.com>, Jing Liu <jing2.liu@intel.com>, Josh Poimboeuf <jpoimboe@kernel.org>, Wyes Karny <wyes.karny@amd.com>, Borislav Petkov <bp@alien8.de>, Babu Moger <babu.moger@amd.com>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>, Sean Christopherson <seanjc@google.com>, Jim Mattson <jmattson@google.com>, x86@kernel.org, Maxim Levitsky <mlevitsk@redhat.com> Subject: [PATCH 01/13] KVM: nSVM: don't sync back tlb_ctl on nested VM exit Date: Thu, 17 Nov 2022 16:32:30 +0200 Message-Id: <20221117143242.102721-2-mlevitsk@redhat.com> In-Reply-To: <20221117143242.102721-1-mlevitsk@redhat.com> References: <20221117143242.102721-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749754315737475897?= X-GMAIL-MSGID: =?utf-8?q?1749754315737475897?= |
Series |
SVM: vNMI (with my fixes)
|
|
Commit Message
Maxim Levitsky
Nov. 17, 2022, 2:32 p.m. UTC
The CPU doesn't change TLB_CTL value as stated in the PRM (15.16.2):
"The VMRUN instruction reads, but does not change, the
value of the TLB_CONTROL field"
Therefore the KVM shoudn't do that either.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
---
arch/x86/kvm/svm/nested.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index b258d6988f5dde..43cc4a5d22e012 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -989,7 +989,6 @@ int nested_svm_vmexit(struct vcpu_svm *svm) vmcb12->control.next_rip = vmcb02->control.next_rip; vmcb12->control.int_ctl = svm->nested.ctl.int_ctl; - vmcb12->control.tlb_ctl = svm->nested.ctl.tlb_ctl; vmcb12->control.event_inj = svm->nested.ctl.event_inj; vmcb12->control.event_inj_err = svm->nested.ctl.event_inj_err;