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 <lepton@google.com>
This commit is contained in:
Tao Wu 2018-01-20 13:20:19 -08:00 committed by espes
parent e2fd7b21be
commit 5edc406e1b

View File

@ -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;