target/s390x: fix IPM polluting irrelevant bits
commit478d360cd937afe01a1234044ab04a26b73020be
authorPavel Zbitskiy <pavel.zbitskiy@gmail.com>
Tue, 21 Aug 2018 02:51:01 +0000 (20 22:51 -0400)
committerCornelia Huck <cohuck@redhat.com>
Tue, 28 Aug 2018 15:37:01 +0000 (28 17:37 +0200)
tree972511fbff6d9bcc71d13811e7412ed6c9944cf7
parentdc95b31dac65adb92256e67a5f0fc88ab37404c2
target/s390x: fix IPM polluting irrelevant bits

Suppose psw.mask=0x0000000080000000, cc=2, r1=0 and we do "ipm 1".
This command must touch only bits 32-39, so the expected output
is r1=0x20000000. However, currently qemu yields r1=0x20008000,
because irrelevant parts of PSW leak into r1 during program mask
transfer.

Signed-off-by: Pavel Zbitskiy <pavel.zbitskiy@gmail.com>
Message-Id: <20180821025104.19604-5-pavel.zbitskiy@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/translate.c
tests/tcg/s390x/Makefile.target
tests/tcg/s390x/ipm.c [new file with mode: 0644]