]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: selftests: Fix region overlap check in kvm_util
authorBen Gardon <bgardon@google.com>
Wed, 16 Jan 2019 17:41:15 +0000 (09:41 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Jan 2019 18:11:36 +0000 (19:11 +0100)
commit7a3c276ea45a46b6223708ff7dd8ca0d1475392a
tree83eb8ebd0b190eec81d6de52bb16b3342cf3d602
parent30ac4b8e0d9b3e8ab361198236961f4bdd61b713
kvm: selftests: Fix region overlap check in kvm_util

Fix a call to userspace_mem_region_find to conform to its spec of
taking an inclusive, inclusive range. It was previously being called
with an inclusive, exclusive range. Also remove a redundant region bounds
check in vm_userspace_mem_region_add. Region overlap checking is already
performed by the call to userspace_mem_region_find.

Tested: Compiled tools/testing/selftests/kvm with -static
Ran all resulting test binaries on an Intel Haswell test machine
All tests passed

Signed-off-by: Ben Gardon <bgardon@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c