Skip to content

Commit cd31356

Browse files
Mohammed Gamalbonzini
authored andcommitted
KVM: x86: mmu: Move translate_gpa() to mmu.c
Also no point of it being inline since it's always called through function pointers. So remove that. Signed-off-by: Mohammed Gamal <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 8978614 commit cd31356

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,12 +1510,6 @@ void kvm_mmu_new_pgd(struct kvm_vcpu *vcpu, gpa_t new_pgd, bool skip_tlb_flush,
15101510

15111511
void kvm_configure_mmu(bool enable_tdp, int tdp_page_level);
15121512

1513-
static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
1514-
struct x86_exception *exception)
1515-
{
1516-
return gpa;
1517-
}
1518-
15191513
static inline u16 kvm_read_ldt(void)
15201514
{
15211515
u16 ldt;

arch/x86/kvm/mmu/mmu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,12 @@ static bool check_mmio_spte(struct kvm_vcpu *vcpu, u64 spte)
516516
return likely(kvm_gen == spte_gen);
517517
}
518518

519+
static gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
520+
struct x86_exception *exception)
521+
{
522+
return gpa;
523+
}
524+
519525
/*
520526
* Sets the shadow PTE masks used by the MMU.
521527
*

0 commit comments

Comments
 (0)