Skip to content

Commit 0dd4cdc

Browse files
huthfrankjaa
authored andcommitted
KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field
We recently experienced some weird huge time jumps in nested guests when rebooting them in certain cases. After adding some debug code to the epoch handling in vsie.c (thanks to David Hildenbrand for the idea!), it was obvious that the "epdx" field (the multi-epoch extension) did not get set to 0xff in case the "epoch" field was negative. Seems like the code misses to copy the value from the epdx field from the guest to the shadow control block. By doing so, the weird time jumps are gone in our scenarios. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2140899 Fixes: 8fa1696 ("KVM: s390: Multiple Epoch Facility support") Signed-off-by: Thomas Huth <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Claudio Imbrenda <[email protected]> Reviewed-by: Janosch Frank <[email protected]> Cc: [email protected] # 4.19+ Link: https://lore.kernel.org/r/[email protected] Message-Id: <[email protected]> Signed-off-by: Janosch Frank <[email protected]>
1 parent eb70814 commit 0dd4cdc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/s390/kvm/vsie.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,10 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
546546
if (test_kvm_cpu_feat(vcpu->kvm, KVM_S390_VM_CPU_FEAT_CEI))
547547
scb_s->eca |= scb_o->eca & ECA_CEI;
548548
/* Epoch Extension */
549-
if (test_kvm_facility(vcpu->kvm, 139))
549+
if (test_kvm_facility(vcpu->kvm, 139)) {
550550
scb_s->ecd |= scb_o->ecd & ECD_MEF;
551+
scb_s->epdx = scb_o->epdx;
552+
}
551553

552554
/* etoken */
553555
if (test_kvm_facility(vcpu->kvm, 156))

0 commit comments

Comments
 (0)