diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-09 23:39:22 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-09 23:39:22 +0000 |
commit | b26177d7ec3f50157a5f37f804ffcace3b2a3945 (patch) | |
tree | 51d2290d18125aa102d2b05d76c328b6b7f38ca9 | |
parent | df01e0fc33af5b1247d8ac4bfec5b94466ff69c2 (diff) | |
download | qemu-b26177d7ec3f50157a5f37f804ffcace3b2a3945.zip qemu-b26177d7ec3f50157a5f37f804ffcace3b2a3945.tar.gz qemu-b26177d7ec3f50157a5f37f804ffcace3b2a3945.tar.bz2 |
Make SVM IOIO intercept check all needed bits, by Bernhard Kauer.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3792 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | target-i386/helper.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index 07ff356..bad3f7c 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -4262,7 +4262,8 @@ int svm_check_intercept_param(uint32_t type, uint64_t param) uint64_t addr = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.iopm_base_pa)); uint16_t port = (uint16_t) (param >> 16); - if(ldub_phys(addr + port / 8) & (1 << (port % 8))) + uint16_t mask = (1 << ((param >> 4) & 7)) - 1; + if(lduw_phys(addr + port / 8) & (mask << (port & 7))) vmexit(type, param); } break; |