Skip to content

RFC KVM: s390: Multiple-epoch facility fixes

David Hildenbrand kvm linux-s390 stable 1 version Applied

Status from this message: Thanks applied. Deserves a cc stable I think.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 27 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: s390: take care of clock-comparator sign controlarch/s390/kvm/interrupt.c+19 -66 replies
2/6KVM: s390: provide only a single function for setting the todarch/s390/kvm/kvm-s390.c arch/s390/kvm/kvm-s390.h arch/s390/kvm/priv.c+22 -385 replies
3/6KVM: s390: consider epoch index on hotplugged CPUsarch/s390/kvm/kvm-s390.c+1 -04 replies
4/6KVM: s390: consider epoch index on TOD clock syncsarch/s390/kvm/kvm-s390.c+29 -36 replies
5/6KVM: s390: no need to inititalize kvm->arch members to 0arch/s390/kvm/kvm-s390.c+0 -81 reply
6/6KVM: s390: generalize kvm_s390_get_tod_clock_ext()arch/s390/kvm/kvm-s390.c+9 -134 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchCornelia HuckChristian Borntraeger
1/6R-b R-b R-b
2/6R-b R-b
3/6R-b R-b R-b R-b R-b
4/6R-b R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/6] KVM: s390: Multiple-epoch facility fixes

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(-)
Signature · 1 line
2.14.3