Home
last modified time | relevance | path

Searched refs:va_page (Results 1 – 4 of 4) sorted by relevance

/openbmc/linux/arch/x86/kernel/cpu/sgx/
H A Dioctl.c29 va_page = kzalloc(sizeof(*va_page), GFP_KERNEL); in sgx_encl_grow()
30 if (!va_page) in sgx_encl_grow()
36 kfree(va_page); in sgx_encl_grow()
43 return va_page; in sgx_encl_grow()
50 if (va_page) { in sgx_encl_shrink()
53 kfree(va_page); in sgx_encl_shrink()
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()
279 if (IS_ERR(va_page)) { in sgx_encl_add_page()
[all …]
H A Dencl.h34 struct sgx_va_page *va_page; member
120 unsigned int sgx_alloc_va_slot(struct sgx_va_page *va_page);
121 void sgx_free_va_slot(struct sgx_va_page *va_page, unsigned int offset);
122 bool sgx_va_page_full(struct sgx_va_page *va_page);
127 void sgx_encl_shrink(struct sgx_encl *encl, struct sgx_va_page *va_page);
H A Dencl.c334 struct sgx_va_page *va_page; in sgx_encl_eaug_page() local
369 va_page = sgx_encl_grow(encl, false); in sgx_encl_eaug_page()
370 if (IS_ERR(va_page)) { in sgx_encl_eaug_page()
371 if (PTR_ERR(va_page) == -EBUSY) in sgx_encl_eaug_page()
376 if (va_page) in sgx_encl_eaug_page()
420 sgx_encl_shrink(encl, va_page); in sgx_encl_eaug_page()
704 struct sgx_va_page *va_page; in sgx_encl_release() local
751 list_del(&va_page->list); in sgx_encl_release()
753 kfree(va_page); in sgx_encl_release()
1276 set_bit(slot, va_page->slots); in sgx_alloc_va_slot()
[all …]
H A Dmain.c202 struct sgx_va_page *va_page; in sgx_encl_ewb() local
209 va_page = list_first_entry(&encl->va_pages, struct sgx_va_page, in sgx_encl_ewb()
211 va_offset = sgx_alloc_va_slot(va_page); in sgx_encl_ewb()
212 va_slot = sgx_get_epc_virt_addr(va_page->epc_page) + va_offset; in sgx_encl_ewb()
213 if (sgx_va_page_full(va_page)) in sgx_encl_ewb()
214 list_move_tail(&va_page->list, &encl->va_pages); in sgx_encl_ewb()
243 sgx_free_va_slot(va_page, va_offset); in sgx_encl_ewb()
246 encl_page->va_page = va_page; in sgx_encl_ewb()