| /linux/include/linux/ | 
| H A D | tee_drv.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3  * Copyright (c) 2015-2024 Linaro Limited 24  * struct tee_context - driver specific context on file pointer data 30  *              shared memory release. 32  *              wait for tee-supplicant daemon to be started if not present 35  *              non-blockin [all...] | 
| H A D | tee_core.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 11 #include <linux/dma-buf.h> 26 #define TEE_SHM_DYNAMIC		BIT(0)  /* Dynamic shared memory registered */ 28 #define TEE_SHM_USER_MAPPED	BIT(1)  /* Memory mapped in user space */ 29 #define TEE_SHM_POOL		BIT(2)  /* Memory allocated from pool */ 30 #define TEE_SHM_PRIV		BIT(3)  /* Memory privat [all...] | 
| /linux/Documentation/admin-guide/mm/ | 
| H A D | numa_memory_policy.rst | 2 NUMA Memory Policy 5 What is NUMA Memory Policy? 8 In the Linux kernel, "memory policy" determines from which node the kernel will 9 allocate memory in a NUMA system or in an emulated NUMA system.  Linux has 10 supported platforms with Non-Uniform Memory Access architectures since 2.4.?. 11 The current memory policy support was added to Linux 2.6 around May 2004.  This 12 document attempts to describe the concepts and APIs of the 2.6 memory policy 15 Memory policies should not be confused with cpusets 16 (``Documentation/admin-guide/cgroup-v1/cpusets.rst``) 18 memory may be allocated by a set of processes. Memory policies are a [all …] 
 | 
| H A D | nommu-mmap.rst | 2 No-MMU memory mapping support 5 The kernel has limited support for memory mapping under no-MMU conditions, such 6 as are used in uClinux environments. From the userspace point of view, memory 12 Memory mapping behaviour also involves the way fork(), vfork(), clone() and 16 The behaviour is similar between the MMU and no-MMU cases, but not identical; 21 	In the MMU case: VM regions backed by arbitrary pages; copy-on-write 24 	In the no-MMU case: VM regions backed by arbitrary contiguous runs of 30 	shared across fork() or clone() without CLONE_VM in the MMU case. Since 31 	the no-MMU case doesn't support these, behaviour is identical to 39 	In the no-MMU case: [all …] 
 | 
| /linux/drivers/tee/ | 
| H A D | tee_shm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  * Copyright (c) 2015-2017, 2019-2021 Linaro Limited 7 #include <linux/dma-buf.h> 8 #include <linux/dma-mapping.h> 44 	if (shm->pages) {  in release_registered_pages() 45 		if (shm->flags & TEE_SHM_USER_MAPPED)  in release_registered_pages() 46 			unpin_user_pages(shm->pages, shm->num_pages);  in release_registered_pages() 48 			shm_put_kernel_pages(shm->pages, shm->num_pages);  in release_registered_pages() 50 		kfree(shm->pages);  in release_registered_pages() 58 	if (shm->flags & TEE_SHM_DMA_MEM) {  in tee_shm_release() [all …] 
 | 
| /linux/include/uapi/linux/ | 
| H A D | tee.h | 2  * Copyright (c) 2015-2016, Linaro Limited 49 #define TEE_GEN_CAP_REG_MEM	(1 << 2)/* Supports registering shared memory */ 53 #define TEE_MEMREF_NULL		((__u64)(-1)) /* NULL MemRef Buffer */ 54 #define TEE_OBJREF_NULL		((__u64)(-1)) /* NULL ObjRef Object */ 65  * OP-TEE specific capabilities 70  * struct tee_ioctl_version_data - TEE version 86  * TEE_IOC_VERSION - query version of TEE 95  * struct tee_ioctl_shm_alloc_data - Shared memor [all...] | 
| H A D | um_timetravel.h | 1 /* SPDX-License-Identifier: BSD-3-Clause */ 3  * Copyright (C) 2019 - 2023 Intel Corporation 10  * struct um_timetravel_msg - UM time travel message 14  * This is the message passed between the host (user-mode Linux instance) 30 	 * @seq: sequence number for the message - shall be reflected in 46  * enum um_timetravel_shared_mem_fds - fds sent in ACK message for START message 50 	 * @UM_TIMETRAVEL_SHARED_MEMFD: Index of the shared memory file 63  * enum um_timetravel_start_ack - ack-time mask for start message 73  * enum um_timetravel_ops - Operation codes 79 	 *	unless otherwise specified below, note: while using shared [all …] 
 | 
| /linux/Documentation/devicetree/bindings/reserved-memory/ | 
| H A D | xen,shared-memory.txt | 1 * Xen hypervisor reserved-memory binding 3 Expose one or more memory regions as reserved-memory to the guest 5 to be a shared memory area across multiple virtual machines for 8 For each of these pre-shared memory regions, a range is exposed under 9 the /reserved-memory node as a child node. Each range sub-node is named 10 xen-shmem@<address> and has the following properties: 12 - compatible: 13 	compatible = "xen,shared-memory-v1" 15 - reg: 16 	the base guest physical address and size of the shared memory region [all …] 
 | 
| H A D | qcom,cmd-db.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/reserved-memory/qcom,cmd-db.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 12   is stored in a shared memory region and is loaded by the remote processor. 15   controlling shared resources. Depending on the board configuration the shared 17   remote processor and made available in the shared memory. 20   - Bjorn Andersson <bjorn.andersson@linaro.org> 23   - $ref: reserved-memory.yaml 27     const: qcom,cmd-db [all …] 
 | 
| /linux/Documentation/userspace-api/ | 
| H A D | unshare.rst | 10 ---------- 14 -------- 26 ----------- 37 outside the confinement of all-or-nothing shared resources of legacy 44 shared at the time of their creation. unshare() was conceptualized by 45 Al Viro in the August of 2000, on the Linux-Kernel mailing list, as part 48 shared resources without creating a new process. unshare() is a natural 53 ----------- 57 resources is not possible. Since namespaces are shared by default 59 even non-threaded applications if they have a need to disassociate [all …] 
 | 
| /linux/drivers/net/ipa/ | 
| H A D | ipa_qmi_msg.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 4  * Copyright (C) 2018-2024 Linaro Ltd. 18 #define IPA_QMI_INDICATION_REGISTER	0x20	/* modem -> AP request */ 19 #define IPA_QMI_INIT_DRIVER		0x21	/* AP -> modem request */ 20 #define IPA_QMI_INIT_COMPLETE		0x22	/* AP -> modem indication */ 21 #define IPA_QMI_DRIVER_INIT_COMPLETE	0x35	/* modem -> AP request */ 28 #define IPA_QMI_INDICATION_REGISTER_REQ_SZ	20	/* -> server handle */ 29 #define IPA_QMI_INDICATION_REGISTER_RSP_SZ	7	/* <- server handle */ 30 #define IPA_QMI_INIT_DRIVER_REQ_SZ		162	/* client handle -> */ 31 #define IPA_QMI_INIT_DRIVER_RSP_SZ		25	/* client handle <- */ [all …] 
 | 
| H A D | ipa_uc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4  * Copyright (C) 2018-2024 Linaro Ltd. 31  * A 128 byte block of structured memory within the IPA SRAM is used together 33  * AP and the IPA microcontroller.  Each side writes data to the shared area 35  * to the interrupt.  Some information found in the shared area is currently 36  * unused.  All remaining space in the shared area is reserved, and must not 45  * struct ipa_uc_mem_area - AP/microcontroller shared memory area 46  * @command:		command code (AP->microcontroller) 48  * @command_param:	low 32 bits of command parameter (AP->microcontroller) [all …] 
 | 
| /linux/tools/testing/selftests/mm/ | 
| H A D | hugepage-shm.c | 1 // SPDX-License-Identifier: GPL-2.0 3  * hugepage-shm: 5  * Example of using huge page memory in a user application using Sys V shared 6  * memory system calls.  In this example the app is requesting 256MB of 7  * memory that is backed by huge pages.  The application uses the flag 11  * Note: The default shared memory limit is quite low on many kernels, 16  * This will increase the maximum size per shared memory segment to 256MB. 18  * total amount of shared memory in pages. To set it to 16GB on a system 49 	if (shmaddr == (char *)-1) {  in main() 50 		perror("Shared memory attach failure");  in main()
  | 
| /linux/drivers/tee/optee/ | 
| H A D | optee_rpc_cmd.h | 1 /* SPDX-License-Identifier: BSD-2-Clause */ 3  * Copyright (c) 2016-2021, Linaro Limited 14  * RPC communication with tee-supplicant is reversed compared to normal 23  * 1970-01-01 00:00:00 +0000 (UTC). 39  * which instead is sent via a non-secure interrupt. 62  * Allocate a piece of shared memory 64  * [in]    value[0].a	    Type of memory one of 71 /* Memory that can be shared with a non-secure user space application */ 73 /* Memory only shared with non-secure kernel */ 77  * Free shared memory previously allocated with OPTEE_RPC_CMD_SHM_ALLOC [all …] 
 | 
| /linux/tools/testing/selftests/arm64/mte/ | 
| H A D | check_child_memory.c | 1 // SPDX-License-Identifier: GPL-2.0 25 	1, 537, 989, 1269, MT_GRANULE_SIZE - 1, MT_GRANULE_SIZE, 26 	/* page size - 1*/ 0, /* page_size */ 0, /* page size + 1 */ 0 38 	if (child == -1) {  in check_child_tag_inheritance() 58 		mte_initialize_current_context(mode, (uintptr_t)ptr, -UNDERFLOW);  in check_child_tag_inheritance() 59 		memset(ptr - UNDERFLOW, '2', UNDERFLOW);  in check_child_tag_inheritance() 115 		if (fd == -1)  in check_child_file_mapping() 126 		/* Only mte enabled memory will allow tag insertion */  in check_child_file_mapping() 129 			ksft_print_msg("FAIL: Insert tags on file based memory\n");  in check_child_file_mapping() 154 	sizes[item - 3] = page_size - 1;  in main() [all …] 
 | 
| /linux/include/linux/soc/apple/ | 
| H A D | rtkit.h | 1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */ 6  * Apple's SoCs come with various co-processors running their RTKit operating 18  * Struct to represent implementation-specific RTKit operations. 20  * @buffer:    Shared memory buffer allocated inside normal RAM. 21  * @iomem:     Shared memory buffer controlled by the co-processors. 22  * @size:      Size of the shared memory buffer. 23  * @iova:      Device VA of shared memory buffer. 24  * @is_mapped: Shared memory buffer is managed by the co-processor. 38  * Struct to represent implementation-specific RTKit operations. 40  * @crashed:       Called when the co-processor has crashed. Runs in process [all …] 
 | 
| /linux/arch/arm/boot/dts/st/ | 
| H A D | stm32mp157a-microgea-stm32mp1.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 3  * Copyright (c) STMicroelectronics 2019 - All Rights Reserved 9 	compatible = "engicam,microgea-stm32mp1", "st,stm32mp157"; 11 	memory@c0000000 { 12 		device_type = "memory"; 16 	reserved-memory { 17 		#address-cells = <1>; 18 		#size-cells = <1>; 22 			compatible = "shared-dma-pool"; 24 			no-map; [all …] 
 | 
| /linux/Documentation/virt/hyperv/ | 
| H A D | coco.rst | 1 .. SPDX-License-Identifier: GPL-2.0 5 Hyper-V can create and run Linux guests that are Confidential Computing 7 the confidentiality and integrity of data in the VM's memory, even in the 9 CoCo VMs on Hyper-V share the generic CoCo VM threat model and security 10 objectives described in Documentation/security/snp-tdx-threat-model.rst. Note 11 that Hyper-V specific code in Linux refers to CoCo VMs as "isolated VMs" or 14 A Linux CoCo VM on Hyper-V requires the cooperation and interaction of the 19 * The hardware runs a version of Windows/Hyper-V with support for CoCo VMs 25 * AMD processor with SEV-SNP. Hyper-V does not run guest VMs with AMD SME, 26   SEV, or SEV-ES encryption, and such encryption is not sufficient for a CoCo [all …] 
 | 
| /linux/arch/x86/coco/tdx/ | 
| H A D | tdx.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (C) 2021-2022 Intel Corporation */ 16 #include <asm/insn-eval.h> 80 /* Read TD-scoped metadata */ 94 /* Write TD-scoped metadata */ 107  * tdx_mcall_get_report0() - Wrapper to get TDREPORT0 (a.k.a. TDREPORT 109  * @reportdata: Address of the input buffer which contains user-defined 118  * Return 0 on success, -ENXIO for invalid operands, -EBUSY for busy operation, 119  * or -EIO on other TDCALL failures. 133 			return -ENXIO;  in tdx_mcall_get_report0() [all …] 
 | 
| /linux/arch/arm/boot/dts/ti/omap/ | 
| H A D | am572x-idk-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3  * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com/ 6 #include <dt-bindings/gpio/gpio.h> 7 #include <dt-bindings/interrupt-controller/irq.h> 8 #include "am57xx-idk-common.dtsi" 9 #include "dra74-ipu-dsp-common.dtsi" 12 	memory@0 { 13 		device_type = "memory"; 17 	reserved-memory { 18 		#address-cells = <2>; [all …] 
 | 
| /linux/tools/memory-model/Documentation/ | 
| H A D | README | 4 Linux-kernel memory model (LKMM) audience might be anywhere from novice 12 If LKMM-specific terms lost you, glossary.txt might help you. 14 o	You are new to Linux-kernel concurrency: simple.txt 16 o	You have some background in Linux-kernel concurrency, and would 17 	like an overview of the types of low-level concurrency primitives 22 o	You are familiar with the Linux-kernel concurrency primitives 24 	tests:  litmus-tests.txt 26 o	You need to locklessly access shared variables that are otherwise 30 	recipes.txt, but is self-contained. 32 o	You are familiar with Linux-kernel concurrency, and would [all …] 
 | 
| /linux/tools/testing/selftests/powerpc/ptrace/ | 
| H A D | ptrace-tm-spr.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 /* Tracee and tracer shared data */ 11 struct shared {  struct 18 struct shared *cptr, *pptr;  argument 26 	FAIL_IF(regs->tm_tfhar != tfhar);  in validate_tm_spr() 27 	FAIL_IF((regs->tm_texasr == TM_KVM_SCHED) && (regs->tm_tfiar != 0));  in validate_tm_spr() 37 	cptr = (struct shared *)shmat(shm_id, NULL, 0);  in tm_spr() 46 		"bl 4f;"	/* $ = TFHAR - 12 */  in tm_spr() 75 		: "memory", "r0", "r8", "r31"  in tm_spr() 82 		if (!cptr->flag)  in tm_spr() [all …] 
 | 
| /linux/tools/perf/Documentation/ | 
| H A D | perf-c2c.txt | 1 perf-c2c(1) 5 ---- 6 perf-c2c - Shared Data C2C/HITM Analyzer. 9 -------- 12 'perf c2c record' [<options>] \-- [<record command options>] <command> 16 ----------- 19 The perf c2c tool provides means for Shared Data C2C/HITM analysis. It allows 27 required. See linkperf:perf-arm-spe[1] for a setup guide. Due to the 28 statistical nature of Arm SPE sampling, not every memory operation will be 32   - memory address of the access [all …] 
 | 
| /linux/drivers/net/ethernet/microsoft/mana/ | 
| H A D | shm_channel.c | 1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 17 #define SHMEM_VF_RESET_STATE ((u32)-1) 32 /* Shared memory channel protocol header 38  * direction: 0 for request, VF->PF; 1 for response, PF->VF. 67 #define SMC_LAST_DWORD (SMC_APERTURE_DWORDS - 1) 93 	return -ETIMEDOUT;  in mana_smc_poll_register() 99 	void __iomem *base = sc->base;  in mana_smc_read_response() 116 		dev_err(sc->dev, "Wrong SMC response 0x%x, type=%d, ver=%d\n",  in mana_smc_read_response() 118 		return -EPROTO;  in mana_smc_read_response() 123 		dev_err(sc->dev, "SMC operation failed: 0x%x\n", hdr.status);  in mana_smc_read_response() [all …] 
 | 
| /linux/Documentation/driver-api/ | 
| H A D | ntb.rst | 5 NTB (Non-Transparent Bridge) is a type of PCI-Express bridge chip that connects 6 the separate memory systems of two or more computers to the same PCI-Express 8 registers and memory translation windows, as well as non common features like 9 scratchpad and message registers. Scratchpad registers are read-and-writable 15 Memory windows allow translated read and write access to the peer memory. 36 ---------------------------------------- 38 Primary purpose of NTB is to share some piece of memory between at least two 40 mainly used to perform the proper memory window initialization. Typically 41 there are two types of memory window interfaces supported by the NTB API: 48  Memory:              Local NTB Port:      Peer NTB Port:      Peer MMIO: [all …] 
 |