From 5edc406e1ba46f75b7b25c334a820952779ee23d Mon Sep 17 00:00:00 2001 From: Tao Wu Date: Sat, 20 Jan 2018 13:20:19 -0800 Subject: [PATCH] hvf: Fix bug that fails to find slot on border. If gpa is exactly the start address of one slot, the old code fails to find the slot. Change to use one byte range to find slot. Change-Id: I169ec8f759bb211a5ea7c693c5d99f27576c2e93 Signed-off-by: Tao Wu --- target/i386/hvf/hvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index ce31bc88f8..4eaac2dc97 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -740,7 +740,7 @@ int hvf_vcpu_exec(CPUState *cpu) vmx_set_nmi_blocking(cpu); } - slot = hvf_find_overlap_slot(gpa, gpa); + slot = hvf_find_overlap_slot(gpa, gpa + 1); /* mmio */ if (ept_emulation_fault(slot, gpa, exit_qual)) { struct x86_decode decode;