Skip to content
Commit 259720c3 authored by Sean Christopherson's avatar Sean Christopherson
Browse files

KVM: VMX: Combine "check" and "get" APIs for passthrough MSR lookups



Combine possible_passthrough_msr_slot() and is_valid_passthrough_msr()
into a single function, vmx_get_passthrough_msr_slot(), and have the
combined helper return the slot on success, using a negative value to
indicate "failure".

Combining the operations avoids iterating over the array of passthrough
MSRs twice for relevant MSRs.

Suggested-by: default avatarDongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: default avatarDongli Zhang <dongli.zhang@oracle.com>
Link: https://lore.kernel.org/r/20240223202104.3330974-4-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent bab22040
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment