From patchwork Thu Jun 2 10:20:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 69138 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp37066qgf; Thu, 2 Jun 2016 03:21:07 -0700 (PDT) X-Received: by 10.66.8.198 with SMTP id t6mr4465860paa.66.1464862867560; Thu, 02 Jun 2016 03:21:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d65si48617300pfc.0.2016.06.02.03.21.07; Thu, 02 Jun 2016 03:21:07 -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 S932306AbcFBKVG (ORCPT + 3 others); Thu, 2 Jun 2016 06:21:06 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:38251 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932120AbcFBKVE (ORCPT ); Thu, 2 Jun 2016 06:21:04 -0400 Received: by mail-wm0-f45.google.com with SMTP id a20so61031605wma.1 for ; Thu, 02 Jun 2016 03:21:04 -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=IhazrsRr4lFAPApF8UcHIbFZjahHFyopgDnUSSQbpPI=; b=CL27iOXxgPKR8Abr1Evezfj2u4C9hm0x4n+XpFmwc4AoZNovsviiKXb3EYZt92+twR Eirhj+hD12+YYRPXjd2k6KnQZlV7rBR8D8+fpyiO5nbumLvXw42R2aKrGPmpx22SdWnS bv8y9Acd6CKD6G2HKFBYT06iXyLTUWg/+vUlI= 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=IhazrsRr4lFAPApF8UcHIbFZjahHFyopgDnUSSQbpPI=; b=D0fmKzuufxLxQbTwz5i6QPIqk46jh85LV8jgkDem1yRs0rcg1lO66vvVSqc9rSUriR YQcvrxvW2Kju5XAGGlXt89PPzFnS4V2FWvHCumdQLUZM0fJyB/8J1CfC4SP9a76/2y8b +OQ/KvWlDKTIDVeVw2O5TD8NQ79c6h82YWo1E2h5qGNUXRWZdIB/vUlPHd2BTZ9u/nSH tBcjyww62p2mW6eYKdcLVS0Gk6YurT2JQZ+brOyVjlALW4cXeugOA91/BE7xqVLm5vWK GjnNjNkwRMlwzlSamecpCZTQ1UwmLEGC5z1OvC6yRs9tVUM0VmH0QZlIKCUHQxCJODhX cjXQ== X-Gm-Message-State: ALyK8tJaiuTQIP6H6giqIvUKUyhxJoGkX4nxnFq7ZYcS+2iMXLR0FZkWEXW3emp+CVwkH7sQ X-Received: by 10.28.0.84 with SMTP id 81mr26395082wma.23.1464862863240; Thu, 02 Jun 2016 03:21:03 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id o129sm39552254wmb.17.2016.06.02.03.21.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Jun 2016 03:21:02 -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 1/8] KVM: arm/arm64: vgic-v2: Clear all dirty LRs Date: Thu, 2 Jun 2016 12:20:53 +0200 Message-Id: <1464862860-1183-2-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 --- virt/kvm/arm/hyp/vgic-v2-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/virt/kvm/arm/hyp/vgic-v2-sr.c b/virt/kvm/arm/hyp/vgic-v2-sr.c index a3f12b3..3a3a699 100644 --- a/virt/kvm/arm/hyp/vgic-v2-sr.c +++ b/virt/kvm/arm/hyp/vgic-v2-sr.c @@ -100,12 +100,11 @@ static void __hyp_text save_lrs(struct kvm_vcpu *vcpu, void __iomem *base) if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i))) continue; - if (cpu_if->vgic_elrsr & (1UL << i)) { + if (cpu_if->vgic_elrsr & (1UL << i)) cpu_if->vgic_lr[i] &= ~GICH_LR_STATE; - continue; - } + else + cpu_if->vgic_lr[i] = readl_relaxed(base + GICH_LR0 + (i * 4)); - cpu_if->vgic_lr[i] = readl_relaxed(base + GICH_LR0 + (i * 4)); writel_relaxed(0, base + GICH_LR0 + (i * 4)); } }