On Thu, 18 Apr 2024 16:10:57 -0700 nifan....@gmail.com wrote: > From: Fan Ni <fan...@samsung.com> > > Add (file/memory backed) host backend for DCD. All the dynamic capacity > regions will share a single, large enough host backend. Set up address > space for DC regions to support read/write operations to dynamic capacity > for DCD. > > With the change, the following support is added: > 1. Add a new property to type3 device "volatile-dc-memdev" to point to host > memory backend for dynamic capacity. Currently, all DC regions share one > host backend; > 2. Add namespace for dynamic capacity for read/write support; > 3. Create cdat entries for each dynamic capacity region. > > Signed-off-by: Fan Ni <fan...@samsung.com> One fixlet needed inline.
I've set range1_size_lo = 0 there for my tree. > @@ -301,10 +337,16 @@ static void build_dvsecs(CXLType3Dev *ct3d) > range2_size_lo = (2 << 5) | (2 << 2) | 0x3 | > (ct3d->hostpmem->size & 0xF0000000); > } > - } else { > + } else if (ct3d->hostpmem) { > range1_size_hi = ct3d->hostpmem->size >> 32; > range1_size_lo = (2 << 5) | (2 << 2) | 0x3 | > (ct3d->hostpmem->size & 0xF0000000); > + } else { > + /* > + * For DCD with no static memory, set memory active, memory class > bits. > + * No range is set. > + */ range1_size_hi is not initialized. > + range1_size_lo = (2 << 5) | (2 << 2) | 0x3; > } > > dvsec = (uint8_t *)&(CXLDVSECDevice){