accel/tcg: Use QEMU_IOTHREAD_LOCK_GUARD in io_readx/io_writex

Narrow the scope of the lock to the actual read/write,
moving the cpu_transation_failed call outside the lock.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
1 file changed