KVM: selftests: Fix nsec to sec conversion in demand_paging_test
authorAnish Moorthy <amoorthy@google.com>
Thu, 23 Feb 2023 00:18:05 +0000 (00:18 +0000)
committerSean Christopherson <seanjc@google.com>
Fri, 24 Mar 2023 15:26:23 +0000 (08:26 -0700)
commitf6baabdcadd1080893aa5e49e6959cb070244703
treebc7208803000b43b5e906eda2c3c15c5e2e4861b
parentd8708b80fa0e6e21bc0c9e7276ad0bccef73b6e7
KVM: selftests: Fix nsec to sec conversion in demand_paging_test

demand_paging_test uses 1E8 as the denominator to convert nanoseconds to
seconds, which is wrong. Use NSEC_PER_SEC instead to fix the issue and
make the conversion obvious.

Reported-by: James Houghton <jthoughton@google.com>
Signed-off-by: Anish Moorthy <amoorthy@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20230223001805.2971237-1-amoorthy@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/demand_paging_test.c