s390x emulation support v4
Status from this message: Thanks, applied.
Get series with b4
b4 am [email protected]Versions newest first
v1 -> v2 from the cover letter · 18 lines
- fix broken s390-virtio-serial
- fix broken s390 kvm target
- always set 64bit flag for s390x binaries in elf loader
- remove redundant EXECUTE_SVC
- advance psw.addr in syscall execution path
- remove FPReg definition
- add descriptions to more cc_ops
- add comment on time2tod
- describe EXCP_EXT
- use new clock syntax
- use float_chs
- use float compare built-ins
- remove redundant EXECUTE_SVC
- don't pass env into DisasContext
- remove if 0'd code
- truncate at 80 chars
- enable disas debug by default (-d in_asm)
- remove explicit psw.addr advancing on SVC
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | tcg: extend max tcg opcodes on 32bitexec-all.h | +4 | 1 reply | |
| 2/17 | s390x: s390x-linux-user supportlinux-user/ linux-user/ linux-user/ +7 more | +1184 | 8 replies | |
| 3/17 | linux-user: define a couple of syscalls for non-uid16 targetslinux-user/ | +105 | 2 replies | |
| 4/17 | linux-user: add s390x to llseek listlinux-user/ | +2 | 0 replies | |
| 5/17 | kvm: add kvm stub for arch specific stuffMakefile.target target-alpha/ target-arm/ +11 more | +351 | 9 replies | |
| 6/17 | s390x: Prepare cpu.h for emulationhw/ target-s390x/ target-s390x/ +1 more | +740 | 1 reply | |
| 7/17 | s390x: Enable s390x-softmmu targetcpu-exec.c target-s390x/ target-s390x/ | +22 | 1 reply | |
| 8/17 | s390x: Dispatch interrupts to KVM or the real CPUhw/ | +8 | 1 reply | |
| 9/17 | s390x: virtio machine storage keyshw/ | +9 | 1 reply | |
| 10/17 | s390x: keep hint on virtio managing sizehw/ hw/ target-s390x/ | +7 | 3 replies | |
| 11/17 | s390x: helper functions for system emulationtarget-s390x/ target-s390x/ target-s390x/ | +577 | 2 replies | |
| 12/17 | s390x: Implement opcode helperstarget-s390x/ target-s390x/ | +3068 | 0 replies | |
| 13/17 | s390x: Adjust internal kvm codetarget-s390x/ | +7 | 0 replies | |
| 14/17 | s390x: translate engine for s390x CPUtarget-s390x/ | +5161 | 0 replies | |
| 15/17 | s390x: Adjust GDB stubgdbstub.c | +6 | 0 replies | |
| 16/17 | s390x: remove compatibility cc fieldtarget-s390x/ | +0 | 0 replies | |
| 17/17 | s390x: build s390x by defaultconfigure default-configs/ | +3 | 0 replies |
Reviews trailers per patch
None of the 17 patches has a Reviewed-by or Acked-by.
| Patch | Ulrich Hecht |
|---|---|
| 1/17 | |
| 2/17 | |
| 3/17 | |
| 4/17 | Original-patch-by |
| 5/17 | |
| 6/17 | |
| 7/17 | |
| 8/17 | |
| 9/17 | |
| 10/17 | |
| 11/17 | |
| 12/17 | |
| 13/17 | |
| 14/17 | |
| 15/17 | |
| 16/17 | |
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 00/17] s390x emulation support v4
We've had support for running s390x guests with KVM for a while now. This patch set also enables support for running s390x guests in system as well as linux-user mode in emulation!
Within this scope, I again want to stress that this is _not_ supposed to replace Hercules - the s390 emulator - in any way. The only target supported by qemu is Linux. You can only run Linux applications with linux-user emulation and Linux guest OSs with the system emulation. All the device logic (and 24 bit mode) for running legacy stuff is missing. Use Hercules for those!
I have successfully run the following guest OSs:
- SUSE Linux Enterprise Server 11 SP1
- Debian Lenny
Both of which work just fine on x86_64 and ppc hosts. Other hosts should also work. The only thing that did not work for me is network. Somehow networking only works with KVM enabled, so there is probably some bug involved still.
Either way - rejoice! As with this patch set you can finally fulfill your mainframe desires on your local workstation. And - most importantly - finally test patches to virtio against s390!
For images, I'm hoping for Aurelien to provide Debian images that run in qemu. Other distributions only provide S390x target support in their enterprise variants, keeping me from redistributing images :(.
If you're trying to get things rolling yourself, make sure to use a recent kernel that has support for the virtio architecture and virtio console support - otherwise you won't see output.
The linux user mode emulation part only support 64bit binaries, so running Debian binaries with that one is out of question for now. Use the system emulation mode if you really need to run Debian binaries.
For the lazy ones:
git://repo.or.cz/qemu/agraf.git s390-tcg-v4
v1 -> v2:
- fix broken s390-virtio-serial
- fix broken s390 kvm target
- always set 64bit flag for s390x binaries in elf loader
- remove redundant EXECUTE_SVC
- advance psw.addr in syscall execution path
- remove FPReg definition
- add descriptions to more cc_ops
- add comment on time2tod
- describe EXCP_EXT
- use new clock syntax
- use float_chs
- use float compare built-ins
- remove redundant EXECUTE_SVC
- don't pass env into DisasContext
- remove if 0'd code
- truncate at 80 chars
- enable disas debug by default (-d in_asm)
- remove explicit psw.addr advancing on SVC
v2 -> v3:
- use g2h instead of direct casts
- remove old code stuffed into comments
- reduce amount of tcg ops in LM and LMH to stay below limits
- add patch: fix virtio feature bitmap
- add patch: set alignment for long to 8
- add patch: use ext op for deposit
v3 -> v4:
- move linux-user host bits to its own file, remove useless parts
- add slag cc type
- make patchset bisectable
- declare non-working when EXT is masked
- remove obsolete cpu_halted
- enable RAM boundary check
- implement slag, iilh, iill
- fix icm cc
- improve on 32bit hosts
- coding style
Alexander Graf (15):
tcg: extend max tcg opcodes on 32bit
linux-user: add s390x to llseek list
kvm: add kvm stub for arch specific stuff
s390x: Prepare cpu.h for emulation
s390x: Enable s390x-softmmu target
s390x: Dispatch interrupts to KVM or the real CPU
s390x: virtio machine storage keys
s390x: keep hint on virtio managing size
s390x: helper functions for system emulation
s390x: Implement opcode helpers
s390x: Adjust internal kvm code
s390x: translate engine for s390x CPU
s390x: Adjust GDB stub
s390x: remove compatibility cc field
s390x: build s390x by default
Ulrich Hecht (2):
s390x: s390x-linux-user support
linux-user: define a couple of syscalls for non-uid16 targets
Makefile.target | 2 +- configure | 2 + cpu-exec.c | 8 + default-configs/s390x-linux-user.mak | 1 + exec-all.h | 4 + gdbstub.c | 8 +- hw/s390-virtio-bus.c | 13 +- hw/s390-virtio-bus.h | 2 +- hw/s390-virtio.c | 21 +- linux-user/elfload.c | 19 + linux-user/main.c | 83 + linux-user/s390x/syscall.h | 23 + linux-user/s390x/syscall_nr.h | 349 +++ linux-user/s390x/target_signal.h | 26 + linux-user/s390x/termbits.h | 283 ++ linux-user/signal.c | 333 +++ linux-user/syscall.c | 144 +- linux-user/syscall_defs.h | 55 +- scripts/qemu-binfmt-conf.sh | 4 +- target-alpha/kvm-arch-stub.c | 26 + target-arm/kvm-arch-stub.c | 26 + target-cris/kvm-arch-stub.c | 26 + target-i386/kvm-arch-stub.c | 26 + target-lm32/kvm-arch-stub.c | 26 + target-m68k/kvm-arch-stub.c | 26 + target-microblaze/kvm-arch-stub.c | 26 + target-mips/kvm-arch-stub.c | 26 + target-ppc/kvm-arch-stub.c | 26 + target-s390x/cpu.h | 776 +++++- target-s390x/exec.h | 11 +- target-s390x/helper.c | 580 ++++- target-s390x/helpers.h | 151 + target-s390x/kvm-arch-stub.c | 38 + target-s390x/kvm.c | 61 +- target-s390x/op_helper.c | 2925 +++++++++++++++++++- target-s390x/translate.c | 5169 +++++++++++++++++++++++++++++++++- target-sh4/kvm-arch-stub.c | 26 + target-sparc/kvm-arch-stub.c | 26 + target-unicore32/kvm-arch-stub.c | 26 + 39 files changed, 11251 insertions(+), 152 deletions(-) create mode 100644 default-configs/s390x-linux-user.mak create mode 100644 linux-user/s390x/syscall.h create mode 100644 linux-user/s390x/syscall_nr.h create mode 100644 linux-user/s390x/target_signal.h create mode 100644 linux-user/s390x/termbits.h create mode 100644 target-alpha/kvm-arch-stub.c create mode 100644 target-arm/kvm-arch-stub.c create mode 100644 target-cris/kvm-arch-stub.c create mode 100644 target-i386/kvm-arch-stub.c create mode 100644 target-lm32/kvm-arch-stub.c create mode 100644 target-m68k/kvm-arch-stub.c create mode 100644 target-microblaze/kvm-arch-stub.c create mode 100644 target-mips/kvm-arch-stub.c create mode 100644 target-ppc/kvm-arch-stub.c create mode 100644 target-s390x/helpers.h create mode 100644 target-s390x/kvm-arch-stub.c create mode 100644 target-sh4/kvm-arch-stub.c create mode 100644 target-sparc/kvm-arch-stub.c create mode 100644 target-unicore32/kvm-arch-stub.c