]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: provide only a single function for setting the tod (fix SCK)
authorDavid Hildenbrand <david@redhat.com>
Wed, 7 Feb 2018 11:46:43 +0000 (12:46 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 20 Feb 2018 20:51:28 +0000 (20:51 +0000)
commit7ec9e7d20ef9f880e79b05327b1cadf7d935a63c
tree0f79bbd4a0fc3e2c2cfc12fa494ce110e404bac0
parent3f8868c2b74d2b5bc95287f71526e28bc60fc9a4
KVM: s390: provide only a single function for setting the tod (fix SCK)

Right now, SET CLOCK called in the guest does not properly take care of
the epoch index, as the call goes via the old kvm_s390_set_tod_clock()
interface. So the epoch index is neither reset to 0, if required, nor
properly set to e.g. 0xff on negative values.

Fix this by providing a single kvm_s390_set_tod_clock() function. Move
Multiple-epoch facility handling into it.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180207114647.6220-3-david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: e1688250bd65 ("KVM: s390: Multiple Epoch Facility support")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h
arch/s390/kvm/priv.c