]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Mar 2019 16:58:52 +0000 (17:58 +0100)
commitb246986a1fc018b4daecc9756bbb3d468e5410e6
treec0c321901d571afff893248eece5f4080dc3843f
parent60a4b3f7c8678150f15f3fc4a1e0c84cc7085dd3
kvm: selftests: Fix region overlap check in kvm_util

[ Upstream commit 94a980c39c8e3f8abaff5d3b5bbcd4ccf1c02c4f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/kvm/lib/kvm_util.c