Lines Matching refs:epc_page
36 struct sgx_epc_page *epc_page; in __sgx_vepc_fault() local
45 epc_page = xa_load(&vepc->page_array, index); in __sgx_vepc_fault()
46 if (epc_page) in __sgx_vepc_fault()
49 epc_page = sgx_alloc_epc_page(vepc, false); in __sgx_vepc_fault()
50 if (IS_ERR(epc_page)) in __sgx_vepc_fault()
51 return PTR_ERR(epc_page); in __sgx_vepc_fault()
53 ret = xa_err(xa_store(&vepc->page_array, index, epc_page, GFP_KERNEL)); in __sgx_vepc_fault()
57 pfn = PFN_DOWN(sgx_get_epc_phys_addr(epc_page)); in __sgx_vepc_fault()
70 sgx_free_epc_page(epc_page); in __sgx_vepc_fault()
114 static int sgx_vepc_remove_page(struct sgx_epc_page *epc_page) in sgx_vepc_remove_page() argument
125 return __eremove(sgx_get_epc_virt_addr(epc_page)); in sgx_vepc_remove_page()
128 static int sgx_vepc_free_page(struct sgx_epc_page *epc_page) in sgx_vepc_free_page() argument
130 int ret = sgx_vepc_remove_page(epc_page); in sgx_vepc_free_page()
149 sgx_free_epc_page(epc_page); in sgx_vepc_free_page()
191 struct sgx_epc_page *epc_page, *tmp, *entry; in sgx_vepc_release() local
214 epc_page = entry; in sgx_vepc_release()
221 if (sgx_vepc_free_page(epc_page)) in sgx_vepc_release()
222 list_add_tail(&epc_page->list, &secs_pages); in sgx_vepc_release()
235 list_for_each_entry_safe(epc_page, tmp, &zombie_secs_pages, list) { in sgx_vepc_release()
242 list_del(&epc_page->list); in sgx_vepc_release()
244 if (sgx_vepc_free_page(epc_page)) in sgx_vepc_release()
245 list_add_tail(&epc_page->list, &secs_pages); in sgx_vepc_release()