kvm: selftests: ucall: fix exit mmio address guessing
authorAndrew Jones <drjones@redhat.com>
Fri, 21 Dec 2018 11:22:22 +0000 (12:22 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Dec 2018 12:58:46 +0000 (13:58 +0100)
commit57d5edfe640edaaece9208cdbd7f464d255785cd
tree43a9dc1aba585930b7b0c88bc8d9a916a40970ea
parent2bcbd406715dca256912b9c5ae449c7968f15705
kvm: selftests: ucall: fix exit mmio address guessing

Fix two more bugs in the exit_mmio address guessing.
The first bug was that the start and step calculations were
wrong since they were dividing the number of address bits instead
of the address space. The second other bug was that the guessing
algorithm wasn't considering the valid physical and virtual address
ranges correctly for an identity map.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/ucall.c