Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp357098pxb; Wed, 6 Oct 2021 06:32:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRTA2d2JlTpXLni/nwScMf42tl2DTRY6gkwvnEzesBEst5VbtDO77FUx3kQ0GXtM6veZ4W X-Received: by 2002:a63:8f4a:: with SMTP id r10mr20492292pgn.337.1633527119901; Wed, 06 Oct 2021 06:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633527119; cv=none; d=google.com; s=arc-20160816; b=gHhZviyMkV2NrDKY0ieXuxzH1ExEwiwxVpwzcDVYjwqDZLkivne+TtgC/kw0oW4oNs mg6W0Xo01J010oJcP5Dyv18XKjzEbqb1gYudw/+FMmdHXZ1HTqz+zjMQvJhqU6SmR2a7 K/FzPdb8ClO3woEO+7wDVw2Z1ctAUL7o1xbMeiwqQQYodeGteMhVKQvZZoXcyWH7YnOy 5fUWhNsMBtaGS1raJnYjnX2MkWCQ4iWxk9/lf8dxZ2u7TAgJPySTcWzAQUcmYRbN3Y0/ IR4Igj01SogHs7+fxBPMTPNsgjTLXj+RY0oqiheFwmo8Qtg6sJe/xWu4timpk7lrzz5L j6JA== 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=l8WcdHgQDZEaj75ZgfckWCMRlIXLpxxH3xSlPnRVOYs=; b=ZU4kwB/2AgJK/YG37vOBKTYg53XTgZL4v6K0TuKLnd+dkhy83WI30rEqpV5HtLi0t9 vZqOOATHEM4xBa6ODLFOdeBoXPbaN0T0SXwPbkVWUWAP+fZfGM6MqfTQEJrh8Mgi4MLf 010ZWRiz1lYML+haU1+nHs5IOKSYNjxB1nihF095AEQ4gGFOzQpKDmCy21IPuf0bxt3o ZEEnNlZRzxQ1rQHQYoaRoKkNj36lh00/v+obYucEUK2C3PfNLtSMOwhBIy5wsdlh1svG tXtcJXFt9u/cyJPJv+Hy416a+/9DZ17m0qfFTN3f+2ueiBxy4+hxeQO/3947N1CtRuO+ xvlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NUzpr3g8; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n24si11786224pfv.35.2021.10.06.06.31.46; Wed, 06 Oct 2021 06:31:59 -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=@kernel.org header.s=k20201202 header.b=NUzpr3g8; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239011AbhJFNca (ORCPT + 99 others); Wed, 6 Oct 2021 09:32:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:49026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238892AbhJFNcZ (ORCPT ); Wed, 6 Oct 2021 09:32:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C7A5260E9C; Wed, 6 Oct 2021 13:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633527033; bh=HvnztjarHSn+a6mS+GbFME7OEatQUSnVwZdZm6XrE2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NUzpr3g89CeK2rY0F+q905VMlBGRk3YIiJ8JcCq+AaQTahV3Vx2t4gPxQ5T2pKiIy /JlVWh6kMzsID2uyAbsAiZ94QcGY2nPBgn9IEB32ooqRFn13ASADlLd25LwcCaioKQ ckxRbOmVJucXFtlIWw/lRVpfFbawAuLYP2Wo3mzS5ovLLnLwzIVeMwW0uAi2opd5mN YyDxGj84Wv021JUAdALu9paV6VkTVGltHuD6p37TlrXFqLdO5yTC5kH2B0a3xWgpF4 nEiT4BKTbg+NNjUYQNpnar24aHcmtOazLIu9gMNRLzpQF3mzXNq88TH3XrUZIve301 p0DMdc89Y4KxA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maxim Levitsky , Paolo Bonzini , Sasha Levin , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, kvm@vger.kernel.org Subject: [PATCH MANUALSEL 5.14 8/9] KVM: x86: nSVM: restore int_vector in svm_clear_vintr Date: Wed, 6 Oct 2021 09:30:20 -0400 Message-Id: <20211006133021.271905-8-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006133021.271905-1-sashal@kernel.org> References: <20211006133021.271905-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxim Levitsky [ Upstream commit aee77e1169c1900fe4248dc186962e745b479d9e ] In svm_clear_vintr we try to restore the virtual interrupt injection that might be pending, but we fail to restore the interrupt vector. Signed-off-by: Maxim Levitsky Message-Id: <20210914154825.104886-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- arch/x86/kvm/svm/svm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 69639f9624f5..19d6ffdd3f73 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1601,6 +1601,8 @@ static void svm_clear_vintr(struct vcpu_svm *svm) svm->vmcb->control.int_ctl |= svm->nested.ctl.int_ctl & V_IRQ_INJECTION_BITS_MASK; + + svm->vmcb->control.int_vector = svm->nested.ctl.int_vector; } vmcb_mark_dirty(svm->vmcb, VMCB_INTR); -- 2.33.0