[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Query] Unable to probe reserved-memory carveouts in DomU with Xen


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Beleswar Prasad Padhi <b-padhi@xxxxxx>
  • Date: Fri, 24 Jul 2026 14:56:31 +0530
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.195) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZHbxgTIavjyPTqu8VUIzrhRej/DC/CmLt3eZA4hJ1LI=; b=Gtr1iN1PvIYdAUiHZEzwTI73rPlEakzzH/Ua3P9NX6bsYA/OyNm1ndgcDeWw0oS1rLXFA6MMajKzEKp02Wi7SaHUPhtCXd3AqruqQkV5QnffUxJX8qHr5STqK/nzPoy3Ytdw7p0LtUIhs015TkDkMN8KeMzpdnKl+hDNB1uWKJaZdJ9HaKNYUjhXylrBDCh5Acbj3FnZT/NAoorvtmDEEdcP2Bn81vpZuXryPo360UVM7RxyZC5usIV9+TbvAIn6Grlfgw25DRekt9SgP40ce6nXCqZ3I0QGjEC5ICwBTegps9zITR2SJzTrelOM9P4Nv3fV4E0kFaYhkP/uRXKyoA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T17I6xyDzW+hyFThzXyUEGiy7pmVxmcrV2THUT/4pB2eLEI8ntdWmetAhc0Ximc3P2qfSzc1GnDNej9SExsIHj/AgphAglKr4+gUuLevt44NWnY3vXF4P4aJlrqhOyh7o1UYsIi+ppZUB+T+FDEP5Z6v5x895SodkxQm7NNRdVxqD1XuKHQdRnjT8kVGygE6M7QhQwKpMjR1O350GFUxcBOBqcDHMzyVPsm5sGN3ZyHrSTe1Jj4Y3fVGHYzRt5l28P16RE84xxkZIq5aoi2obIFrPWH3uXQvZIp7S7HJeqLMmRoQ0O0QS00FdLAjF7EMUAJyIHCZNdyPuuBkx2imcQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=proofpoint-05-2026 header.d=ti.com header.i="@ti.com" header.h="Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector1 header.d=ti.com header.i="@ti.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Delivery-date: Fri, 24 Jul 2026 09:26:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24/07/26 14:28, Orzel, Michal wrote:
>
> On 24-Jul-26 10:32, Padhi, Beleswar wrote:
>> Hello,
>>
>> Thanks for the response! I see, this would solve the cma problem. But 
>> there are usecases
>> when we want to use the reserved-memory node; one example is the 
>> firmware for
>> remote processors. In that case, how do we passthrough reserved-memory 
>> nodes to
>> DomUs?
> I'm afraid we don't have a solution for that at the moment but this is a
> limitation we are aware of.


No problem, I can look into implementing it. Thanks for the
heads up!

>  So far, when it comes to /reserved-memory we only
> have a static shared memory feature allowing to set up a shmem communication
> region between domUs, where the range is exposed to domains in DT following 
> this
> spec:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/reserved-memory/xen,shared-memory.txt


I see, is there any working example or documentation on
how to use these regions? DT/dom1.cfg configuration?

Thanks a lot,
Beleswar

>
> Cheers,
> Michal
>
>> Example:
>>   60
>>   61                 mcu_r52_0_fw_memory_region: memory@a1000000 {
>>   62                         compatible = "shared-dma-pool";
>>   63                         reg = <0x00 0xa1000000 0x00 0x100000>;
>>   64                         no-map;
>>   65                 };
>>
>> Thanks,
>> Beleswar
>>
>> On 7/24/2026 1:52 PM, Orzel, Michal wrote:
>>> Hi,
>>>
>>> I'm afraid this will not work. The reason is that Xen only copies nodes 
>>> from the
>>> passthrough DTB to final DTB that are placed under `/passthrough` node and
>>> `/aliases`. /reserved-memory needs to be under root node `/`, therefore it 
>>> will
>>> not be copied. However, it seems like you are not using CMA node specifying 
>>> a
>>> fixed memory region (using `reg`) but size. In that case you should be able 
>>> to
>>> achieve the same using `cma=128M` kernel cmdline parameter.
>>>
>>> ~Michal
>>>
>>> On 24-Jul-26 08:55, Beleswar Prasad Padhi wrote:
>>>> Hi all,
>>>>
>>>> I have been trying to use reserved-memory carveouts in DomU, but failing 
>>>> constantly.
>>>>
>>>> This is the log from Dom1 boot:
>>>>
>>>> [    0.000000] earlycon: uart8250 at MMIO32 0x0000000053914000 (options 
>>>> '115200n
>>>> 8')
>>>> [    0.000000] printk: legacy bootconsole [uart8250] enabled
>>>> [    0.000000] Xen 4.21 support found
>>>> [    0.000000] efi: UEFI not found.
>>>> *[    0.000000] OF: reserved mem: Reserved memory: No reserved-memory node 
>>>> in the DT*
>>>> [    0.000000] Zone ranges:
>>>> [    0.000000]   DMA      [mem 0x0000000040000000-0x0000000051ffffff]
>>>> [    0.000000]   DMA32    empty
>>>> [    0.000000]   Normal   empty
>>>> [    0.000000] Movable zone start for each node
>>>> [    0.000000] Early memory node ranges
>>>> [    0.000000]   node   0: [mem 0x0000000040000000-0x0000000051ffffff]
>>>> [    0.000000] Initmem setup node 0 [mem 
>>>> 0x0000000040000000-0x0000000051ffffff]
>>>> [    0.000000] On node 0, zone DMA: 24576 pages in unavailable ranges
>>>> [    0.000000] cma: Reserved 32 MiB at 0x000000004f800000
>>>>
>>>> This is my passthrough.dts:
>>>>
>>>>      1 /*
>>>>      2 * This is a partial DT for passthrough node to DomU.
>>>>      3 */
>>>>      4 #include <dt-bindings/interrupt-controller/irq.h>
>>>>      5 #include <dt-bindings/interrupt-controller/arm-gic.h>
>>>>      6
>>>>      7 /dts-v1/;
>>>>      8
>>>>      9 / {
>>>>     10         #address-cells = <2>;
>>>>     11         #size-cells = <1>;
>>>>     12
>>>> ~  13         reserved-memory {
>>>> ~  14                 #address-cells = <2>;
>>>> ~  15                 #size-cells = <2>;
>>>> +  16                 ranges;
>>>> +  17
>>>> +  18                 /* CMA region for framebuffer allocation */
>>>> +  19                 linux,cma {
>>>> +  20                         compatible = "shared-dma-pool";
>>>> +  21                         reusable;
>>>> +  22                         size = <0x00 0x08000000>; /* 128MB CMA pool 
>>>> */
>>>> +  23                         linux,cma-default;
>>>> +  24                 };
>>>>     25         };
>>>>     26
>>>>     27         passthrough {
>>>>     28                 compatible = "simple-bus";
>>>>     29                 ranges;
>>>>     30                 #address-cells = <2>;
>>>>     31                 #size-cells = <1>;
>>>>     32
>>>>     33                 misc_clk: misc_clk {
>>>>     34                         #clock-cells = <0>;
>>>>     35                         clock-frequency = <100000000>;
>>>>     36                         compatible = "fixed-clock";
>>>>     37                 };
>>>>
>>>>     73                 uart@53914000 {
>>>>     74                         compatible = "ns16550a";
>>>>     75                         reg = <0x00 0x53914000 0x1000>;
>>>> ~_ 76                         interrupts = <0 302 4>;
>>>>     77                         reg-shift = <2>;
>>>>     78                         reg-io-width = <4>;
>>>>     79                         clocks = <&misc_clk>;
>>>>     80                         oversampling-rate = <16>;
>>>>     81                         programmable-char-timeout = <4>;
>>>>     82                         status = "okay";
>>>>     83                         xen,path = 
>>>> "/bus@100000/bus@22000000/uart@53914000";
>>>>     84                         xen,reg = <0x0 0x53914000 0x1000 0x0 
>>>> 0x53914000>;
>>>>     85                         xen,force-assign-without-iommu;
>>>>     86                 };
>>>>     87          };
>>>>
>>>>     88    };
>>>>
>>>>
>>>> And this is my dom1.cfg file:
>>>>
>>>>   1 name = "dom1"
>>>>   2 memory = 256
>>>>   3 vcpus = 4
>>>>   4
>>>>   5 kernel = "/boot/xen-dom1/Image"
>>>>   6 extra = "console=ttyS0,115200n8 
>>>> earlycon=uart8250,mmio32,0x53914000,115200n8 loglevel=8 root=/dev/xvda rw"
>>>>   7
>>>>   8 # UART1 (0x53914000) passthrough to Dom1 console
>>>>   9 iomem = ["0x53914,1"]
>>>> 11 irqs = [ 334 ]
>>>> 12 dtdev = [ "/bus@100000/bus@22000000/uart@53914000"]
>>>> 13 vif = ["script=vif-route"]
>>>> 14 device_tree = "/boot/xen-dom1/passthrough.dtb"
>>>> 15 #
>>>> 17 disk = ["phy:/dev/vda2,xvda,rw"]
>>>>
>>>>
>>>> Am I doing something wrong? Any help or debugging leads would be really 
>>>> appreciated...
>>>>
>>>> Thank you,
>>>> Beleswar
>>>>
>>>>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.