diff mbox series

x86/mm: drop gfn_to_paddr()

Message ID 9f56adbc-5e16-4b48-a7f0-e72c6b8f1999@suse.com (mailing list archive)
State New
Headers show
Series x86/mm: drop gfn_to_paddr() | expand

Commit Message

Jan Beulich July 18, 2024, 10:09 a.m. UTC
This really is gfn_to_gaddr() in disguise; no need to have two variants
of the same logic.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper July 18, 2024, 10:10 a.m. UTC | #1
On 18/07/2024 11:09 am, Jan Beulich wrote:
> This really is gfn_to_gaddr() in disguise; no need to have two variants
> of the same logic.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- 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)
--- 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);
             }