On Thu, Nov 29, 2018 at 04:29:05PM +0100, Andrew Jones wrote: > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx> > --- > tools/testing/selftests/kvm/lib/ucall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/kvm/lib/ucall.c b/tools/testing/selftests/kvm/lib/ucall.c > index 4777f9bb5194..e28bdd6b546c 100644 > --- a/tools/testing/selftests/kvm/lib/ucall.c > +++ b/tools/testing/selftests/kvm/lib/ucall.c > @@ -58,7 +58,7 @@ void ucall_init(struct kvm_vm *vm, ucall_type_t type, void *arg) > start = 1ul << (vm->va_bits * 2 / 3); > end = 1ul << vm->va_bits; > step = 1ul << (vm->va_bits / 6); > - for (gpa = start; gpa >= 0; gpa -= step) { > + for (gpa = start; gpa > 0; gpa -= step) { > if (ucall_mmio_init(vm, gpa & ~(vm->page_size - 1))) > return; > } Ugh... sorry for this junk. I was obviously way too hasty "fixing" this. I forgot to consider that the virtual address space is most likely *not* a multiple of the calculated step. I'll send a v2 that doesn't suck in a moment. drew