From aec17eed364ed64c51c77088f43a64f229a5a5c0 Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Sat, 28 Apr 2018 20:59:01 +0800 Subject: [PATCH] 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 Acked-by: Kevin Tian --- arch/x86/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/io.c b/arch/x86/io.c index 932fd8f5e..4f7bf87dd 100644 --- a/arch/x86/io.c +++ b/arch/x86/io.c @@ -212,8 +212,8 @@ static void deny_guest_io_access(struct vm *vm, uint32_t address, uint32_t nbyte uint32_t i; uint32_t a; + b = vm->arch_vm.iobitmap[0]; for (i = 0; i < nbytes; i++) { - b = vm->arch_vm.iobitmap[0]; if (address & 0x8000) b = vm->arch_vm.iobitmap[1]; a = address & 0x7fff;