s390x cleanup
cover s390x cleanup
Hi, I am starting a cleanup series for s390x,
with the goal of doing similar splits of KVM vs TCG, sysemu vs user mode, as for the existing work on x86 and ARM.
S/390 target looks very good already, and seems much easier to work with. I hope that with some patches it will be even better.
I will pile up more patches later on, but I start sharing something here with these few RFC patches for your eyes,
they are based on the pre-requisite series:
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg07461.html
Motivation and higher level steps:
https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg04628.html
Comments welcome, thanks,
Claudio
Claudio Fontana (5):
hw/s390x: only build qemu-tod from the CONFIG_TCG build target/s390x: start moving TCG-only code to tcg/ target/s390x: move sysemu-only code out to cpu-sysemu.c target/s390x: split cpu-dump from helper.c target/s390x: make helper.c sysemu-only
include/hw/s390x/tod.h | 2 +-
target/s390x/{internal.h => s390x-internal.h} | 6 +
target/s390x/{ => tcg}/s390-tod.h | 0
target/s390x/{ => tcg}/tcg_s390x.h | 0
target/s390x/{ => tcg}/vec.h | 0
hw/s390x/tod-qemu.c | 2 +-
hw/s390x/tod.c | 9 +-
target/s390x/arch_dump.c | 2 +-
target/s390x/cpu-dump.c | 131 ++++++++
target/s390x/cpu-sysemu.c | 304 ++++++++++++++++++
target/s390x/cpu.c | 285 +---------------
target/s390x/cpu_models.c | 2 +-
target/s390x/diag.c | 2 +-
target/s390x/gdbstub.c | 2 +-
target/s390x/helper.c | 113 +------
target/s390x/interrupt.c | 4 +-
target/s390x/ioinst.c | 2 +-
target/s390x/kvm.c | 2 +-
target/s390x/machine.c | 4 +-
target/s390x/mmu_helper.c | 2 +-
target/s390x/sigp.c | 2 +-
target/s390x/tcg-stub.c | 30 --
target/s390x/{ => tcg}/cc_helper.c | 2 +-
target/s390x/{ => tcg}/crypto_helper.c | 2 +-
target/s390x/{ => tcg}/excp_helper.c | 2 +-
target/s390x/{ => tcg}/fpu_helper.c | 2 +-
target/s390x/{ => tcg}/int_helper.c | 2 +-
target/s390x/{ => tcg}/mem_helper.c | 2 +-
target/s390x/{ => tcg}/misc_helper.c | 2 +-
target/s390x/{ => tcg}/translate.c | 2 +-
target/s390x/{ => tcg}/vec_fpu_helper.c | 2 +-
target/s390x/{ => tcg}/vec_helper.c | 2 +-
target/s390x/{ => tcg}/vec_int_helper.c | 0
target/s390x/{ => tcg}/vec_string_helper.c | 2 +-
target/s390x/{ => tcg}/translate_vx.c.inc | 0
hw/s390x/meson.build | 5 +-
target/s390x/meson.build | 21 +-
target/s390x/{ => tcg}/insn-data.def | 0
target/s390x/{ => tcg}/insn-format.def | 0
target/s390x/tcg/meson.build | 14 +
target/s390x/trace-events | 2 +-
41 files changed, 512 insertions(+), 458 deletions(-)
rename target/s390x/{internal.h => s390x-internal.h} (98%)
rename target/s390x/{ => tcg}/s390-tod.h (100%)
rename target/s390x/{ => tcg}/tcg_s390x.h (100%)
rename target/s390x/{ => tcg}/vec.h (100%)
create mode 100644 target/s390x/cpu-dump.c
create mode 100644 target/s390x/cpu-sysemu.c
delete mode 100644 target/s390x/tcg-stub.c
rename target/s390x/{ => tcg}/cc_helper.c (99%)
rename target/s390x/{ => tcg}/crypto_helper.c (98%)
rename target/s390x/{ => tcg}/excp_helper.c (99%)
rename target/s390x/{ => tcg}/fpu_helper.c (99%)
rename target/s390x/{ => tcg}/int_helper.c (99%)
rename target/s390x/{ => tcg}/mem_helper.c (99%)
rename target/s390x/{ => tcg}/misc_helper.c (99%)
rename target/s390x/{ => tcg}/translate.c (99%)
rename target/s390x/{ => tcg}/vec_fpu_helper.c (99%)
rename target/s390x/{ => tcg}/vec_helper.c (99%)
rename target/s390x/{ => tcg}/vec_int_helper.c (100%)
rename target/s390x/{ => tcg}/vec_string_helper.c (99%)
rename target/s390x/{ => tcg}/translate_vx.c.inc (100%)
rename target/s390x/{ => tcg}/insn-data.def (100%)
rename target/s390x/{ => tcg}/insn-format.def (100%)
create mode 100644 target/s390x/tcg/meson.buildSignature · 1 line
2.26.2
RFC 1/5 hw/s390x: only build qemu-tod from the CONFIG_TCG build
this allows to remove unneeded stubs for target/s390x.
--- hw/s390x/tod.c | 9 ++++++++- hw/s390x/meson.build | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-)
hw/s390x/tod.c +8 -1
@@ -14,6 +14,8 @@#include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "sysemu/qtest.h" #include "migration/qemu-file-types.h" #include "migration/register.h"
@@ -23,8 +25,13 @@ void s390_init_tod(void)if (kvm_enabled ()) { obj =object_new (TYPE_KVM_S390_TOD ); - }else { + }else if (tcg_enabled ()) { obj =object_new (TYPE_QEMU_S390_TOD ); + }else if (qtest_enabled ()) { +return ; + }else { +warn_report ("current accelerator not handled in s390_init_tod!" ); +return ; }object_property_add_child (qdev_get_machine (),TYPE_S390_TOD , obj);object_unref (obj);
hw/s390x/meson.build +4 -1
@@ -16,7 +16,6 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c', +)) + s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c')) s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c')) s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c'))
Signature · 1 line
2.26.2
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Quoted 1 line · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
this allows to remove unneeded stubs for target/s390x.
This patch doesn't seem to remove any, though?
Quoted 22 lines
Signed-off-by Claudio Fontana <[email protected]>--- hw/s390x/tod.c | 9 ++++++++- hw/s390x/meson.build | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-)hw/s390x/tod.c +2
-0@@ -14,6 +14,8 @@#include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "sysemu/qtest.h" #include "migration/qemu-file-types.h" #include "migration/register.h" @@ -23,8 +25,13 @@ void s390_init_tod(void)
hw/s390x/tod.c void s390_init_tod(void) · line 34
Quoted 10 lines
hw/s390x/tod.c +6
-1if (kvm_enabled ()) { obj =object_new (TYPE_KVM_S390_TOD ); - }else { + }else if (tcg_enabled ()) { obj =object_new (TYPE_QEMU_S390_TOD ); + }else if (qtest_enabled ()) { +return ; + }else { +warn_report ("current accelerator not handled in s390_init_tod!" ); +return ;
I'm wondering whether this should be a fatal error.
Quoted 16 lines
hw/s390x/tod.c +0
-0}object_property_add_child (qdev_get_machine (),TYPE_S390_TOD , obj);object_unref (obj);hw/s390x/meson.build +0
-1@@ -16,7 +16,6 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 5 lines
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',
Should we rename this to tod-tcg.c?
Quoted 5 lines
hw/s390x/meson.build +2
-0+)) + s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c')) s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c')) s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c'))
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Hi Cornelia,
Quoted 6 lines · Cornelia Huck
Quoted 1 line · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
this allows to remove unneeded stubs for target/s390x.
This patch doesn't seem to remove any, though?
The next patch does... I'll split more the patches so it becomes clearer.
Quoted 23 lines
Quoted 23 lines
Signed-off-by Claudio Fontana <[email protected]>--- hw/s390x/tod.c | 9 ++++++++- hw/s390x/meson.build | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-)hw/s390x/tod.c +2
-0@@ -14,6 +14,8 @@#include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "sysemu/qtest.h" #include "migration/qemu-file-types.h" #include "migration/register.h" @@ -23,8 +25,13 @@ void s390_init_tod(void)
Quoted 12 lines
hw/s390x/tod.c void s390_init_tod(void) · line 34
Quoted 10 lines
hw/s390x/tod.c +6
-1if (kvm_enabled ()) { obj =object_new (TYPE_KVM_S390_TOD ); - }else { + }else if (tcg_enabled ()) { obj =object_new (TYPE_QEMU_S390_TOD ); + }else if (qtest_enabled ()) { +return ; + }else { +warn_report ("current accelerator not handled in s390_init_tod!" ); +return ;I'm wondering whether this should be a fatal error.
I would agree with that.
Quoted 16 lines
Quoted 16 lines
hw/s390x/tod.c +0
-0}object_property_add_child (qdev_get_machine (),TYPE_S390_TOD , obj);object_unref (obj);hw/s390x/meson.build +0
-1@@ -16,7 +16,6 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files(
Quoted 8 lines
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 6 lines
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',Should we rename this to
tod-tcg.c?
I think so.
Quoted 8 lines
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 33
Quoted 6 lines
hw/s390x/meson.build +2
-0+)) + s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c')) s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c')) s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c'))
Will prepare a new version,
Thanks,
Claudio
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Quoted 75 lines · Claudio Fontana
Hi Cornelia,
Quoted 6 lines · Cornelia Huck
Quoted 1 line · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
this allows to remove unneeded stubs for target/s390x.
This patch doesn't seem to remove any, though?
The next patch does... I'll split more the patches so it becomes clearer.
Quoted 23 lines
Quoted 23 lines
Signed-off-by Claudio Fontana <[email protected]>--- hw/s390x/tod.c | 9 ++++++++- hw/s390x/meson.build | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-)hw/s390x/tod.c +2
-0@@ -14,6 +14,8 @@#include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" +#include "sysemu/qtest.h" #include "migration/qemu-file-types.h" #include "migration/register.h" @@ -23,8 +25,13 @@ void s390_init_tod(void)Quoted 12 lines
hw/s390x/tod.c void s390_init_tod(void) · line 34
Quoted 10 lines
hw/s390x/tod.c +6
-1if (kvm_enabled ()) { obj =object_new (TYPE_KVM_S390_TOD ); - }else { + }else if (tcg_enabled ()) { obj =object_new (TYPE_QEMU_S390_TOD ); + }else if (qtest_enabled ()) { +return ; + }else { +warn_report ("current accelerator not handled in s390_init_tod!" ); +return ;I'm wondering whether this should be a fatal error.
I would agree with that.
Quoted 16 lines
Quoted 16 lines
hw/s390x/tod.c +0
-0}object_property_add_child (qdev_get_machine (),TYPE_S390_TOD , obj);object_unref (obj);hw/s390x/meson.build +0
-1@@ -16,7 +16,6 @@ s390x_ss.add(files( 'sclp.c', 'sclpcpu.c', 'sclpquiesce.c', - 'tod-qemu.c', 'tod.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files(Quoted 8 lines
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 6 lines
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',Should we rename this to
tod-tcg.c?
Quoted 1 line
I think so.
Here we are a bit limited though by the fact that the object is currently called:
include/hw/s390x/tod.h:26:#define TYPE_QEMU_S390_TOD TYPE_S390_TOD "-qemu"
So there might be a compatibility issue in trying to make this consistent, which would mean to replace this with:
#define TYPE_TCG_S390_TOD TYPE_S390_TOD "-tcg"
What do you think?
Quoted 16 lines
Quoted 9 lines
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 33
Quoted 7 lines
hw/s390x/meson.build +2
-0+)) + s390x_ss.add(when: 'CONFIG_S390_CCW_VIRTIO', if_true: files('s390-virtio-ccw.c')) s390x_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('3270-ccw.c')) s390x_ss.add(when: 'CONFIG_VFIO', if_true: files('s390-pci-vfio.c'))Will prepare a new version,
Thanks,
Claudio
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Quoted 20 lines · On Mon, 19 Apr 2021 18:12:48 +0200 Claudio Fontana <[email protected]> wrote:
Quoted 15 lines · Claudio Fontana
Hi Cornelia,
Quoted 11 lines · Cornelia Huck
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 6 lines · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',Should we rename this to
tod-tcg.c?Quoted 1 line
I think so.
Here we are a bit limited though by the fact that the object is currently called:
Quoted 7 lines
include/hw/s390x/tod.h:26:#define
TYPE_QEMU_S390_TODTYPE_S390_TOD"-qemu"So there might be a compatibility issue in trying to make this consistent, which would mean to replace this with:
#define
TYPE_TCG_S390_TODTYPE_S390_TOD"-tcg"What do you think?
How visible is this? I don't think the TOD objects are instantiable by the user.
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Quoted 25 lines · Cornelia Huck
Quoted 22 lines · On Mon, 19 Apr 2021 18:12:48 +0200 Claudio Fontana <[email protected]> wrote:
Quoted 15 lines · Claudio Fontana
Hi Cornelia,
Quoted 11 lines · Cornelia Huck
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 6 lines · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',Should we rename this to
tod-tcg.c?Quoted 1 line
I think so.
Here we are a bit limited though by the fact that the object is currently called:
include/hw/s390x/tod.h:26:#define
TYPE_QEMU_S390_TODTYPE_S390_TOD"-qemu"
Quoted 9 lines
Quoted 5 lines
So there might be a compatibility issue in trying to make this consistent, which would mean to replace this with:
#define
TYPE_TCG_S390_TODTYPE_S390_TOD"-tcg"What do you think?
How visible is this? I don't think the TOD objects are instantiable by the user.
I just remember we were very conservative with the object hierarchy on x86, personally I am fine with the change. I will add this change then, I'd ask for people with concerns about this to speak up:
(Paolo?)
Ciao,
CLaudio
Re: [RFC v1 1/5] hw/s390x: only build qemu-tod from the CONFIG_TCG build
Quoted 36 lines · On Mon, 19 Apr 2021 18:24:34 +0200 Claudio Fontana <[email protected]> wrote:
Quoted 25 lines · Cornelia Huck
Quoted 22 lines · On Mon, 19 Apr 2021 18:12:48 +0200 Claudio Fontana <[email protected]> wrote:
Quoted 15 lines · Claudio Fontana
Hi Cornelia,
Quoted 11 lines · Cornelia Huck
hw/s390x/meson.build s390x_ss.add(when: 'CONFIG_KVM', if_true: files( · line 28
Quoted 6 lines · On Mon, 22 Mar 2021 20:15:47 +0100 Claudio Fontana <[email protected]> wrote:
hw/s390x/meson.build +2
-0@@ -25,6 +24,10 @@ s390x_ss.add(when: 'CONFIG_KVM', if_true: files( 's390-stattrib-kvm.c', 'pv.c', )) +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'tod-qemu.c',Should we rename this to
tod-tcg.c?Quoted 1 line
I think so.
Here we are a bit limited though by the fact that the object is currently called:
include/hw/s390x/tod.h:26:#define
TYPE_QEMU_S390_TODTYPE_S390_TOD"-qemu"Quoted 9 lines
Quoted 5 lines
So there might be a compatibility issue in trying to make this consistent, which would mean to replace this with:
#define
TYPE_TCG_S390_TODTYPE_S390_TOD"-tcg"What do you think?
How visible is this? I don't think the TOD objects are instantiable by the user.
Quoted 9 lines
I just remember we were very conservative with the object hierarchy on x86, personally I am fine with the change. I will add this change then, I'd ask for people with concerns about this to speak up:
(Paolo?)
Ciao,
CLaudio
It was more an argument against changing it, because most people won't see it anyway :)
RFC 2/5 target/s390x: start moving TCG-only code to tcg/
In reply to Claudio Fontanamove everything related to translate, as well as HELPER code in tcg/
mmu_helper.c stays put for now, as it contains both TCG and KVM code.
removed the tcg-stub.c file, as it seems unnecessary, due to all calls being wrapped by if (tcg_enabled()), and the prototype being available.
The internal.h file is renamed to s390x-internal.h, because from inside tcg/ , the name collides with other files called the same way (accel/tcg/internal.h).
---
include/hw/s390x/tod.h | 2 +-
target/s390x/{internal.h => s390x-internal.h} | 0
target/s390x/{ => tcg}/s390-tod.h | 0
target/s390x/{ => tcg}/tcg_s390x.h | 0
target/s390x/{ => tcg}/vec.h | 0
hw/s390x/tod-qemu.c | 2 +-
target/s390x/arch_dump.c | 2 +-
target/s390x/cpu.c | 2 +-
target/s390x/cpu_models.c | 2 +-
target/s390x/diag.c | 2 +-
target/s390x/gdbstub.c | 2 +-
target/s390x/helper.c | 2 +-
target/s390x/interrupt.c | 4 +--
target/s390x/ioinst.c | 2 +-
target/s390x/kvm.c | 2 +-
target/s390x/machine.c | 4 +--
target/s390x/mmu_helper.c | 2 +-
target/s390x/sigp.c | 2 +-
target/s390x/tcg-stub.c | 30 -------------------
target/s390x/{ => tcg}/cc_helper.c | 2 +-
target/s390x/{ => tcg}/crypto_helper.c | 2 +-
target/s390x/{ => tcg}/excp_helper.c | 2 +-
target/s390x/{ => tcg}/fpu_helper.c | 2 +-
target/s390x/{ => tcg}/int_helper.c | 2 +-
target/s390x/{ => tcg}/mem_helper.c | 2 +-
target/s390x/{ => tcg}/misc_helper.c | 2 +-
target/s390x/{ => tcg}/translate.c | 2 +-
target/s390x/{ => tcg}/vec_fpu_helper.c | 2 +-
target/s390x/{ => tcg}/vec_helper.c | 2 +-
target/s390x/{ => tcg}/vec_int_helper.c | 0
target/s390x/{ => tcg}/vec_string_helper.c | 2 +-
target/s390x/{ => tcg}/translate_vx.c.inc | 0
target/s390x/meson.build | 17 ++---------
target/s390x/{ => tcg}/insn-data.def | 0
target/s390x/{ => tcg}/insn-format.def | 0
target/s390x/tcg/meson.build | 14 +++++++++
36 files changed, 43 insertions(+), 72 deletions(-)
rename target/s390x/{internal.h => s390x-internal.h} (100%)
rename target/s390x/{ => tcg}/s390-tod.h (100%)
rename target/s390x/{ => tcg}/tcg_s390x.h (100%)
rename target/s390x/{ => tcg}/vec.h (100%)
delete mode 100644 target/s390x/tcg-stub.c
rename target/s390x/{ => tcg}/cc_helper.c (99%)
rename target/s390x/{ => tcg}/crypto_helper.c (98%)
rename target/s390x/{ => tcg}/excp_helper.c (99%)
rename target/s390x/{ => tcg}/fpu_helper.c (99%)
rename target/s390x/{ => tcg}/int_helper.c (99%)
rename target/s390x/{ => tcg}/mem_helper.c (99%)
rename target/s390x/{ => tcg}/misc_helper.c (99%)
rename target/s390x/{ => tcg}/translate.c (99%)
rename target/s390x/{ => tcg}/vec_fpu_helper.c (99%)
rename target/s390x/{ => tcg}/vec_helper.c (99%)
rename target/s390x/{ => tcg}/vec_int_helper.c (100%)
rename target/s390x/{ => tcg}/vec_string_helper.c (99%)
rename target/s390x/{ => tcg}/translate_vx.c.inc (100%)
rename target/s390x/{ => tcg}/insn-data.def (100%)
rename target/s390x/{ => tcg}/insn-format.def (100%)
create mode 100644 target/s390x/tcg/meson.buildinclude/hw/s390x/tod.h +1 -1
@@ -12,7 +12,7 @@#define HW_S390_TOD_H #include "hw/qdev-core.h" -#include "target/s390x/s390-tod.h" +#include "tcg/s390-tod.h" #include "qom/object.h" typedef struct S390TOD {
target/s390x/s390x-internal.h renamed from target/s390x/internal.h +0 -0
target/s390x/tcg/s390-tod.h renamed from target/s390x/s390-tod.h +0 -0
target/s390x/tcg/tcg_s390x.h renamed from target/s390x/tcg_s390x.h +0 -0
target/s390x/tcg/vec.h renamed from target/s390x/vec.h +0 -0
hw/s390x/tod-qemu.c +1 -1
@@ -16,7 +16,7 @@#include "qemu/cutils.h" #include "qemu/module.h" #include "cpu.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" static void qemu_s390_tod_get (const S390TODState *td,S390TOD *tod,Error **errp)
target/s390x/arch_dump.c +1 -1
@@ -13,7 +13,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "elf.h" #include "sysemu/dump.h"
target/s390x/cpu.c +1 -1
@@ -23,7 +23,7 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/reset.h"
target/s390x/cpu_models.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h"
target/s390x/diag.c +1 -1
@@ -14,7 +14,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/address-spaces.h" #include "hw/watchdog/wdt_diag288.h" #include "sysemu/cpus.h"
target/s390x/gdbstub.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" #include "qemu/bitops.h"
target/s390x/helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/gdbstub.h" #include "qemu/timer.h" #include "qemu/qemu-print.h"
target/s390x/interrupt.c +2 -2
@@ -11,12 +11,12 @@#include "qemu/log.h" #include "cpu.h" #include "kvm_s390x.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/exec-all.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h" #include "hw/s390x/ioinst.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" #if !defined(CONFIG_USER_ONLY )#include "hw/s390x/s390_flic.h" #endif
target/s390x/ioinst.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "hw/s390x/ioinst.h" #include "trace.h" #include "hw/s390x/s390-pci-bus.h"
target/s390x/kvm.c +1 -1
@@ -26,7 +26,7 @@#include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm_int.h" #include "qemu/cutils.h"
target/s390x/machine.c +2 -2
@@ -16,10 +16,10 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "migration/vmstate.h" -#include "tcg_s390x.h" +#include "tcg/tcg_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h"
target/s390x/mmu_helper.c +1 -1
@@ -19,7 +19,7 @@#include "qemu/error-report.h" #include "exec/address-spaces.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "kvm_s390x.h" #include "sysemu/kvm.h" #include "sysemu/tcg.h"
target/s390x/sigp.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" #include "exec/address-spaces.h"
target/s390x/tcg-stub.c deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* QEMU TCG support -- s390x specific function stubs. -* -* Copyright (C) 2018 Red Hat Inc -* -* Authors: -* David Hildenbrand <[email protected]> -* -* This work is licensed under the terms of the GNU GPL, version 2 or later. -* See the COPYING file in the top-level directory. -*/ - -#include "qemu/osdep.h" -#include "qemu-common.h" -#include "cpu.h" -#include "tcg_s390x.h" - -void tcg_s390_tod_updated (CPUState *cs,run_on_cpu_data opaque) -{ -} -void QEMU_NORETURN tcg_s390_program_interrupt(CPUS390XState *env, -uint32_t code,uintptr_t ra) -{ -g_assert_not_reached (); -} -void QEMU_NORETURN tcg_s390_data_exception(CPUS390XState *env, uint32_t dxc, -uintptr_t ra) -{ -g_assert_not_reached (); -}
target/s390x/tcg/cc_helper.c renamed from target/s390x/cc_helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "exec/helper-proto.h"
target/s390x/tcg/crypto_helper.c renamed from target/s390x/crypto_helper.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/helper-proto.h" #include "exec/exec-all.h"
target/s390x/tcg/excp_helper.c renamed from target/s390x/excp_helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/helper-proto.h" #include "qemu/timer.h" #include "exec/exec-all.h"
target/s390x/tcg/fpu_helper.c renamed from target/s390x/fpu_helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h"
target/s390x/tcg/int_helper.c renamed from target/s390x/int_helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/exec-all.h" #include "qemu/host-utils.h"
target/s390x/tcg/mem_helper.c renamed from target/s390x/mem_helper.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "tcg_s390x.h" #include "exec/helper-proto.h" #include "exec/exec-all.h"
target/s390x/tcg/misc_helper.c renamed from target/s390x/misc_helper.c +1 -1
@@ -22,7 +22,7 @@#include "qemu/cutils.h" #include "qemu/main-loop.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h"
target/s390x/tcg/translate.c renamed from target/s390x/translate.c +1 -1
@@ -30,7 +30,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h"
target/s390x/tcg/vec_fpu_helper.c renamed from target/s390x/vec_fpu_helper.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg_s390x.h" #include "tcg/tcg-gvec-desc.h"
target/s390x/tcg/vec_helper.c renamed from target/s390x/vec_helper.c +1 -1
@@ -11,7 +11,7 @@*/ #include "qemu/osdep.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h"
target/s390x/tcg/vec_int_helper.c renamed from target/s390x/vec_int_helper.c +0 -0
target/s390x/tcg/vec_string_helper.c renamed from target/s390x/vec_string_helper.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" -#include "internal.h" +#include "s390x-internal.h" #include "vec.h" #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h"
target/s390x/tcg/translate_vx.c.inc renamed from target/s390x/translate_vx.c.inc +0 -0
target/s390x/meson.build +2 -15
@@ -8,21 +8,6 @@ s390x_ss.add(files( 'interrupt.c', )) -s390x_ss.add(when: 'CONFIG_TCG', if_true: files( - 'cc_helper.c', - 'crypto_helper.c', - 'excp_helper.c', - 'fpu_helper.c', - 'int_helper.c', - 'mem_helper.c', - 'misc_helper.c', - 'translate.c', - 'vec_fpu_helper.c', - 'vec_helper.c', - 'vec_int_helper.c', - 'vec_string_helper.c', -), if_false: files('tcg-stub.c')) - s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) gen_features = executable('gen-features', 'gen-features.c', native: true,
@@ -60,6 +45,8 @@ endif s390x_user_ss = ss.source_set() +subdir('tcg') + target_arch += {'s390x': s390x_ss} target_softmmu_arch += {'s390x': s390x_softmmu_ss} target_user_arch += {'s390x': s390x_user_ss}
target/s390x/tcg/insn-data.def renamed from target/s390x/insn-data.def +0 -0
target/s390x/tcg/insn-format.def renamed from target/s390x/insn-format.def +0 -0
target/s390x/tcg/meson.build new file +14 -0
@@ -0,0 +1,14 @@ +s390x_ss.add(when: 'CONFIG_TCG', if_true: files( + 'cc_helper.c', + 'crypto_helper.c', + 'excp_helper.c', + 'fpu_helper.c', + 'int_helper.c', + 'mem_helper.c', + 'misc_helper.c', + 'translate.c', + 'vec_fpu_helper.c', + 'vec_helper.c', + 'vec_int_helper.c', + 'vec_string_helper.c', +))
Signature · 1 line
2.26.2
RFC 3/5 target/s390x: move sysemu-only code out to cpu-sysemu.c
In reply to Claudio Fontana--- target/s390x/s390x-internal.h | 6 + target/s390x/cpu-sysemu.c | 304 ++++++++++++++++++++++++++++++++++ target/s390x/cpu.c | 283 ++----------------------------- target/s390x/meson.build | 1 + target/s390x/trace-events | 2 +- 5 files changed, 324 insertions(+), 272 deletions(-) create mode 100644 target/s390x/cpu-sysemu.c
target/s390x/s390x-internal.h +6 -0
@@ -244,6 +244,12 @@ void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr);#ifndef CONFIG_USER_ONLY unsigned int s390_cpu_halt (S390CPU *cpu);void s390_cpu_unhalt (S390CPU *cpu); +void s390_cpu_init_sysemu (Object *obj); +bool s390_cpu_realize_sysemu (DeviceState *dev,Error **errp); +void s390_cpu_finalize (Object *obj); +void s390_cpu_class_init_sysemu (CPUClass *cc); +void s390_cpu_machine_reset_cb (void *opaque); +#else static inline unsigned int s390_cpu_halt (S390CPU *cpu) {
target/s390x/cpu-sysemu.c new file +304 -0
304 lines not on this page · raw message
target/s390x/cpu.c +12 -271
367 lines not on this page · raw message
target/s390x/meson.build +1 -0
@@ -28,6 +28,7 @@ s390x_softmmu_ss.add(files( 'machine.c', 'mmu_helper.c', 'sigp.c', + 'cpu-sysemu.c', )) # Newer kernels on s390 check for an S390_PGSTE program header and
target/s390x/trace-events +1 -1
@@ -16,7 +16,7 @@ kvm_clear_cmma(int rc) "CMMA: clearing with result code %d" kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s" kvm_assign_subch_ioeventfd(int fd, uint32_t addr, bool assign, int datamatch) "fd: %d sch: @0x%x assign: %d vq: %d" -# cpu.c +# cpu-sysemu.c cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8 cpu_halt(int cpu_index) "halting cpu %d" cpu_unhalt(int cpu_index) "unhalting cpu %d"
Signature · 1 line
2.26.2
RFC 4/5 target/s390x: split cpu-dump from helper.c
In reply to Claudio Fontana--- target/s390x/cpu-dump.c | 131 +++++++++++++++++++++++++++++++++++++++ target/s390x/helper.c | 107 -------------------------------- target/s390x/meson.build | 1 + 3 files changed, 132 insertions(+), 107 deletions(-) create mode 100644 target/s390x/cpu-dump.c
target/s390x/cpu-dump.c new file +131 -0
@@ -0,0 +1,131 @@ +/* +* S/390 CPU dump to FILE +* +* Copyright (c) 2009 Ulrich Hecht +* Copyright (c) 2011 Alexander Graf +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, see <http://www.gnu.org/licenses/>. +* +*/ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "s390x-internal.h" +#include "qemu/qemu-print.h" + +void s390_cpu_dump_state (CPUState *cs,FILE *f,int flags) +{ +S390CPU *cpu =S390_CPU (cs); +CPUS390XState *env = &cpu->env; +int i; + +if (env->cc_op >3 ) { +qemu_fprintf (f,"PSW=mask %016" PRIx64" addr %016" PRIx64" cc %15s\n" , + env->psw.mask, env->psw.addr,cc_name (env->cc_op)); + }else { +qemu_fprintf (f,"PSW=mask %016" PRIx64" addr %016" PRIx64" cc %02x\n" , + env->psw.mask, env->psw.addr, env->cc_op); + } + +for (i =0 ; i <16 ; i++) { +qemu_fprintf (f,"R%02d=%016" PRIx64, i, env->regs[i]); +if ((i %4 ) ==3 ) { +qemu_fprintf (f,"\n" ); + }else { +qemu_fprintf (f," " ); + } + } + +if (flags &CPU_DUMP_FPU ) { +if (s390_has_feat (S390_FEAT_VECTOR )) { +for (i =0 ; i <32 ; i++) { +qemu_fprintf (f,"V%02d=%016" PRIx64"%016" PRIx64"%c" , + i, env->vregs[i][0 ], env->vregs[i][1 ], + i %2 ?'\n' :' ' ); + } + }else { +for (i =0 ; i <16 ; i++) { +qemu_fprintf (f,"F%02d=%016" PRIx64"%c" , + i, *get_freg (env, i), + (i %4 ) ==3 ?'\n' :' ' ); + } + } + } + +#ifndef CONFIG_USER_ONLY +for (i =0 ; i <16 ; i++) { +qemu_fprintf (f,"C%02d=%016" PRIx64, i, env->cregs[i]); +if ((i %4 ) ==3 ) { +qemu_fprintf (f,"\n" ); + }else { +qemu_fprintf (f," " ); + } + } +#endif + +#ifdef DEBUG_INLINE_BRANCHES +for (i =0 ; i <CC_OP_MAX ; i++) { +qemu_fprintf (f," %15s = %10ld\t%10ld\n" ,cc_name (i), + inline_branch_miss[i], inline_branch_hit[i]); + } +#endif + +qemu_fprintf (f,"\n" ); +} + +const char *cc_name (enum cc_op cc_op) +{ +static const char *const cc_names[] = { + [CC_OP_CONST0 ] ="CC_OP_CONST0" , + [CC_OP_CONST1 ] ="CC_OP_CONST1" , + [CC_OP_CONST2 ] ="CC_OP_CONST2" , + [CC_OP_CONST3 ] ="CC_OP_CONST3" , + [CC_OP_DYNAMIC ] ="CC_OP_DYNAMIC" , + [CC_OP_STATIC ] ="CC_OP_STATIC" , + [CC_OP_NZ ] ="CC_OP_NZ" , + [CC_OP_ADDU ] ="CC_OP_ADDU" , + [CC_OP_SUBU ] ="CC_OP_SUBU" , + [CC_OP_LTGT_32 ] ="CC_OP_LTGT_32" , + [CC_OP_LTGT_64 ] ="CC_OP_LTGT_64" , + [CC_OP_LTUGTU_32 ] ="CC_OP_LTUGTU_32" , + [CC_OP_LTUGTU_64 ] ="CC_OP_LTUGTU_64" , + [CC_OP_LTGT0_32 ] ="CC_OP_LTGT0_32" , + [CC_OP_LTGT0_64 ] ="CC_OP_LTGT0_64" , + [CC_OP_ADD_64 ] ="CC_OP_ADD_64" , + [CC_OP_SUB_64 ] ="CC_OP_SUB_64" , + [CC_OP_ABS_64 ] ="CC_OP_ABS_64" , + [CC_OP_NABS_64 ] ="CC_OP_NABS_64" , + [CC_OP_ADD_32 ] ="CC_OP_ADD_32" , + [CC_OP_SUB_32 ] ="CC_OP_SUB_32" , + [CC_OP_ABS_32 ] ="CC_OP_ABS_32" , + [CC_OP_NABS_32 ] ="CC_OP_NABS_32" , + [CC_OP_COMP_32 ] ="CC_OP_COMP_32" , + [CC_OP_COMP_64 ] ="CC_OP_COMP_64" , + [CC_OP_TM_32 ] ="CC_OP_TM_32" , + [CC_OP_TM_64 ] ="CC_OP_TM_64" , + [CC_OP_NZ_F32 ] ="CC_OP_NZ_F32" , + [CC_OP_NZ_F64 ] ="CC_OP_NZ_F64" , + [CC_OP_NZ_F128 ] ="CC_OP_NZ_F128" , + [CC_OP_ICM ] ="CC_OP_ICM" , + [CC_OP_SLA_32 ] ="CC_OP_SLA_32" , + [CC_OP_SLA_64 ] ="CC_OP_SLA_64" , + [CC_OP_FLOGR ] ="CC_OP_FLOGR" , + [CC_OP_LCBB ] ="CC_OP_LCBB" , + [CC_OP_VC ] ="CC_OP_VC" , + [CC_OP_MULS_32 ] ="CC_OP_MULS_32" , + [CC_OP_MULS_64 ] ="CC_OP_MULS_64" , + }; + +return cc_names[cc_op]; +}
target/s390x/helper.c +0 -107
116 lines not on this page · raw message
target/s390x/meson.build +1 -0
@@ -6,6 +6,7 @@ s390x_ss.add(files( 'gdbstub.c', 'helper.c', 'interrupt.c', + 'cpu-dump.c', )) s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
Signature · 1 line
2.26.2
RFC 5/5 target/s390x: make helper.c sysemu-only
In reply to Claudio FontanaNow that we have moved cpu-dump functionality out of helper.c, we can make the module sysemu-only.
--- target/s390x/helper.c | 4 ---- target/s390x/meson.build | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
target/s390x/helper.c +0 -4
@@ -27,11 +27,8 @@#include "hw/s390x/pv.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" -#ifndef CONFIG_USER_ONLY #include "sysemu/tcg.h" -#endif -#ifndef CONFIG_USER_ONLY void s390x_tod_timer (void *opaque) {cpu_inject_clock_comparator ((S390CPU *) opaque);
@@ -322,4 +319,3 @@ int s390_store_adtl_status(S390CPU *cpu, hwaddr addr, hwaddr len)cpu_physical_memory_unmap (sa, len,1 , len);return 0 ; } -#endif /* CONFIG_USER_ONLY */
target/s390x/meson.build +1 -1
@@ -4,7 +4,6 @@ s390x_ss.add(files( 'cpu_features.c', 'cpu_models.c', 'gdbstub.c', - 'helper.c', 'interrupt.c', 'cpu-dump.c', ))
@@ -23,6 +22,7 @@ s390x_ss.add(gen_features_h) s390x_softmmu_ss = ss.source_set() s390x_softmmu_ss.add(files( + 'helper.c', 'arch_dump.c', 'diag.c', 'ioinst.c',
Signature · 1 line
2.26.2
Quoted 3 lines · Claudio Fontana
Hi, I am starting a cleanup series for s390x,
with the goal of doing similar splits of KVM vs TCG,
One annoying thing is that it appears that the cpu accel model does not offer much in terms of refactoring and code simplification opportunities for s390x as-is, in particular for KVM.
It is possible that with quite some rework of the cpu_models code we could gain something,
so I will give it a try still, but for now adding the accel-cpu object does not suddenly provide nice low hanging fruits in terms of simplifications.
There are instead some good opportunities in terms of SYSEMU vs USER mode splits/beautification I think.
Ciao,
Claudio
Quoted 93 lines
sysemu vs user mode, as for the existing work on x86 and ARM.
S/390 target looks very good already, and seems much easier to work with. I hope that with some patches it will be even better.
I will pile up more patches later on, but I start sharing something here with these few RFC patches for your eyes,
they are based on the pre-requisite series:
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg07461.html
Motivation and higher level steps:
https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg04628.html
Comments welcome, thanks,
Claudio
Claudio Fontana (5):
hw/s390x: only build qemu-tod from theCONFIG_TCGbuild target/s390x: start moving TCG-only code to tcg/ target/s390x: move sysemu-only code out tocpu-sysemu.ctarget/s390x: split cpu-dump fromhelper.ctarget/s390x: makehelper.csysemu-onlyinclude/hw/s390x/tod.h | 2 +- target/s390x/{internal.h => s390x-internal.h} | 6 + target/s390x/{ => tcg}/s390-tod.h | 0 target/s390x/{ => tcg}/tcg_s390x.h | 0 target/s390x/{ => tcg}/vec.h | 0 hw/s390x/tod-qemu.c | 2 +- hw/s390x/tod.c | 9 +- target/s390x/arch_dump.c | 2 +- target/s390x/cpu-dump.c | 131 ++++++++ target/s390x/cpu-sysemu.c | 304 ++++++++++++++++++ target/s390x/cpu.c | 285 +--------------- target/s390x/cpu_models.c | 2 +- target/s390x/diag.c | 2 +- target/s390x/gdbstub.c | 2 +- target/s390x/helper.c | 113 +------ target/s390x/interrupt.c | 4 +- target/s390x/ioinst.c | 2 +- target/s390x/kvm.c | 2 +- target/s390x/machine.c | 4 +- target/s390x/mmu_helper.c | 2 +- target/s390x/sigp.c | 2 +- target/s390x/tcg-stub.c | 30 -- target/s390x/{ => tcg}/cc_helper.c | 2 +- target/s390x/{ => tcg}/crypto_helper.c | 2 +- target/s390x/{ => tcg}/excp_helper.c | 2 +- target/s390x/{ => tcg}/fpu_helper.c | 2 +- target/s390x/{ => tcg}/int_helper.c | 2 +- target/s390x/{ => tcg}/mem_helper.c | 2 +- target/s390x/{ => tcg}/misc_helper.c | 2 +- target/s390x/{ => tcg}/translate.c | 2 +- target/s390x/{ => tcg}/vec_fpu_helper.c | 2 +- target/s390x/{ => tcg}/vec_helper.c | 2 +- target/s390x/{ => tcg}/vec_int_helper.c | 0 target/s390x/{ => tcg}/vec_string_helper.c | 2 +- target/s390x/{ => tcg}/translate_vx.c.inc | 0 hw/s390x/meson.build | 5 +- target/s390x/meson.build | 21 +- target/s390x/{ => tcg}/insn-data.def | 0 target/s390x/{ => tcg}/insn-format.def | 0 target/s390x/tcg/meson.build | 14 + target/s390x/trace-events | 2 +- 41 files changed, 512 insertions(+), 458 deletions(-) rename target/s390x/{internal.h => s390x-internal.h} (98%) rename target/s390x/{ => tcg}/s390-tod.h (100%) rename target/s390x/{ => tcg}/tcg_s390x.h (100%) rename target/s390x/{ => tcg}/vec.h (100%) create mode 100644 target/s390x/cpu-dump.c create mode 100644 target/s390x/cpu-sysemu.c delete mode 100644 target/s390x/tcg-stub.c rename target/s390x/{ => tcg}/cc_helper.c (99%) rename target/s390x/{ => tcg}/crypto_helper.c (98%) rename target/s390x/{ => tcg}/excp_helper.c (99%) rename target/s390x/{ => tcg}/fpu_helper.c (99%) rename target/s390x/{ => tcg}/int_helper.c (99%) rename target/s390x/{ => tcg}/mem_helper.c (99%) rename target/s390x/{ => tcg}/misc_helper.c (99%) rename target/s390x/{ => tcg}/translate.c (99%) rename target/s390x/{ => tcg}/vec_fpu_helper.c (99%) rename target/s390x/{ => tcg}/vec_helper.c (99%) rename target/s390x/{ => tcg}/vec_int_helper.c (100%) rename target/s390x/{ => tcg}/vec_string_helper.c (99%) rename target/s390x/{ => tcg}/translate_vx.c.inc (100%) rename target/s390x/{ => tcg}/insn-data.def (100%) rename target/s390x/{ => tcg}/insn-format.def (100%) create mode 100644 target/s390x/tcg/meson.build