Commit graph

12 commits

Author SHA1 Message Date
Sudarshan Rajagopalan
deccd624eb Revert "qvm: resize vm during kernel boot"
This reverts commit d83c70b503.
The oom during bootup issue is resovled by removing
CAP_IPC_LOCK from userspace. Revert this patch since it was
only added as temporary fix.

Change-Id: I1cfbfeede2f0a779dd9de193eb52f5de18f91dd9
Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
2023-07-12 15:34:22 -07:00
Sudarshan Rajagopalan
d83c70b503 qvm: resize vm during kernel boot
Resize the vm during kernel boot.

Change-Id: Ibef1819793ef7aab3d969d102b9a37871cec9a3e
Signed-off-by: Sudarshan Rajagopalan <quic_sudaraja@quicinc.com>
2023-06-30 10:27:29 -07:00
Chris Goldsworthy
ae6c90c0a0 mem-buf: Add mem_buf_dma_buf_get_vmperm()
Add mem_buf_dma_buf_get_vmperm() to allow people to get read-only
access to the VMIDs and permissions of a DMA-BUF.

Change-Id: Ie48ecd7db1cfa7c4339f9c1194d26a6bfef31a11
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-06-25 19:37:19 -07:00
Chris Goldsworthy
bd1a86a9fe mem-buf: Expose means to get memparcel_hdl from a DMA-BUF
Add mem_buf_dma_buf_get_memparcel_hdl() to let users obtain a
memparcel handle from a DMA-BUF, given that it has a valid handle.

Change-Id: I5945eb979c328f89292ac651425cc3585c27d0f3
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-02-02 16:32:00 -08:00
Patrick Daly
91c001919b mem-buf: Fix compilation error when QCOM_MEM_BUF=n
Correct the return type to match function signature.

Reported-by: ymg@qti.qualcomm.com
Change-Id: Iace72cc3794acfbc1ff9ddb67d7241f1b9117e44
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-12-17 21:39:54 -08:00
Patrick Daly
12058013a7 mem-buf: Add accessor for current_vmid
Allow other modules to access this variable.

Change-Id: I4eb92e6ea7bed0fb854a7aafe355f33a09120389
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-12-17 21:39:45 -08:00
Patrick Daly
a375851b6a mem-buf: Define MEM_BUF_MEM_TYPE_BUDDY
Define a new remote alloc type which tries to allocate contiguous
memory from cma. This memory will be transferred to a guest VM and
added to the buddy allocator using memory hotplug.

Change-Id: I04a4e734d24b6d8decac4e936d12d5e43b7f750b
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-12-17 21:39:45 -08:00
Patrick Daly
aa9a1b50ef dma-heaps: Define qcom tui carveout heap
Move behavior specific to the tui carveout heap usecase out of
the mem-buf driver, and existing dma-heap carveout driver into a
new file. This is done to reduce code complexity in the dma-heap
carveout driver, as well as to prepare for adding new mem-buf
clients.

Change-Id: I1241e009e63b8e21c55920d3561c5a1777cbf83c
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-12-17 21:39:43 -08:00
Patrick Daly
8145bbae35 mem-buf: Add accessor for mem_buf_desc sgl list
Allow clients to see what IPA address a mem_buf object is
mapped to.

Change-Id: Ib3d47cb78bf7b1b217950e1e59b8d542abb3a331
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-09-25 11:45:23 -07:00
Patrick Daly
0f6efbf911 mem-buf: Add infrastructure for requesting specific IPA address
gh_rm_mem_accept allows a VM to request memory to be mapped to a specific
IPA address. Modify function parameters to allow for future use of this
feature.

Change-Id: I6ad586886563e769549e4966369da48c27ca0a5c
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-09-25 11:45:19 -07:00
Patrick Daly
5a01357c0f mem-buf: Update message format to include trans_type
Allow a guest VM to choose whether the memory it requests is obtained
via the lend, share or donate hypervisor call.

Change-Id: I7e1f25ea0f9b0ec99d4a7afd79f206f9a2b67d85
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
2022-09-25 11:45:19 -07:00
Chris Goldsworthy
062d07cb6f mem-buf: Port the mem-buf headers from msm-5.15
Port the mem-buf headers from 5.15 as of commit f899231bc38b ("Merge
"msm: adsprpc: Handle length and variable scope""). Re-add mem-buf
references in mem-buf-exporter.h.

Change-Id: I89dffcaff907a6b774bd06cfada883414636dcbe
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2022-05-20 15:38:16 -07:00