s390 patch queue 2014-11-05 for 2.2
Hi Peter,
This is my current patch queue for s390. Please pull.
Alex
The following changes since commit d5b4dc3b50175f0c34f3cf4b053e123fb37f5aed:
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging (2014-11-04 17:33:34 +0000)
are available in the git repository at:
git://github.com/agraf/qemu.git tags/signed-s390-for-upstream
for you to fetch changes up to ab6b1c0a36b23e3e8c47c00fb6c9931de957f608:
s390x: Implement SAM{24,31,64} (2014-11-05 10:54:28 +0100)
----------------------------------------------------------------
Patch queue for s390 - 2014-11-05
Two simple bug fixes to enable slightly newer guest kernels and preliminary -M s390-ccw support for TCG (virtio doesn't work yet!)
----------------------------------------------------------------
Alexander Graf (2):
s390x: Fix sclp console input
s390x: Implement SAM{24,31,64}target-s390x/insn-data.def | 6 +++--- target-s390x/interrupt.c | 2 -- target-s390x/translate.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-)
[Qemu-devel] [PULL 2/2] s390x: Implement SAM{24,31,64}
The SAM instructions simply change 2 bits in PSW.MASK to advertise the current memory mode. While we can't fully guarantee that 31 bit mode (or even remotely 24 bit mode) actually work correctly, we don't check whether lpswe modifies these bits, so we shouldn't keep the guest from executing SAM instructions either.
This patch implements all SAM instrutions with their actual PSW changing semantics, making more recent Linux kernels boot properly which do issue a SAM31 call during early boot.
--- target-s390x/insn-data.def | 6 +++--- target-s390x/translate.c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-)
target-s390x/insn-data.def +3 -3
@@ -744,9 +744,9 @@ /* SERVICE CALL LOGICAL PROCESSOR (PV hypercall) */ C(0xb220, SERVC, RRE, Z, r1_o, r2_o, 0, 0, servc, 0) /* SET ADDRESSING MODE */ - /* We only do 64-bit, so accept this as a no-op. - Let SAM24 and SAM31 signal illegal instruction. */ - C(0x010e, SAM64, E, Z, 0, 0, 0, 0, 0, 0) + D(0x010c, SAM24, E, Z, 0, 0, 0, 0, sam, 0, 0) + D(0x010d, SAM31, E, Z, 0, 0, 0, 0, sam, 0, 1) + D(0x010e, SAM64, E, Z, 0, 0, 0, 0, sam, 0, 3) /* SET ADDRESS SPACE CONTROL FAST */ C(0xb279, SACF, S, Z, 0, a2, 0, 0, sacf, 0) /* SET CLOCK */
target-s390x/translate.c +12 -0
@@ -2927,6 +2927,18 @@ static ExitStatus op_sacf(DisasContext *s, DisasOps *o) }#endif +static ExitStatus op_sam (DisasContext *s,DisasOps *o) +{ +int sam = s->insn->data; +TCGv_i64 tsam =tcg_const_i64 (sam); + +/* Overwrite PSW_MASK_64 and PSW_MASK_32 */ +tcg_gen_deposit_i64 (psw_mask, psw_mask, tsam,31 ,2 ); + +tcg_temp_free_i64 (tsam); +return EXIT_PC_STALE ; +} +static ExitStatus op_sar (DisasContext *s,DisasOps *o) {int r1 =get_field (s->fields, r1);
Signature · 1 line
1.7.12.4
[Qemu-devel] [PULL 1/2] s390x: Fix sclp console input
In reply to Alexander GrafWhen injecting an sclp console interrupt into the guest, we increase the PC by 4 for some reason. I have no idea why I put that code there, but it's clearly wrong. Remove the increment.
This patch fixes sclp serial input for the ccw machine.
--- target-s390x/interrupt.c | 2 -- 1 file changed, 2 deletions(-)
target-s390x/interrupt.c +0 -2
@@ -22,9 +22,7 @@ void s390_sclp_extint(uint32_t parm)kvm_s390_service_interrupt (parm); }else {S390CPU *dummy_cpu =s390_cpu_addr2state (0 ); -CPUS390XState *env = &dummy_cpu->env; - env->psw.addr +=4 ;cpu_inject_ext (dummy_cpu,EXT_SERVICE , parm,0 ); } }
Signature · 1 line
1.7.12.4
Peter Maydell
AppliedQuoted 20 lines · Alexander Graf
Hi Peter,
This is my current patch queue for s390. Please pull.
Alex
The following changes since commit
d5b4dc3b50175f0c34f3cf4b053e123fb37f5aed:Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging (2014-11-04 17:33:34 +0000)
are available in the git repository at:
git://github.com/agraf/qemu.gittags/signed-s390-for-upstreamfor you to fetch changes up to
ab6b1c0a36b23e3e8c47c00fb6c9931de957f608:s390x: Implement SAM{24,31,64} (2014-11-05 10:54:28 +0100)
Quoted 7 lines
----------------------------------------------------------------
Patch queue for s390 - 2014-11-05Two simple bug fixes to enable slightly newer guest kernels and preliminary -M s390-ccw support for TCG (virtio doesn't work yet!)
----------------------------------------------------------------
Applied, thanks.
-- PMM