Skip to content

Commit 765805d

Browse files
jsun26inteljren1
authored andcommitted
HV cleanup: move iobitmap ini out of loop
The initial of iobitmap pointer should be moved out of loop since address is sequentially incremented. Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
1 parent c2c1932 commit 765805d

File tree

1 file changed

+1
-1
lines changed
  • hypervisor/arch/x86

1 file changed

+1
-1
lines changed

hypervisor/arch/x86/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ static void deny_guest_io_access(struct vm *vm, uint32_t address, uint32_t nbyte
212212
uint32_t i;
213213
uint32_t a;
214214

215+
b = vm->arch_vm.iobitmap[0];
215216
for (i = 0; i < nbytes; i++) {
216-
b = vm->arch_vm.iobitmap[0];
217217
if (address & 0x8000)
218218
b = vm->arch_vm.iobitmap[1];
219219
a = address & 0x7fff;

0 commit comments

Comments
 (0)