diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2016-05-25 15:26:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-24 10:22:01 -0700 |
commit | f25ef62ec07b063ec87be042ec0a84be6307d899 (patch) | |
tree | 57ddb5222e6889da9b56d897b3b56aeabfd3bb88 /arch | |
parent | 05be09606e9421fe2b4af0f37a5420216efd0ecc (diff) | |
download | lwn-f25ef62ec07b063ec87be042ec0a84be6307d899.tar.gz lwn-f25ef62ec07b063ec87be042ec0a84be6307d899.zip |
KVM: arm/arm64: vgic-v3: Clear all dirty LRs
commit fa89c77e891917b5913f9be080f9131a9457bb3e upstream.
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.
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kvm/hyp/vgic-v3-sr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c index fff7cd42b3a3..3129df9d3a73 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); } |