Commit b26177d7ec3f50157a5f37f804ffcace3b2a3945

Authored by balrog
1 parent df01e0fc

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
Showing 1 changed file with 2 additions and 1 deletions
target-i386/helper.c
... ... @@ -4262,7 +4262,8 @@ int svm_check_intercept_param(uint32_t type, uint64_t param)
4262 4262 uint64_t addr = ldq_phys(env->vm_vmcb + offsetof(struct vmcb, control.iopm_base_pa));
4263 4263 uint16_t port = (uint16_t) (param >> 16);
4264 4264  
4265   - if(ldub_phys(addr + port / 8) & (1 << (port % 8)))
  4265 + uint16_t mask = (1 << ((param >> 4) & 7)) - 1;
  4266 + if(lduw_phys(addr + port / 8) & (mask << (port & 7)))
4266 4267 vmexit(type, param);
4267 4268 }
4268 4269 break;
... ...