From c811ad67a603dbb0409d4e9d7536b4006f38ec81 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Wed, 1 May 2024 14:31:00 -0700 Subject: [PATCH 1/2] ARM: dts: msm: Add support for mem-buf-msgq between oemvm and pvm Allow mem-buf ipc messages between oemvm and pvm. Change-Id: Ib3209f72bbcb146f7f3ae9e4d75e474750e2dd97 Signed-off-by: Patrick Daly --- qcom/sun-oemvm.dtsi | 11 +++++++++++ qcom/sun-vm.dtsi | 1 + qcom/sun.dtsi | 9 +++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/qcom/sun-oemvm.dtsi b/qcom/sun-oemvm.dtsi index f4efebdd..364cf637 100644 --- a/qcom/sun-oemvm.dtsi +++ b/qcom/sun-oemvm.dtsi @@ -182,6 +182,15 @@ qcom,label = <0x3>; }; + mem-buf-message-queue-pair { + vdevice-type = "message-queue-pair"; + generate = "/hypervisor/membuf-msgq-pair"; + message-size = <0x000000f0>; + queue-depth = <0x00000008>; + peer-default; + qcom,label = <0x000000C>; + }; + qrtr-shm { vdevice-type = "shm-doorbell"; generate = "/hypervisor/qrtr-shm"; @@ -237,11 +246,13 @@ qcom,mem-buf { compatible = "qcom,mem-buf"; + qcom,mem-buf-capabilities = "consumer"; qcom,vmid = <49>; }; qcom,mem-buf-msgq { compatible = "qcom,mem-buf-msgq"; + qcom,msgq-names = "oem_vm"; }; qcom,test-dbl-oemvm { diff --git a/qcom/sun-vm.dtsi b/qcom/sun-vm.dtsi index 2da5090e..4518418d 100644 --- a/qcom/sun-vm.dtsi +++ b/qcom/sun-vm.dtsi @@ -692,6 +692,7 @@ qcom,mem-buf-msgq { compatible = "qcom,mem-buf-msgq"; + qcom,msgq-names = "trusted_vm"; }; virtio_mem_device { diff --git a/qcom/sun.dtsi b/qcom/sun.dtsi index 6e2bc13c..068912c1 100644 --- a/qcom/sun.dtsi +++ b/qcom/sun.dtsi @@ -904,15 +904,16 @@ qcom,vmid = <3>; }; + qcom,mem-buf-msgq { + compatible = "qcom,mem-buf-msgq"; + qcom,msgq-names = "trusted_vm", "oem_vm"; + }; + qcom,hdcp { compatible = "qcom,hdcp"; qcom,use-smcinvoke = <1>; }; - qcom,mem-buf-msgq { - compatible = "qcom,mem-buf-msgq"; - }; - qti,smmu-proxy { compatible = "smmu-proxy-sender"; }; From 25f36f4f2a2ab5c9bfe8df9df950370fa5cdcf47 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Thu, 2 May 2024 10:56:23 -0700 Subject: [PATCH 2/2] ARM: dts: msm: Enable dma-heaps on OEMVM Enable dma-heaps driver on OEMVM, as well as bringing in other features such as virtio mem and large-dma buf support. Change-Id: I7f679c061ba65237541363bd0b406bb4e58e697e Signed-off-by: Patrick Daly --- qcom/sun-oemvm.dtsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qcom/sun-oemvm.dtsi b/qcom/sun-oemvm.dtsi index 364cf637..ba365ab6 100644 --- a/qcom/sun-oemvm.dtsi +++ b/qcom/sun-oemvm.dtsi @@ -205,7 +205,7 @@ }; firmware: firmware { - scm { + qcom_scm: scm { compatible = "qcom,scm"; }; }; @@ -247,6 +247,8 @@ qcom,mem-buf { compatible = "qcom,mem-buf"; qcom,mem-buf-capabilities = "consumer"; + qcom,ipa-range = <0x0 0x0 0xf 0xffffffff>; + qcom,dmabuf-ipa-size = <0x1 0x00000000>; /* 4GB IPA space for dmabuf */ qcom,vmid = <49>; }; @@ -255,6 +257,14 @@ qcom,msgq-names = "oem_vm"; }; + virtio_mem_device { + compatible = "qcom,virtio-mem"; + /* Must be memory_block_size_bytes() aligned */ + qcom,max-size = <0x0 0x10000000>; + qcom,ipa-range = <0x0 0x0 0xf 0xffffffff>; + qcom,block-size = <0x400000>; + }; + qcom,test-dbl-oemvm { compatible = "qcom,gh-dbl"; qcom,label = <0x5>; @@ -300,3 +310,4 @@ msgq-label = <3>; }; }; +#include "sun-vm-dma-heaps.dtsi"