Lines Matching refs:va_page
22 struct sgx_va_page *va_page = NULL; in sgx_encl_grow() local
29 va_page = kzalloc(sizeof(*va_page), GFP_KERNEL); in sgx_encl_grow()
30 if (!va_page) in sgx_encl_grow()
33 va_page->epc_page = sgx_alloc_va_page(reclaim); in sgx_encl_grow()
34 if (IS_ERR(va_page->epc_page)) { in sgx_encl_grow()
35 err = ERR_CAST(va_page->epc_page); in sgx_encl_grow()
36 kfree(va_page); in sgx_encl_grow()
43 return va_page; in sgx_encl_grow()
46 void sgx_encl_shrink(struct sgx_encl *encl, struct sgx_va_page *va_page) in sgx_encl_shrink() argument
50 if (va_page) { in sgx_encl_shrink()
51 sgx_encl_free_epc_page(va_page->epc_page); in sgx_encl_shrink()
52 list_del(&va_page->list); in sgx_encl_shrink()
53 kfree(va_page); in sgx_encl_shrink()
60 struct sgx_va_page *va_page; in sgx_encl_create() local
67 va_page = sgx_encl_grow(encl, true); in sgx_encl_create()
68 if (IS_ERR(va_page)) in sgx_encl_create()
69 return PTR_ERR(va_page); in sgx_encl_create()
70 else if (va_page) in sgx_encl_create()
71 list_add(&va_page->list, &encl->va_pages); in sgx_encl_create()
130 sgx_encl_shrink(encl, va_page); in sgx_encl_create()
265 struct sgx_va_page *va_page; in sgx_encl_add_page() local
278 va_page = sgx_encl_grow(encl, true); in sgx_encl_add_page()
279 if (IS_ERR(va_page)) { in sgx_encl_add_page()
280 ret = PTR_ERR(va_page); in sgx_encl_add_page()
291 if (va_page) in sgx_encl_add_page()
292 list_add(&va_page->list, &encl->va_pages); in sgx_encl_add_page()
334 sgx_encl_shrink(encl, va_page); in sgx_encl_add_page()