linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] KVM: s390: Multiple-epoch facility fixes
@ 2018-02-07 11:46 David Hildenbrand
  2018-02-07 11:46 ` [PATCH RFC 1/6] KVM: s390: take care of clock-comparator sign control David Hildenbrand
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: David Hildenbrand @ 2018-02-07 11:46 UTC (permalink / raw)
  To: linux-s390, kvm; +Cc: Christian Borntraeger, Cornelia Huck, Janosch Frank

It think I found various BUGs in the recently added Multiple-epoch facility
support in KVM. Along with it, two cleanups.

1. The clock-comparator sign control is not considered. I sent a patch
   with this previously. This now contains fixes and simplifications.
2. SET CLOCK from the guest does not work reliably if the facility is
   enabled (epoch index not set).
3. Hotplugged CPUs don't inherit the epoch index.
4. TOD clock syncs don't take care of overflows/underflows in the epoch
   value and miss to update the epoch index.


This is RFC as I have basically no machine to test. Hopefully somebody
can jump in and verify that we now handle the epoch index in all
scenarios correctly.

Most importantly, with Multiple-epoch facility, the condition
	Guest TOD = Host TOD - 1
Is represented by both, epoch and epoch_idx containing 0xff. So it is
treated as a 64+8bit signed number - we have to properly take care
of over/underflows when modifying the epoch.


David Hildenbrand (6):
  KVM: s390: take care of clock-comparator sign control
  KVM: s390: provide only a single function for setting the tod
  KVM: s390: consider epoch index on hotplugged CPUs
  KVM: s390: consider epoch index on TOD clock syncs
  KVM: s390: no need to inititalize kvm->arch members to 0
  KVM: s390: generalize kvm_s390_get_tod_clock_ext()

 arch/s390/kvm/interrupt.c |  25 ++++++++---
 arch/s390/kvm/kvm-s390.c  | 109 +++++++++++++++++++++++-----------------------
 arch/s390/kvm/kvm-s390.h  |   5 +--
 arch/s390/kvm/priv.c      |   9 ++--
 4 files changed, 80 insertions(+), 68 deletions(-)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 27+ messages in thread
[parent not found: <b51c6b10-c0c0-2dae-3d74-7c21820d28ce@redhat.com>]

end of thread, other threads:[~2018-02-20 19:06 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 11:46 [PATCH RFC 0/6] KVM: s390: Multiple-epoch facility fixes David Hildenbrand
2018-02-07 11:46 ` [PATCH RFC 1/6] KVM: s390: take care of clock-comparator sign control David Hildenbrand
2018-02-07 13:47   ` Collin L. Walling
2018-02-07 13:58     ` David Hildenbrand
2018-02-07 14:06       ` Christian Borntraeger
2018-02-16  9:45   ` Christian Borntraeger
2018-02-07 11:46 ` [PATCH RFC 2/6] KVM: s390: provide only a single function for setting the tod David Hildenbrand
2018-02-07 20:13   ` Collin L. Walling
2018-02-07 20:15     ` Collin L. Walling
2018-02-07 21:42     ` David Hildenbrand
2018-02-07 11:46 ` [PATCH RFC 3/6] KVM: s390: consider epoch index on hotplugged CPUs David Hildenbrand
2018-02-15 13:09   ` Cornelia Huck
2018-02-16  9:50   ` Christian Borntraeger
2018-02-07 11:46 ` [PATCH RFC 4/6] KVM: s390: consider epoch index on TOD clock syncs David Hildenbrand
2018-02-07 20:08   ` Collin L. Walling
2018-02-07 21:35     ` David Hildenbrand
2018-02-07 22:43       ` Collin L. Walling
2018-02-08 12:15         ` David Hildenbrand
2018-02-07 11:46 ` [PATCH RFC 5/6] KVM: s390: no need to inititalize kvm->arch members to 0 David Hildenbrand
2018-02-15 13:25   ` Cornelia Huck
2018-02-07 11:46 ` [PATCH RFC 6/6] KVM: s390: generalize kvm_s390_get_tod_clock_ext() David Hildenbrand
2018-02-15 14:08   ` Cornelia Huck
2018-02-15 14:14     ` David Hildenbrand
2018-02-15 14:17       ` Cornelia Huck
2018-02-15 14:25         ` David Hildenbrand
2018-02-07 11:50 ` [PATCH RFC 0/6] KVM: s390: Multiple-epoch facility fixes David Hildenbrand
     [not found] <b51c6b10-c0c0-2dae-3d74-7c21820d28ce@redhat.com>
2018-02-20 19:06 ` [PATCH RFC 2/6] KVM: s390: provide only a single function for setting the tod Christian Borntraeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).