target-i386: Fix I/O bitmap checks for in/out
authorKevin Wolf <kwolf@redhat.com>
Fri, 24 Jan 2014 09:57:41 +0000 (10:57 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 19 Feb 2014 15:40:19 +0000 (16:40 +0100)
commit6d093a4f499fd945b39bd55b307dd9192dc99ead
tree152a9f5dbff1887e4d7d09b3daa30fb7c2dc88ab
parent46eef33b89e936ca793e13c4aeea1414e97e8dbb
target-i386: Fix I/O bitmap checks for in/out

Commit 1b90d56e changed the implementation of in/out imm to not assign
the accessed port number to cpu_T[0] as it appeared unnecessary.
However, currently gen_check_io() makes use of cpu_T[0] to implement the
I/O bitmap checks, so it's in fact still used and the change broke the
check, leading to #GP in legitimate cases (and probably also allowing
access to ports that shouldn't be allowed).

This patch reintroduces the missing assignment for these cases.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
target-i386/translate.c