Lines Matching refs:page_index
108 unsigned long page_index) in sgx_encl_get_backing_page_pcmd_offset() argument
112 return epc_end_off + page_index * sizeof(struct sgx_pcmd); in sgx_encl_get_backing_page_pcmd_offset()
118 static inline void sgx_encl_truncate_backing_page(struct sgx_encl *encl, unsigned long page_index) in sgx_encl_truncate_backing_page() argument
122 shmem_truncate_range(inode, PFN_PHYS(page_index), PFN_PHYS(page_index) + PAGE_SIZE - 1); in sgx_encl_truncate_backing_page()
135 pgoff_t page_index, page_pcmd_off; in __sgx_encl_eldu() local
144 page_index = PFN_DOWN(encl_page->desc - encl_page->encl->base); in __sgx_encl_eldu()
146 page_index = PFN_DOWN(encl->size); in __sgx_encl_eldu()
151 pcmd_first_page = PFN_PHYS(page_index & ~PCMD_FIRST_MASK) + encl->base; in __sgx_encl_eldu()
153 page_pcmd_off = sgx_encl_get_backing_page_pcmd_offset(encl, page_index); in __sgx_encl_eldu()
155 ret = sgx_encl_lookup_backing(encl, page_index, &b); in __sgx_encl_eldu()
193 sgx_encl_truncate_backing_page(encl, page_index); in __sgx_encl_eldu()
736 static int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index, in sgx_encl_get_backing() argument
739 pgoff_t page_pcmd_off = sgx_encl_get_backing_page_pcmd_offset(encl, page_index); in sgx_encl_get_backing()
743 contents = sgx_encl_get_backing_page(encl, page_index); in sgx_encl_get_backing()
753 backing->page_index = page_index; in sgx_encl_get_backing()
826 int sgx_encl_alloc_backing(struct sgx_encl *encl, unsigned long page_index, in sgx_encl_alloc_backing() argument
833 ret = sgx_encl_get_backing(encl, page_index, backing); in sgx_encl_alloc_backing()
856 int sgx_encl_lookup_backing(struct sgx_encl *encl, unsigned long page_index, in sgx_encl_lookup_backing() argument
859 return sgx_encl_get_backing(encl, page_index, backing); in sgx_encl_lookup_backing()