KVM: selftests: Dedup subtests of fix_hypercall_test
authorSean Christopherson <seanjc@google.com>
Wed, 28 Sep 2022 23:36:51 +0000 (23:36 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 Sep 2022 10:39:34 +0000 (06:39 -0400)
commit53c9bdb922f40a7abf3b1642f8a39d3b94d10d62
tree9f83dde094edd0e624a2b3965179c0ce9cdcee78
parentb7ab6d7d2cf7d5400592d1ff0448e8e0a09e5188
KVM: selftests: Dedup subtests of fix_hypercall_test

Combine fix_hypercall_test's two subtests into a common routine, the only
difference between the two is whether or not the quirk is disabled.
Passing a boolean is a little gross, but using an enum to make it super
obvious that the callers are enabling/disabling the quirk seems like
overkill.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Message-Id: <20220928233652.783504-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/fix_hypercall_test.c