Message ID | 20220207155447.840194-7-mlevitsk@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CB98C35272 for <kvm@archiver.kernel.org>; Mon, 7 Feb 2022 16:05:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1392478AbiBGQET (ORCPT <rfc822;kvm@archiver.kernel.org>); Mon, 7 Feb 2022 11:04:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385584AbiBGPzw (ORCPT <rfc822;kvm@vger.kernel.org>); Mon, 7 Feb 2022 10:55:52 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 43941C0401CC for <kvm@vger.kernel.org>; Mon, 7 Feb 2022 07:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644249351; 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=EAX/iPSDnKifJ1ul8GYSz/iW0O/HgQPeT+89Chaumh4=; b=LC569S7T+X3ePsCLgWs9TDNGxFCbz30nhzCdOX1ueMlsvDiwadEb+6ZaT8FT9NNjIjm9Ea gmYEXSb8SMFuoCgnB25X7JYroT+kHae3NOQFnmhkMtO9DtUKF6Pj+QyDsVsGyKXuDaKeyl nStSc1gIyDgHuQawSuVdtamLIAl3bWg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-311-jqEL4Il4OMi6dTRpCOZybg-1; Mon, 07 Feb 2022 10:55:48 -0500 X-MC-Unique: jqEL4Il4OMi6dTRpCOZybg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FA26100C675; Mon, 7 Feb 2022 15:55:45 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 495177DE38; Mon, 7 Feb 2022 15:55:37 +0000 (UTC) From: Maxim Levitsky <mlevitsk@redhat.com> To: kvm@vger.kernel.org Cc: Tony Luck <tony.luck@intel.com>, "Chang S. Bae" <chang.seok.bae@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Wanpeng Li <wanpengli@tencent.com>, Ingo Molnar <mingo@redhat.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>, Dave Hansen <dave.hansen@linux.intel.com>, Paolo Bonzini <pbonzini@redhat.com>, linux-kernel@vger.kernel.org, Rodrigo Vivi <rodrigo.vivi@intel.com>, "H. Peter Anvin" <hpa@zytor.com>, intel-gvt-dev@lists.freedesktop.org, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Joerg Roedel <joro@8bytes.org>, Sean Christopherson <seanjc@google.com>, David Airlie <airlied@linux.ie>, Zhi Wang <zhi.a.wang@intel.com>, Brijesh Singh <brijesh.singh@amd.com>, Jim Mattson <jmattson@google.com>, x86@kernel.org, Daniel Vetter <daniel@ffwll.ch>, Borislav Petkov <bp@alien8.de>, Zhenyu Wang <zhenyuw@linux.intel.com>, Kan Liang <kan.liang@linux.intel.com>, Jani Nikula <jani.nikula@linux.intel.com>, Maxim Levitsky <mlevitsk@redhat.com> Subject: [PATCH RESEND 06/30] KVM: x86: mark syntethic SMM vmexit as SVM_EXIT_SW Date: Mon, 7 Feb 2022 17:54:23 +0200 Message-Id: <20220207155447.840194-7-mlevitsk@redhat.com> In-Reply-To: <20220207155447.840194-1-mlevitsk@redhat.com> References: <20220207155447.840194-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org |
Series |
My patch queue
|
expand
|
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 8013be9edf27c..9a4e299ed5673 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4194,7 +4194,7 @@ static int svm_enter_smm(struct kvm_vcpu *vcpu, char *smstate) svm->vmcb->save.rsp = vcpu->arch.regs[VCPU_REGS_RSP]; svm->vmcb->save.rip = vcpu->arch.regs[VCPU_REGS_RIP]; - ret = nested_svm_vmexit(svm); + ret = nested_svm_simple_vmexit(svm, SVM_EXIT_SW); if (ret) return ret;
Use a dummy unused vmexit reason to mark the 'VM exit' that is happening when we exit to handle SMM, which is not a real VM exit. This makes it a bit easier to read the KVM trace, and avoids other potential problems. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> --- arch/x86/kvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)