KVM: selftests: Fix a typo in x86-64's kvm_get_cpu_address_width()
authorSean Christopherson <seanjc@google.com>
Tue, 13 Dec 2022 00:16:44 +0000 (00:16 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Dec 2022 11:00:46 +0000 (06:00 -0500)
commit1525429fe5cb8e23b74c6dd473bb477a35906704
tree6c4382bd6db31090ad1902107d7281f586617920
parent43e96957e8b87bad8e4ba666750ff0cda9e03ffb
KVM: selftests: Fix a typo in x86-64's kvm_get_cpu_address_width()

Fix a == vs. = typo in kvm_get_cpu_address_width() that results in
@pa_bits being left unset if the CPU doesn't support enumerating its
MAX_PHY_ADDR.  Flagged by clang's unusued-value warning.

lib/x86_64/processor.c:1034:51: warning: expression result unused [-Wunused-value]
                *pa_bits == kvm_cpu_has(X86_FEATURE_PAE) ? 36 : 32;

Fixes: 3bd396353d18 ("KVM: selftests: Add X86_FEATURE_PAE and use it calc "fallback" MAXPHYADDR")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221213001653.3852042-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/x86_64/processor.c