Lines Matching refs:epc_page

94 		if (entry->epc_page &&  in reclaimer_writing_to_pcmd()
133 struct sgx_epc_page *epc_page, in __sgx_encl_eldu() argument
172 ret = __eldu(&pginfo, sgx_get_epc_virt_addr(epc_page), in __sgx_encl_eldu()
173 sgx_get_epc_virt_addr(encl_page->va_page->epc_page) + va_offset); in __sgx_encl_eldu()
217 struct sgx_epc_page *epc_page; in sgx_encl_eldu() local
220 epc_page = sgx_alloc_epc_page(encl_page, false); in sgx_encl_eldu()
221 if (IS_ERR(epc_page)) in sgx_encl_eldu()
222 return epc_page; in sgx_encl_eldu()
224 ret = __sgx_encl_eldu(encl_page, epc_page, secs_page); in sgx_encl_eldu()
226 sgx_encl_free_epc_page(epc_page); in sgx_encl_eldu()
233 encl_page->epc_page = epc_page; in sgx_encl_eldu()
235 return epc_page; in sgx_encl_eldu()
241 struct sgx_epc_page *epc_page; in __sgx_encl_load_page() local
244 if (entry->epc_page) { in __sgx_encl_load_page()
251 if (!(encl->secs.epc_page)) { in __sgx_encl_load_page()
252 epc_page = sgx_encl_eldu(&encl->secs, NULL); in __sgx_encl_load_page()
253 if (IS_ERR(epc_page)) in __sgx_encl_load_page()
254 return ERR_CAST(epc_page); in __sgx_encl_load_page()
257 epc_page = sgx_encl_eldu(entry, encl->secs.epc_page); in __sgx_encl_load_page()
258 if (IS_ERR(epc_page)) in __sgx_encl_load_page()
259 return ERR_CAST(epc_page); in __sgx_encl_load_page()
262 sgx_mark_page_reclaimable(entry->epc_page); in __sgx_encl_load_page()
320 struct sgx_epc_page *epc_page; in sgx_encl_eaug_page() local
342 epc_page = sgx_alloc_epc_page(encl_page, false); in sgx_encl_eaug_page()
343 if (IS_ERR(epc_page)) { in sgx_encl_eaug_page()
344 if (PTR_ERR(epc_page) == -EBUSY) in sgx_encl_eaug_page()
368 pginfo.secs = (unsigned long)sgx_get_epc_virt_addr(encl->secs.epc_page); in sgx_encl_eaug_page()
372 ret = __eaug(&pginfo, sgx_get_epc_virt_addr(epc_page)); in sgx_encl_eaug_page()
377 encl_page->epc_page = epc_page; in sgx_encl_eaug_page()
381 sgx_mark_page_reclaimable(encl_page->epc_page); in sgx_encl_eaug_page()
383 phys_addr = sgx_get_epc_phys_addr(epc_page); in sgx_encl_eaug_page()
402 sgx_encl_free_epc_page(epc_page); in sgx_encl_eaug_page()
452 phys_addr = sgx_get_epc_phys_addr(entry->epc_page); in sgx_vma_fault()
563 ret = __edbgrd(sgx_get_epc_virt_addr(page->epc_page) + offset, data); in sgx_encl_debug_read()
576 ret = __edbgwr(sgx_get_epc_virt_addr(page->epc_page) + offset, data); in sgx_encl_debug_write()
692 if (entry->epc_page) { in sgx_encl_release()
697 if (sgx_unmark_page_reclaimable(entry->epc_page)) in sgx_encl_release()
700 sgx_encl_free_epc_page(entry->epc_page); in sgx_encl_release()
702 entry->epc_page = NULL; in sgx_encl_release()
723 if (!encl->secs_child_cnt && encl->secs.epc_page) { in sgx_encl_release()
724 sgx_encl_free_epc_page(encl->secs.epc_page); in sgx_encl_release()
725 encl->secs.epc_page = NULL; in sgx_encl_release()
732 sgx_encl_free_epc_page(va_page->epc_page); in sgx_encl_release()
745 WARN_ON_ONCE(encl->secs.epc_page); in sgx_encl_release()
1224 struct sgx_epc_page *epc_page; in sgx_alloc_va_page() local
1227 epc_page = sgx_alloc_epc_page(NULL, reclaim); in sgx_alloc_va_page()
1228 if (IS_ERR(epc_page)) in sgx_alloc_va_page()
1229 return ERR_CAST(epc_page); in sgx_alloc_va_page()
1231 ret = __epa(sgx_get_epc_virt_addr(epc_page)); in sgx_alloc_va_page()
1234 sgx_encl_free_epc_page(epc_page); in sgx_alloc_va_page()
1238 return epc_page; in sgx_alloc_va_page()