summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
authorDavid Hildenbrand2015-10-29 10:30:36 +0100
committerChristian Borntraeger2016-06-21 09:43:46 +0200
commit91473b487dd58af6384c5c3db13de50defa2c106 (patch)
treeda99d623f00f1786619141a2e82b48b182187c18 /arch/s390/kvm/kvm-s390.c
parentKVM: s390: vsie: speed up VCPU external calls (diff)
downloadkernel-qcow2-linux-91473b487dd58af6384c5c3db13de50defa2c106.tar.gz
kernel-qcow2-linux-91473b487dd58af6384c5c3db13de50defa2c106.tar.xz
kernel-qcow2-linux-91473b487dd58af6384c5c3db13de50defa2c106.zip
KVM: s390: vsie: correctly set and handle guest TOD
Guest 2 sets up the epoch of guest 3 from his point of view. Therefore, we have to add the guest 2 epoch to the guest 3 epoch. We also have to take care of guest 2 epoch changes on STP syncs. This will work just fine by also updating the guest 3 epoch when a vsie_block has been set for a VCPU. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r--arch/s390/kvm/kvm-s390.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 8ba7a98a50cf..6fdf1f7647d7 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -176,6 +176,8 @@ static int kvm_clock_sync(struct notifier_block *notifier, unsigned long val,
vcpu->arch.sie_block->epoch -= *delta;
if (vcpu->arch.cputm_enabled)
vcpu->arch.cputm_start += *delta;
+ if (vcpu->arch.vsie_block)
+ vcpu->arch.vsie_block->epoch -= *delta;
}
}
return NOTIFY_OK;