Lines Matching refs:gma
498 static unsigned long gma_to_ggtt_pte_index(unsigned long gma) in gma_to_ggtt_pte_index() argument
500 unsigned long x = (gma >> I915_GTT_PAGE_SHIFT); in gma_to_ggtt_pte_index()
502 trace_gma_index(__func__, gma, x); in gma_to_ggtt_pte_index()
507 static unsigned long prefix##_gma_to_##ename##_index(unsigned long gma) \
510 trace_gma_index(__func__, gma, x); \
514 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pte, (gma >> 12 & 0x1ff));
515 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pde, (gma >> 21 & 0x1ff));
516 DEFINE_PPGTT_GMA_TO_INDEX(gen8, l3_pdp, (gma >> 30 & 0x3));
517 DEFINE_PPGTT_GMA_TO_INDEX(gen8, l4_pdp, (gma >> 30 & 0x1ff));
518 DEFINE_PPGTT_GMA_TO_INDEX(gen8, pml4, (gma >> 39 & 0x1ff));
2113 unsigned long intel_vgpu_gma_to_gpa(struct intel_vgpu_mm *mm, unsigned long gma) in intel_vgpu_gma_to_gpa() argument
2129 if (!vgpu_gmadr_is_valid(vgpu, gma)) in intel_vgpu_gma_to_gpa()
2133 gma_ops->gma_to_ggtt_pte_index(gma)); in intel_vgpu_gma_to_gpa()
2136 + (gma & ~I915_GTT_PAGE_MASK); in intel_vgpu_gma_to_gpa()
2138 trace_gma_translate(vgpu->id, "ggtt", 0, 0, gma, gpa); in intel_vgpu_gma_to_gpa()
2144 gma_index[0] = gma_ops->gma_to_pml4_index(gma); in intel_vgpu_gma_to_gpa()
2145 gma_index[1] = gma_ops->gma_to_l4_pdp_index(gma); in intel_vgpu_gma_to_gpa()
2146 gma_index[2] = gma_ops->gma_to_pde_index(gma); in intel_vgpu_gma_to_gpa()
2147 gma_index[3] = gma_ops->gma_to_pte_index(gma); in intel_vgpu_gma_to_gpa()
2152 gma_ops->gma_to_l3_pdp_index(gma)); in intel_vgpu_gma_to_gpa()
2154 gma_index[0] = gma_ops->gma_to_pde_index(gma); in intel_vgpu_gma_to_gpa()
2155 gma_index[1] = gma_ops->gma_to_pte_index(gma); in intel_vgpu_gma_to_gpa()
2170 gvt_dbg_core("GMA 0x%lx is not present\n", gma); in intel_vgpu_gma_to_gpa()
2176 (gma & ~I915_GTT_PAGE_MASK); in intel_vgpu_gma_to_gpa()
2178 mm->ppgtt_mm.root_entry_type, gma, gpa); in intel_vgpu_gma_to_gpa()
2183 gvt_vgpu_err("invalid mm type: %d gma %lx\n", mm->type, gma); in intel_vgpu_gma_to_gpa()
2193 unsigned long gma; in emulate_ggtt_mmio_read() local
2199 gma = index << I915_GTT_PAGE_SHIFT; in emulate_ggtt_mmio_read()
2201 gma, 1 << I915_GTT_PAGE_SHIFT)) { in emulate_ggtt_mmio_read()
2202 gvt_dbg_mm("read invalid ggtt at 0x%lx\n", gma); in emulate_ggtt_mmio_read()
2258 unsigned long gma, gfn; in emulate_ggtt_mmio_write() local
2269 gma = g_gtt_index << I915_GTT_PAGE_SHIFT; in emulate_ggtt_mmio_write()
2272 if (!vgpu_gmadr_is_valid(vgpu, gma)) in emulate_ggtt_mmio_write()