[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/6] x86/shadow: Use more appropriate conversion functions
Replace pfn_to_paddr(mfn_x(...)) with mfn_to_maddr(), and replace an opencoded gfn_to_gaddr(). No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Tim Deegan <tim@xxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/mm/shadow/multi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 0d74c01..fbdbb7d 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -628,7 +628,7 @@ _sh_propagate(struct vcpu *v, sflags |= get_pat_flags(v, gflags, gfn_to_paddr(target_gfn), - pfn_to_paddr(mfn_x(target_mfn)), + mfn_to_maddr(target_mfn), MTRR_TYPE_UNCACHABLE); else if ( iommu_snoop ) sflags |= pat_type_2_pte_flags(PAT_TYPE_WRBACK); @@ -636,7 +636,7 @@ _sh_propagate(struct vcpu *v, sflags |= get_pat_flags(v, gflags, gfn_to_paddr(target_gfn), - pfn_to_paddr(mfn_x(target_mfn)), + mfn_to_maddr(target_mfn), NO_HARDCODE_MEM_TYPE); } } @@ -1131,7 +1131,7 @@ static inline void shadow_vram_get_l1e(shadow_l1e_t new_sl1e, if ( (page->u.inuse.type_info & PGT_count_mask) == 1 ) /* Initial guest reference, record it */ - dirty_vram->sl1ma[i] = pfn_to_paddr(mfn_x(sl1mfn)) + dirty_vram->sl1ma[i] = mfn_to_maddr(sl1mfn) | ((unsigned long)sl1e & ~PAGE_MASK); } } @@ -1160,7 +1160,7 @@ static inline void shadow_vram_put_l1e(shadow_l1e_t old_sl1e, unsigned long i = gfn - dirty_vram->begin_pfn; struct page_info *page = mfn_to_page(mfn); int dirty = 0; - paddr_t sl1ma = pfn_to_paddr(mfn_x(sl1mfn)) + paddr_t sl1ma = mfn_to_maddr(sl1mfn) | ((unsigned long)sl1e & ~PAGE_MASK); if ( (page->u.inuse.type_info & PGT_count_mask) == 1 ) @@ -2931,8 +2931,7 @@ static int sh_page_fault(struct vcpu *v, { /* Magic MMIO marker: extract gfn for MMIO address */ ASSERT(sh_l1e_is_mmio(sl1e)); - gpa = (((paddr_t)(gfn_x(sh_l1e_mmio_get_gfn(sl1e)))) - << PAGE_SHIFT) + gpa = gfn_to_gaddr(sh_l1e_mmio_get_gfn(sl1e)) | (va & ~PAGE_MASK); } perfc_incr(shadow_fault_fast_mmio); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |