A large region-3 entry (pud) might have stray bits where the segment index is located, which is not a problem by itself, since hardware ignores them. The problem arises in dat_split_crste(), which assumes that there are no stray bits. The stray bits were not cleared and could have ended up overlapping the actual segment index of the split table. Fix by clearing the segment index. Fixes: 2db149a0a6c5 ("KVM: s390: KVM page table management functions: walks") Cc: stable@vger.kernel.org Signed-off-by: Claudio Imbrenda --- arch/s390/kvm/gmap/dat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/kvm/gmap/dat.c b/arch/s390/kvm/gmap/dat.c index aee22867309c..02bc874d004f 100644 --- a/arch/s390/kvm/gmap/dat.c +++ b/arch/s390/kvm/gmap/dat.c @@ -302,6 +302,7 @@ static int dat_split_crste(struct kvm_s390_mmu_cache *mc, union crste *crstep, init = old; init.h.tt--; if (old.h.fc) { + init.val &= ~_SEGMENT_INDEX; for (i = 0; i < _CRST_ENTRIES; i++) table->crstes[i].val = init.val | i * HPAGE_SIZE; } else { -- 2.56.1