Skip to content

s390x: TOD refactoring + TCG CPU hotplug support

David Hildenbrand qemu-devel 4 versions – Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 1 replyApplied
  2. v39 patches 16 repliesSuperseded
  3. v27 patches 19 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches12 repliesSuperseded

Changes in v4 from the cover letter

- "s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*()" -- Added a note in the patch description as reuested
- "[PATCH v3 5/9] s390x/tcg: properly implement the TOD"
-- tod->low < td->base.low -> td->base.low > tod->low
-- access td->base.low directly in sckc handler

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/9s390x/tcg: avoid overflows in time2tod/tod2timetarget/s390x/internal.h+3 -20 replies
2/9s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*()target/s390x/cpu.c target/s390x/kvm-stub.c target/s390x/kvm.c +1 more+12 -120 replies
3/9s390x/tod: factor out TOD into separate devicehw/s390x/Makefile.objs hw/s390x/s390-virtio-ccw.c hw/s390x/tod-kvm.c +6 more+286 -880 replies
4/9s390x/tcg: drop tod_basetimetarget/s390x/cpu.c target/s390x/cpu.h target/s390x/misc_helper.c+2 -40 replies
5/9s390x/tcg: properly implement the TODhw/s390x/tod-qemu.c hw/s390x/tod.c include/hw/s390x/tod.h +5 more+109 -340 replies
6/9s390x/tcg: SET CLOCK COMPARATOR can clear CKC interruptstarget/s390x/misc_helper.c+7 -00 replies
7/9s390x/tcg: implement SET CLOCKtarget/s390x/helper.h target/s390x/insn-data.def target/s390x/misc_helper.c +1 more+27 -20 replies
8/9s390x/tcg: rearm the CKC timer during migrationtarget/s390x/Makefile.objs target/s390x/machine.c target/s390x/tcg-stub.c+27 -00 replies
9/9s390x/tcg: fix CPU hotplug with single-threaded TCGtarget/s390x/cpu.c+12 -50 replies

Reviews trailers per patch

8 of 9 patches have a Reviewed-by or Acked-by.

PatchThomas Huth
1/9R-b
2/9
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9A-b
8/9R-b
9/9R-b

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

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/9] s390x: TOD refactoring + TCG CPU hotplug support

The TOD in TCG is not handled correctly:
- each CPU has its own TOD based on CPU creation time vs. a system TOD
- TOD is not migrated
- TOD timer is not restarted during migration
- CKC interrupts/TOD timer is not cleared when resetting the CKC

This (and a cpu creation problem for single threaded TCG) currently made CPU hotplug under TCG not work. Now it's working

The third patch also refactors TOD handling for KVM (moved into a new TOD device). The second patch makes sure that we can use a const pointer for the new TOD clock struct.

v3 -> v4:
- "s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*()" -- Added a note in the patch description as reuested
- "[PATCH v3 5/9] s390x/tcg: properly implement the TOD"
-- tod->low < td->base.low -> td->base.low > tod->low
-- access td->base.low directly in sckc handler

v2 -> v3:
- added "s390x/tcg: avoid overflows in time2tod/tod2time"
- added "s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*()"
- "s390x/tod: factor out TOD into separate device"
-- Use "const" for parameters in function definitions
-- Use "s390-tod-qemu" and "s390-tod-kvm" as type names
-- Drop hotpluggable=false
- "s390x/tcg: properly implement the TOD"
-- s390_get_tod() -> s390_get_todstate()
-- use error_abort
- "s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts"
-- Add a comment for the -1ULL check
- "s390x/tcg: implement SET CLOCK"
-- use error_abort
- "s390x/tcg: fix CPU hotplug with single-threaded TCG"
-- add a comment describing the run_on_cpu() difference

v1 -> v2:
- "s390x/tcg: properly implement the TOD" -- introduce "tcg_s390x.h" similar to "kvm_s390x.h" -- dropped one unnecessary include introduction
- "s390x/tcg: rearm the CKC timer during migration" -- introduce "tcg-stub.c" similar to "kvm-stub.c"

David Hildenbrand (9):
s390x/tcg: avoid overflows in time2tod/tod2time s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*() s390x/tod: factor out TOD into separate device
s390x/tcg: drop tod_basetime
s390x/tcg: properly implement the TOD
s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts s390x/tcg: implement SET CLOCK
s390x/tcg: rearm the CKC timer during migration s390x/tcg: fix CPU hotplug with single-threaded TCG

 hw/s390x/Makefile.objs     |   3 +
 hw/s390x/s390-virtio-ccw.c |  57 +---------------
 hw/s390x/tod-kvm.c         |  64 ++++++++++++++++++
 hw/s390x/tod-qemu.c        |  87 +++++++++++++++++++++++++
 hw/s390x/tod.c             | 130 +++++++++++++++++++++++++++++++++++++
 include/hw/s390x/tod.h     |  65 +++++++++++++++++++
 target/s390x/Makefile.objs |   1 +
 target/s390x/cpu.c         |  57 ++++------------
 target/s390x/cpu.h         |   4 --
 target/s390x/helper.h      |   1 +
 target/s390x/insn-data.def |   3 +-
 target/s390x/internal.h    |  15 -----
 target/s390x/kvm-stub.c    |   4 +-
 target/s390x/kvm.c         |  12 ++--
 target/s390x/kvm_s390x.h   |   6 +-
 target/s390x/machine.c     |   6 ++
 target/s390x/misc_helper.c |  50 ++++++++++++--
 target/s390x/tcg-stub.c    |  20 ++++++
 target/s390x/tcg_s390x.h   |  18 +++++
 target/s390x/translate.c   |   9 +++
 20 files changed, 475 insertions(+), 137 deletions(-)
 create mode 100644 hw/s390x/tod-kvm.c
 create mode 100644 hw/s390x/tod-qemu.c
 create mode 100644 hw/s390x/tod.c
 create mode 100644 include/hw/s390x/tod.h
 create mode 100644 target/s390x/tcg-stub.c
 create mode 100644 target/s390x/tcg_s390x.h
Signature · 1 line
2.17.1