Skip to content

Commit 3a5f490

Browse files
committed
KVM: x86: Make kvm_mtrr_valid() static now that there are no external users
Make kvm_mtrr_valid() local to mtrr.c now that it's not used to check the validity of a PAT MSR value. Reviewed-by: Kai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/r/20230511233351.635053-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent bc7fe2f commit 3a5f490

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

arch/x86/kvm/mtrr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static bool valid_mtrr_type(unsigned t)
6565
return t < 8 && (1 << t) & 0x73; /* 0, 1, 4, 5, 6 */
6666
}
6767

68-
bool kvm_mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)
68+
static bool kvm_mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)
6969
{
7070
int i;
7171
u64 mask;
@@ -100,7 +100,6 @@ bool kvm_mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data)
100100

101101
return (data & mask) == 0;
102102
}
103-
EXPORT_SYMBOL_GPL(kvm_mtrr_valid);
104103

105104
static bool mtrr_is_enabled(struct kvm_mtrr *mtrr_state)
106105
{

arch/x86/kvm/x86.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ void kvm_deliver_exception_payload(struct kvm_vcpu *vcpu,
309309

310310
void kvm_vcpu_mtrr_init(struct kvm_vcpu *vcpu);
311311
u8 kvm_mtrr_get_guest_memory_type(struct kvm_vcpu *vcpu, gfn_t gfn);
312-
bool kvm_mtrr_valid(struct kvm_vcpu *vcpu, u32 msr, u64 data);
313312
int kvm_mtrr_set_msr(struct kvm_vcpu *vcpu, u32 msr, u64 data);
314313
int kvm_mtrr_get_msr(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata);
315314
bool kvm_mtrr_check_gfn_range_consistency(struct kvm_vcpu *vcpu, gfn_t gfn,

0 commit comments

Comments
 (0)