From patchwork Thu Jun 2 10:20:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 69139 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp37114qgf; Thu, 2 Jun 2016 03:21:14 -0700 (PDT) X-Received: by 10.66.84.74 with SMTP id w10mr4388343pay.140.1464862874131; Thu, 02 Jun 2016 03:21:14 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fu2si40416192pad.136.2016.06.02.03.21.13; Thu, 02 Jun 2016 03:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932452AbcFBKVM (ORCPT + 3 others); Thu, 2 Jun 2016 06:21:12 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36380 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932408AbcFBKVL (ORCPT ); Thu, 2 Jun 2016 06:21:11 -0400 Received: by mail-wm0-f45.google.com with SMTP id n184so72396721wmn.1 for ; Thu, 02 Jun 2016 03:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EcemaWhgUtTauOVlayuj1qSs6mC3ruZkcfk/Lr3ibJQ=; b=fgRaeKExSIOdIJ4yF/NQetA4a8hzNKs/ughtZwUKlWFL5Rrtuo/+0VdyncK4EZhpIJ 8Mh36t5tztf5qg8jNivAscTuAwvDdWcrfVJ1GV3TbCgB1o9dPEENyn204692+UhViHsJ RPb+TmI5UfHkMCpGkiqXXVuWnIK7PJmpmhNJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EcemaWhgUtTauOVlayuj1qSs6mC3ruZkcfk/Lr3ibJQ=; b=DlDCyDF8989fFb/DQbj2OvnwJKxJuiYNq3rvOqmAcVWscY8iGekmX/Dq3skGTptgda G5Lr06v6KkX/gMHI2KpiL9VSigQiAw7lNn6+RY8EV0iTdDYe7AtN22ZqRyjPh5xt9F5g DL8lH+EnNTXoHmUPZsfVPeJFV9IaTrk7FSRVst7oUUG9GtCeStWGkBs2puC6clQDEHbn 9kwQVsLfQXLPoTKV+k56Cgj7mVqjDaYox5HtQ2nOfgefaCnovM0Tqxyo2+v0NtkbWKdA mGBIgyEXEn6sdqiKbMC6yfFaiJIq4kFs5KAcHLzEs2o6D/0ITQQZXFIMfUuMuOBa88og Slog== X-Gm-Message-State: ALyK8tK+SktTf43vm7k35RJ91nyVwhRNk6+XrAgqWXDDLT5aN8sETrpbSimkGQTT51j/kgiR X-Received: by 10.28.154.130 with SMTP id c124mr26908565wme.9.1464862870183; Thu, 02 Jun 2016 03:21:10 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id o129sm39552254wmb.17.2016.06.02.03.21.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 03:21:09 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, Marc Zyngier , Christoffer Dall , stable@vger.kernel.org Subject: [PULL 2/8] KVM: arm/arm64: vgic-v3: Clear all dirty LRs Date: Thu, 2 Jun 2016 12:20:54 +0200 Message-Id: <1464862860-1183-3-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty In-Reply-To: <1464862860-1183-1-git-send-email-christoffer.dall@linaro.org> References: <1464862860-1183-1-git-send-email-christoffer.dall@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org When saving the state of the list registers, it is critical to reset them zero, as we could otherwise leave unexpected EOI interrupts pending for virtual level interrupts. Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier --- arch/arm64/kvm/hyp/vgic-v3-sr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.1.2.330.g565301e.dirty -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c index fff7cd4..3129df9 100644 --- a/arch/arm64/kvm/hyp/vgic-v3-sr.c +++ b/arch/arm64/kvm/hyp/vgic-v3-sr.c @@ -190,12 +190,11 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu) if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i))) continue; - if (cpu_if->vgic_elrsr & (1 << i)) { + if (cpu_if->vgic_elrsr & (1 << i)) cpu_if->vgic_lr[i] &= ~ICH_LR_STATE; - continue; - } + else + cpu_if->vgic_lr[i] = __gic_v3_get_lr(i); - cpu_if->vgic_lr[i] = __gic_v3_get_lr(i); __gic_v3_set_lr(0, i); }