Skip to content

Commit 5661554

Browse files
authored
Add READ_ONLY flag to indicate access type to allocated host memory (#454)
* Add READ_ONLY flag to indicate access type to allocated host memory allows mapping host memory as read-only on device when zeMemAllocHost() is used with external memmap sysmem. Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
1 parent 835157b commit 5661554

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/core/EXT_ExternalMemMap.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ Mapping External Memory to Host Allocation
3232

3333
Accelerator devices can map external memory as a host allocation. The ${x}_external_memmap_sysmem_ext_desc_t struct defines the system memory being mapped as part of the ${x}MemAllocHost.
3434
The user may use this extention to specify, as part of the pNext member of the ${x}_host_mem_alloc_desc_t , the system memory that needs to be mapped as part of the allocation being created with a call to ${x}MemAllocHost.
35+
For read-only system memory $(X}_HOST_MEM_ALLOC_FLAG_MEM_READ_ONLY flag should be set in ${x}_host_mem_alloc_desc_t.
3536

scripts/core/memory.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ etors:
5656
- name: BIAS_INITIAL_PLACEMENT
5757
desc: "optimize shared allocation for first access on the host"
5858
version: "1.2"
59+
- name: MEM_READ_ONLY
60+
desc: "device access will be read-only, mutually exclusive with $X_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED"
61+
version: "1.16"
5962
--- #--------------------------------------------------------------------------
6063
type: struct
6164
desc: "Host memory allocation descriptor"

0 commit comments

Comments
 (0)