]> Git Repo - qemu.git/commit - target/s390x/ioinst.c
s390x/css: fix ilen in IO instruction handlers
authorHalil Pasic <[email protected]>
Mon, 24 Jul 2017 14:34:52 +0000 (16:34 +0200)
committerCornelia Huck <[email protected]>
Tue, 25 Jul 2017 07:17:42 +0000 (09:17 +0200)
commit7e01376daea75e888c370aab521a7d4aeaf2ffd1
treea478d8d747f8569947f8e10b1bb902b66ca65486
parentb114588c069b64c5e1a0ec8534d487ee9f0e528a
s390x/css: fix ilen in IO instruction handlers

When initiating a program check interruption by calling program_interrupt
the instruction length (ilen) of the current instruction is supplied as
the third parameter.

On s390x all the IO instructions are of instruction format S and their
ilen is 4.  The calls to program_interrupt (introduced by commits
7b18aad543 ("s390: Add channel I/O instructions.", 2013-01-24) and
61bf0dcb2e ("s390x/ioinst: Add missing alignment checks for IO
instructions", 2013-06-21)) however use ilen == 2.

This is probably due to a confusion between ilen which specifies the
instruction length in bytes and ILC which does the same but in halfwords.
If kvm_enabled() this does not actually matter, because the ilen
parameter of program_interrupt is effectively unused.

Let's provide the correct ilen to program_interrupt.

Signed-off-by: Halil Pasic <[email protected]>
Fixes: 7b18aad543 ("s390: Add channel I/O instructions.")
Fixes: 61bf0dcb2e ("s390x/ioinst: Add missing alignment checks for IO instructions")
Reviewed-by: David Hildenbrand <[email protected]>
Message-Id: <20170724143452[email protected]>
Reviewed-by: Dong Jia Shi <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
target/s390x/ioinst.c
This page took 0.026542 seconds and 4 git commands to generate.