|
Alexander Graf |
0f4fbd |
From: Marc Zyngier <marc.zyngier@arm.com>
|
|
Alexander Graf |
0f4fbd |
Date: Thu, 16 Nov 2017 17:58:17 +0000
|
|
Alexander Graf |
0f4fbd |
Subject: KVM: arm/arm64: vgic-its: Preserve the revious read from the pending
|
|
Alexander Graf |
0f4fbd |
table
|
|
Alexander Graf |
0f4fbd |
Patch-mainline: v4.15-rc3
|
|
Alexander Graf |
0f4fbd |
Git-commit: 64afe6e9eb4841f35317da4393de21a047a883b3
|
|
Alexander Graf |
0f4fbd |
References: bsc#1077761
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
The current pending table parsing code assumes that we keep the
|
|
Alexander Graf |
0f4fbd |
previous read of the pending bits, but keep that variable in
|
|
Alexander Graf |
0f4fbd |
the current block, making sure it is discarded on each loop.
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
We end-up using whatever is on the stack. Who knows, it might
|
|
Alexander Graf |
0f4fbd |
just be the right thing...
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
Fixes: 33d3bc9556a7d ("KVM: arm64: vgic-its: Read initial LPI pending table")
|
|
Alexander Graf |
0f4fbd |
Cc: stable@vger.kernel.org # 4.8
|
|
Alexander Graf |
0f4fbd |
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
|
|
Alexander Graf |
0f4fbd |
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
|
|
Alexander Graf |
0f4fbd |
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
|
|
Alexander Graf |
0f4fbd |
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
|
|
Alexander Graf |
0f4fbd |
Acked-by: Alexander Graf <agraf@suse.de>
|
|
Alexander Graf |
0f4fbd |
---
|
|
Alexander Graf |
0f4fbd |
virt/kvm/arm/vgic/vgic-its.c | 2 +-
|
|
Alexander Graf |
0f4fbd |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
--- a/virt/kvm/arm/vgic/vgic-its.c
|
|
Alexander Graf |
0f4fbd |
+++ b/virt/kvm/arm/vgic/vgic-its.c
|
|
Alexander Graf |
0f4fbd |
@@ -421,6 +421,7 @@
|
|
Alexander Graf |
0f4fbd |
u32 *intids;
|
|
Alexander Graf |
0f4fbd |
int nr_irqs, i;
|
|
Alexander Graf |
0f4fbd |
unsigned long flags;
|
|
Alexander Graf |
0f4fbd |
+ u8 pendmask;
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
nr_irqs = vgic_copy_lpi_list(vcpu, &intids);
|
|
Alexander Graf |
0f4fbd |
if (nr_irqs < 0)
|
|
Alexander Graf |
0f4fbd |
@@ -428,7 +429,6 @@
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
for (i = 0; i < nr_irqs; i++) {
|
|
Alexander Graf |
0f4fbd |
int byte_offset, bit_nr;
|
|
Alexander Graf |
0f4fbd |
- u8 pendmask;
|
|
Alexander Graf |
0f4fbd |
|
|
Alexander Graf |
0f4fbd |
byte_offset = intids[i] / BITS_PER_BYTE;
|
|
Alexander Graf |
0f4fbd |
bit_nr = intids[i] % BITS_PER_BYTE;
|