Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp50367ybm; Tue, 26 May 2020 10:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQOvP2PXpq1Du18adJ0wpKHGgqBUyWKhZ+8xH1zNn43DBipdNKSGswSSEfuDCR480YfPcl X-Received: by 2002:a17:906:6d44:: with SMTP id a4mr2164762ejt.541.1590514096149; Tue, 26 May 2020 10:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590514096; cv=none; d=google.com; s=arc-20160816; b=J4uxT/tIEHbFtA7mFM0uo1fjwX6jcU8Wob6Jwiu68c4BAfWHzeCgWU0aDiSq+nhMgB iJwpUeQT8rGKM4PIl4k1PwEcBXAGaQYuN6joPQqZRFSwNKbxZeUvnnM0lw3j/j1bLZYG f4wcd/Fxd2vXmyZ07wuBaQewxzhnW0puF5RVGX38fJf49+lEuNtHYkymPTTyePy4noT4 hAih1TcR4nFWQse4hFT46xNrQAwlCxkIHwi2DozY3D4GpW18BYKUntgd8JnABa8U0j40 GQm1+BTDkcRW1bpHRolYncLCFyRpoE6/+9oJuCgJeUt++STkxBi2S6WNYZZSI5T/FJkc uAPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EwYDsYOfWkvOXdIZq6xeSGLtmViex0XfUmWf4Uu92a0=; b=yK67zxfwwRsH2H3yvslbPFXxXfdHlEwk+LX5NF1x/lCKRKOS336GVK6CkuQ4GV4MF8 G7W71JsqiQgR++a9VDWlr7B4HzsHFVJt+pmajkAj5pPm2eIODHHfj/l4wOkfmwUMQV4J BcRxwV3heIViPP1fWWs7iYsABR4sRcae+i6Uc4sYXCe+ePbjJwxKPC3aHnh/mQqR+C4W RDdE8UJ1LzcyH0XWL5FFei7lfMceDbNEiA7eur7dXJNHNnRuyeUmIUFYPPXnxhg61WfB 51K5Df2hfyy+IEvlB9JCcfHJc9MDNv5+1RwxFQfP9TOvwT1/gJyg+bEbKdF0VTQ1xsfG e2gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LAPnzH9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si285130eds.402.2020.05.26.10.27.53; Tue, 26 May 2020 10:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LAPnzH9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2389284AbgEZRXs (ORCPT + 99 others); Tue, 26 May 2020 13:23:48 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41503 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389275AbgEZRXq (ORCPT ); Tue, 26 May 2020 13:23:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590513825; 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=EwYDsYOfWkvOXdIZq6xeSGLtmViex0XfUmWf4Uu92a0=; b=LAPnzH9dkB0Va/0cGdn3jQmmZD+tpD+JzWuiUc/O4Bss1zkhXsVjgG534lbEHwsLVZxqM5 FeA45CBj7+quyWrFP6hu7yDRyyLTeLANYa93kEIls44fUFgqZpEewiTqIYGWnh+psZlAXw DoDjw/poWp3FtiwXPX9/bK0nKnI1dFw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-dtvZkIV5MA2C4u-ABP01mA-1; Tue, 26 May 2020 13:23:43 -0400 X-MC-Unique: dtvZkIV5MA2C4u-ABP01mA-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 6617318A0778; Tue, 26 May 2020 17:23:42 +0000 (UTC) Received: from virtlab511.virt.lab.eng.bos.redhat.com (virtlab511.virt.lab.eng.bos.redhat.com [10.19.152.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA6685C1BB; Tue, 26 May 2020 17:23:36 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: vkuznets@redhat.com, mlevitsk@redhat.com, Sean Christopherson , Jim Mattson Subject: [PATCH 18/28] KVM: nSVM: remove unnecessary if Date: Tue, 26 May 2020 13:22:58 -0400 Message-Id: <20200526172308.111575-19-pbonzini@redhat.com> In-Reply-To: <20200526172308.111575-1-pbonzini@redhat.com> References: <20200526172308.111575-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kvm_vcpu_apicv_active must be false when nested virtualization is enabled, so there is no need to check it in clgi_interception. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/svm/svm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 97dbd6f65831..0654c5672b1a 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -2015,8 +2015,7 @@ static int clgi_interception(struct vcpu_svm *svm) disable_gif(svm); /* After a CLGI no interrupts should come */ - if (!kvm_vcpu_apicv_active(&svm->vcpu)) - svm_clear_vintr(svm); + svm_clear_vintr(svm); return ret; } -- 2.26.2