[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] x86/mm: drop gfn_to_paddr()



commit 8d5dc7d7df92d8d7f9450cee0bab57dceefa26c5
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Jul 22 09:40:24 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jul 22 09:40:24 2024 +0200

    x86/mm: drop gfn_to_paddr()
    
    This really is gfn_to_gaddr() in disguise; no need to have two variants
    of the same logic.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/include/asm/guest_pt.h | 6 ------
 xen/arch/x86/mm/shadow/multi.c      | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/include/asm/guest_pt.h 
b/xen/arch/x86/include/asm/guest_pt.h
index 7b0c9b005c..e01db4a671 100644
--- a/xen/arch/x86/include/asm/guest_pt.h
+++ b/xen/arch/x86/include/asm/guest_pt.h
@@ -20,12 +20,6 @@
 #error GUEST_PAGING_LEVELS not defined
 #endif
 
-static inline paddr_t
-gfn_to_paddr(gfn_t gfn)
-{
-    return ((paddr_t)gfn_x(gfn)) << PAGE_SHIFT;
-}
-
 /* Override get_gfn to work with gfn_t */
 #undef get_gfn
 #define get_gfn(d, g, t) get_gfn_type((d), gfn_x(g), (t), P2M_ALLOC)
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 8e0046ae69..376f6823cd 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -562,7 +562,7 @@ _sh_propagate(struct vcpu *v,
                 if ( p2mt == p2m_mmio_direct )
                     sflags |= get_pat_flags(v,
                             gflags,
-                            gfn_to_paddr(target_gfn),
+                            gfn_to_gaddr(target_gfn),
                             mfn_to_maddr(target_mfn),
                             X86_MT_UC);
                 else if ( is_iommu_enabled(d) && iommu_snoop )
@@ -570,7 +570,7 @@ _sh_propagate(struct vcpu *v,
                 else
                     sflags |= get_pat_flags(v,
                             gflags,
-                            gfn_to_paddr(target_gfn),
+                            gfn_to_gaddr(target_gfn),
                             mfn_to_maddr(target_mfn),
                             NO_HARDCODE_MEM_TYPE);
             }
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.