KVM: x86: use proper port value when checking io instruction permission
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 30 May 2011 18:23:14 +0000 (15:23 -0300)
committerAvi Kivity <avi@redhat.com>
Mon, 6 Jun 2011 07:52:09 +0000 (10:52 +0300)
commit221192bdff2583834984639121595fc9296120d3
tree7e84882430b604226a822b32be6ab29107fc0c73
parent9e3bb6b6f6a0c535eb053fbf0005a8e79e053374
KVM: x86: use proper port value when checking io instruction permission

Commit f6511935f42 moved the permission check for io instructions
to the ->check_perm callback. It failed to copy the port value from RDX
register for string and "in,out ax,dx" instructions.

Fix it by reading RDX register at decode stage when appropriate.

Fixes FC8.32 installation.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/emulate.c