KVM: emulator: Fix permission checking in io permission bitmap
authorGleb Natapov <gleb@redhat.com>
Mon, 7 Mar 2011 12:55:07 +0000 (14:55 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 17 Mar 2011 16:08:33 +0000 (13:08 -0300)
commit399a40c92d744feebf89b1f07208407c26e0aaf5
tree69ae89dacff4378ec621bffc2fb06b71ca86bda7
parent5601d05b8c340ee2643febc146099325eff187eb
KVM: emulator: Fix permission checking in io permission bitmap

Currently if io port + len crosses 8bit boundary in io permission bitmap the
check may allow IO that otherwise should not be allowed. The patch fixes that.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c