KVM: selftests: Mark correct page as mapped in virt_map()
authorOliver Upton <oliver.upton@linux.dev>
Fri, 9 Dec 2022 01:53:02 +0000 (01:53 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Dec 2022 11:00:50 +0000 (06:00 -0500)
commit92c8191bb5d3f670ed806f91823381193288a4e1
treeb4084902e080c68f43c7d2957f99c4f5a77bd100
parent7a16142505cbb9b80d5e998e32b1d882e0f45d64
KVM: selftests: Mark correct page as mapped in virt_map()

The loop marks vaddr as mapped after incrementing it by page size,
thereby marking the *next* page as mapped. Set the bit in vpages_mapped
first instead.

Fixes: 56fc7732031d ("KVM: selftests: Fill in vm->vpages_mapped bitmap in virt_map() too")
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Message-Id: <20221209015307.1781352-4-oliver.upton@linux.dev>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c