Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1634296rwi; Thu, 3 Nov 2022 07:29:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ozDQ3E05F3lAtx4EKjGx55290DV28AMM3NX20m9WMZ2mLdPJzU1r4y3nvkJJ0MrTuUCd+ X-Received: by 2002:a17:907:1b24:b0:76d:7b9d:2f8b with SMTP id mp36-20020a1709071b2400b0076d7b9d2f8bmr29052246ejc.414.1667485743576; Thu, 03 Nov 2022 07:29:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667485743; cv=none; d=google.com; s=arc-20160816; b=Xerh38i5gVRP7LfUZHTMG8RMKsmm2O1rR6nPdCyA1UjhhS5qT59Fqq2YFwzd9x10lM j5oUEsV22NkNBKGFmrXt1S9EhShLHX3fyRMX939x5VafwwQ7cjns1V984twBW3nGx/jP XeSY2sPlsm/EkjRMdHAmVqM+9bJfmYh5oOUW8EcYyFZdG5zRwv3qt49hxHmKwHv7ZUxC dW3+N1+9Lb3AFedE26HrMKkwFvZ5xzzUXlowq482bYfpjSItVI0CpgWnMEw0trbK36iV V0xn8/isULZDqdDIptvDViXxMGqXDnNbtEmXnq9TLARm1hAQ6GSyVTvjLaY/QowVq3Qg UZDQ== 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=FT9aNXqnuKXbR3StefJr7RNDWsInEBudWILSzsOk6wI=; b=qU4m7pTYz9FokUf4QveFyYpqRiF5NlEpU6ZxR+O1vDfKODQ9HGRHlAm1GURzdbVt18 LA209Tbhiq6H8YBUNfkhW38iMItT+QmrQtwcbkqVD+5gDMeNeBibKVacmHNlwSBV1l2/ 2QWgs9thwKrCcUr5UjF3lt7WVDgV7ZC7mQFS1aa681+e6vzuhCRZefTHNmWN7J3ZY+0u mPJwVQsBVyG6GtuAdJ7Z1rFz77O0Fr/Z3lXmTO+g32OpXiGa+DaBTcMHWaVn2NtWbXx0 w0fTTlRzxnwKtQlMbj/8KEQYdSdJ6R/fNxNR+k0tZ75riEd2VM7e69Fk3C1owrlvK70t L4Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=alSGSvKr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020a056402524300b00459fc3fcf3csi1664843edd.102.2022.11.03.07.28.40; Thu, 03 Nov 2022 07:29:03 -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=@redhat.com header.s=mimecast20190719 header.b=alSGSvKr; 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 S231168AbiKCOQT (ORCPT + 97 others); Thu, 3 Nov 2022 10:16:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231715AbiKCOPl (ORCPT ); Thu, 3 Nov 2022 10:15:41 -0400 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 34E6F13F07 for ; Thu, 3 Nov 2022 07:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667484877; 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=FT9aNXqnuKXbR3StefJr7RNDWsInEBudWILSzsOk6wI=; b=alSGSvKr+WORyuxK6qzt7U9rnJVBew5MzTl0DcjKFrAfbQjSVJ7Y7jbUPPQYf3FfNKIvGQ IdVagG2hx2EdYunpyLFadGtmYI9Dey3tCd9lfhj288klCYN3aPPW0NFKEcC5PK3FZdYXNG WynhUzu8MiTaDZbnlzur5JeqfPwfk84= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-108-8Qpk1q88NTOADxqZAGJhHA-1; Thu, 03 Nov 2022 10:14:35 -0400 X-MC-Unique: 8Qpk1q88NTOADxqZAGJhHA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D2C662A2AD7D; Thu, 3 Nov 2022 14:14:33 +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 E9E4640C6EC3; Thu, 3 Nov 2022 14:14:29 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Paolo Bonzini , Thomas Gleixner , linux-kernel@vger.kernel.org, Chenyi Qiang , Yang Zhong , x86@kernel.org, Shuah Khan , Dave Hansen , "H. Peter Anvin" , Maxim Levitsky , Colton Lewis , Borislav Petkov , Peter Xu , Sean Christopherson , Jim Mattson , linux-kselftest@vger.kernel.org, Ingo Molnar , Wei Wang , David Matlack , stable@vger.kernel.org Subject: [PATCH v2 9/9] KVM: x86: remove exit_int_info warning in svm_handle_exit Date: Thu, 3 Nov 2022 16:13:51 +0200 Message-Id: <20221103141351.50662-10-mlevitsk@redhat.com> In-Reply-To: <20221103141351.50662-1-mlevitsk@redhat.com> References: <20221103141351.50662-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-3.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=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 It is valid to receive external interrupt and have broken IDT entry, which will lead to #GP with exit_int_into that will contain the index of the IDT entry (e.g any value). Other exceptions can happen as well, like #NP or #SS (if stack switch fails). Thus this warning can be user triggred and has very little value. Cc: stable@vger.kernel.org Signed-off-by: Maxim Levitsky --- arch/x86/kvm/svm/svm.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index e9cec1b692051c..36f651ce842174 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3428,15 +3428,6 @@ static int svm_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) return 0; } - if (is_external_interrupt(svm->vmcb->control.exit_int_info) && - exit_code != SVM_EXIT_EXCP_BASE + PF_VECTOR && - exit_code != SVM_EXIT_NPF && exit_code != SVM_EXIT_TASK_SWITCH && - exit_code != SVM_EXIT_INTR && exit_code != SVM_EXIT_NMI) - printk(KERN_ERR "%s: unexpected exit_int_info 0x%x " - "exit_code 0x%x\n", - __func__, svm->vmcb->control.exit_int_info, - exit_code); - if (exit_fastpath != EXIT_FASTPATH_NONE) return 1; -- 2.34.3