Lines Matching full:se
1133 static inline void ppgtt_generate_shadow_entry(struct intel_gvt_gtt_entry *se, in ppgtt_generate_shadow_entry() argument
1138 se->type = ge->type; in ppgtt_generate_shadow_entry()
1139 se->val64 = ge->val64; in ppgtt_generate_shadow_entry()
1142 if (se->type == GTT_TYPE_PPGTT_PDE_ENTRY) in ppgtt_generate_shadow_entry()
1143 ops->clear_ips(se); in ppgtt_generate_shadow_entry()
1145 ops->set_pfn(se, s->shadow_page.mfn); in ppgtt_generate_shadow_entry()
1174 struct intel_gvt_gtt_entry *se) in split_2MB_gtt_entry() argument
1186 start_gfn = ops->get_pfn(se); in split_2MB_gtt_entry()
1199 sub_se.val64 = se->val64; in split_2MB_gtt_entry()
1203 sub_se.val64 |= (se->val64 & _PAGE_PAT_LARGE) >> 5; in split_2MB_gtt_entry()
1210 se->val64 &= ~_PAGE_DIRTY; in split_2MB_gtt_entry()
1212 ops->clear_pse(se); in split_2MB_gtt_entry()
1213 ops->clear_ips(se); in split_2MB_gtt_entry()
1214 ops->set_pfn(se, sub_spt->shadow_page.mfn); in split_2MB_gtt_entry()
1215 ppgtt_set_shadow_entry(spt, se, index); in split_2MB_gtt_entry()
1221 struct intel_gvt_gtt_entry *se) in split_64KB_gtt_entry() argument
1224 struct intel_gvt_gtt_entry entry = *se; in split_64KB_gtt_entry()
1233 start_gfn = ops->get_pfn(se); in split_64KB_gtt_entry()
1255 struct intel_gvt_gtt_entry se = *ge; in ppgtt_populate_shadow_entry() local
1276 return split_64KB_gtt_entry(vgpu, spt, index, &se); in ppgtt_populate_shadow_entry()
1281 return split_2MB_gtt_entry(vgpu, spt, index, &se); in ppgtt_populate_shadow_entry()
1299 pte_ops->set_pfn(&se, dma_addr >> PAGE_SHIFT); in ppgtt_populate_shadow_entry()
1300 ppgtt_set_shadow_entry(spt, &se, index); in ppgtt_populate_shadow_entry()
1310 struct intel_gvt_gtt_entry se, ge; in ppgtt_populate_spt() local
1324 ppgtt_get_shadow_entry(spt, &se, i); in ppgtt_populate_spt()
1325 ppgtt_generate_shadow_entry(&se, s, &ge); in ppgtt_populate_spt()
1326 ppgtt_set_shadow_entry(spt, &se, i); in ppgtt_populate_spt()
1330 ops->set_pfn(&se, gvt->gtt.scratch_mfn); in ppgtt_populate_spt()
1331 ppgtt_set_shadow_entry(spt, &se, i); in ppgtt_populate_spt()
1348 struct intel_gvt_gtt_entry *se, unsigned long index) in ppgtt_handle_guest_entry_removal() argument
1355 spt->shadow_page.type, se->val64, index); in ppgtt_handle_guest_entry_removal()
1358 se->type, index, se->val64); in ppgtt_handle_guest_entry_removal()
1360 if (!ops->test_present(se)) in ppgtt_handle_guest_entry_removal()
1363 if (ops->get_pfn(se) == in ppgtt_handle_guest_entry_removal()
1367 if (gtt_type_is_pt(get_next_pt_type(se->type))) { in ppgtt_handle_guest_entry_removal()
1369 intel_vgpu_find_spt_by_mfn(vgpu, ops->get_pfn(se)); in ppgtt_handle_guest_entry_removal()
1380 WARN(se->type == GTT_TYPE_PPGTT_PTE_64K_ENTRY, in ppgtt_handle_guest_entry_removal()
1382 ppgtt_invalidate_pte(spt, se); in ppgtt_handle_guest_entry_removal()
1388 spt, se->val64, se->type); in ppgtt_handle_guest_entry_removal()
1722 struct intel_gvt_gtt_entry we, se; in ppgtt_handle_guest_write_page_table_bytes() local
1750 ppgtt_get_shadow_entry(spt, &se, index); in ppgtt_handle_guest_write_page_table_bytes()
1751 ret = ppgtt_handle_guest_entry_removal(spt, &se, index); in ppgtt_handle_guest_write_page_table_bytes()
1754 ops->set_pfn(&se, vgpu->gtt.scratch_pt[type].page_mfn); in ppgtt_handle_guest_write_page_table_bytes()
1755 ppgtt_set_shadow_entry(spt, &se, index); in ppgtt_handle_guest_write_page_table_bytes()
1786 struct intel_gvt_gtt_entry se; in invalidate_ppgtt_mm() local
1793 ppgtt_get_shadow_root_entry(mm, &se, index); in invalidate_ppgtt_mm()
1795 if (!ops->test_present(&se)) in invalidate_ppgtt_mm()
1798 ppgtt_invalidate_spt_by_shadow_entry(vgpu, &se); in invalidate_ppgtt_mm()
1799 se.val64 = 0; in invalidate_ppgtt_mm()
1800 ppgtt_set_shadow_root_entry(mm, &se, index); in invalidate_ppgtt_mm()
1803 NULL, se.type, se.val64, index); in invalidate_ppgtt_mm()
1817 struct intel_gvt_gtt_entry ge, se; in shadow_ppgtt_mm() local
1840 ppgtt_generate_shadow_entry(&se, spt, &ge); in shadow_ppgtt_mm()
1841 ppgtt_set_shadow_root_entry(mm, &se, index); in shadow_ppgtt_mm()
1844 NULL, se.type, se.val64, index); in shadow_ppgtt_mm()
2414 struct intel_gvt_gtt_entry se; in alloc_scratch_pages() local
2416 memset(&se, 0, sizeof(struct intel_gvt_gtt_entry)); in alloc_scratch_pages()
2417 se.type = get_entry_type(type - 1); in alloc_scratch_pages()
2418 ops->set_pfn(&se, gtt->scratch_pt[type - 1].page_mfn); in alloc_scratch_pages()
2423 se.val64 |= _PAGE_PRESENT | _PAGE_RW; in alloc_scratch_pages()
2425 se.val64 |= PPAT_CACHED; in alloc_scratch_pages()
2428 ops->set_entry(scratch_pt, &se, i, false, 0, vgpu); in alloc_scratch_pages()