[Qemu-devel] [PATCH v2 0/7] s390x: TOD refactoring + TCG CPU hotplug support

David Hildenbrand posted 7 patches 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180620100825.22476-1-david@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
There is a newer version of this series
hw/s390x/Makefile.objs     |   3 +
hw/s390x/s390-virtio-ccw.c |  57 +---------------
hw/s390x/tod-kvm.c         |  64 ++++++++++++++++++
hw/s390x/tod-qemu.c        |  85 ++++++++++++++++++++++++
hw/s390x/tod.c             | 131 +++++++++++++++++++++++++++++++++++++
include/hw/s390x/tod.h     |  65 ++++++++++++++++++
target/s390x/Makefile.objs |   1 +
target/s390x/cpu.c         |  51 ++-------------
target/s390x/cpu.h         |   4 --
target/s390x/helper.h      |   1 +
target/s390x/insn-data.def |   3 +-
target/s390x/internal.h    |  15 -----
target/s390x/kvm_s390x.h   |   2 +
target/s390x/machine.c     |   6 ++
target/s390x/misc_helper.c |  60 +++++++++++++++--
target/s390x/tcg-stub.c    |  20 ++++++
target/s390x/tcg_s390x.h   |  18 +++++
target/s390x/translate.c   |   9 +++
18 files changed, 468 insertions(+), 127 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
[Qemu-devel] [PATCH v2 0/7] s390x: TOD refactoring + TCG CPU hotplug support
Posted by David Hildenbrand 5 years, 10 months ago
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 fist patch also refactors TOD handling for KVM (moved into a new
TOD device).

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 (7):
  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        |  85 ++++++++++++++++++++++++
 hw/s390x/tod.c             | 131 +++++++++++++++++++++++++++++++++++++
 include/hw/s390x/tod.h     |  65 ++++++++++++++++++
 target/s390x/Makefile.objs |   1 +
 target/s390x/cpu.c         |  51 ++-------------
 target/s390x/cpu.h         |   4 --
 target/s390x/helper.h      |   1 +
 target/s390x/insn-data.def |   3 +-
 target/s390x/internal.h    |  15 -----
 target/s390x/kvm_s390x.h   |   2 +
 target/s390x/machine.c     |   6 ++
 target/s390x/misc_helper.c |  60 +++++++++++++++--
 target/s390x/tcg-stub.c    |  20 ++++++
 target/s390x/tcg_s390x.h   |  18 +++++
 target/s390x/translate.c   |   9 +++
 18 files changed, 468 insertions(+), 127 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

-- 
2.17.1