Re: [PATCH v12 2/8] cxl/mem: Read dynamic capacity configuration from the device
Gregory Price <[email protected]> Tue, 4 Aug 2026 12:00:39 -0400
| Newsgroups | org.kernel.vger.linux-cxl,dev.linux.lists.nvdimm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <anIMLnbG_KmRfjv6@gourry-fedora-PF4VCD3F> |
On Tue, Aug 04, 2026 at 02:12:44AM -0700, Anisa Su wrote: > On Mon, Aug 03, 2026 at 02:52:17PM -0700, Alison Schofield wrote: > > On Fri, Jul 31, 2026 at 01:48:07AM -0700, Anisa Su wrote: > > > From: Ira Weiny <[email protected]> > > > > > > Devices which optionally support Dynamic Capacity (DC) are configured > > > via mailbox commands. CXL r4.0 section 9.13.3 requires the host to issue > > > the Get DC Configuration command in order to properly configure DCDs. > > > Without the Get DC Configuration command DCD can't be supported. > > > > > > Implement the DC mailbox commands as specified in CXL 4.0 section > > > 8.2.10.9.9 (opcodes 48XXh) to read and store the DCD configuration > > > information. Disable DCD if an invalid configuration is found. > > > > > > Linux has no support for more than one dynamic capacity partition. Read > > > and validate all the partitions but configure only the first partition > > > as 'dynamic ram 1'. Additional partitions can be added in the future if > > > such a device ever materializes. Additionally it is anticipated that no > > > skips will be present from the end of the pmem partition. Check for and > > > disallow this configuration as well. > > > > Hi Anisa, > > > > "Additionally, it is anticipated that no skips will be present.." sounds > > woogedy. The paragraph starts with a Linux limitation of only one partition. > > and next mentions skips. Is that a Linux implementation rule, a spec > > rule, or something else? > > > > Sorry for the lack of clarity. The commit message has been revised to > make it clear that DPA gaps between partitions are a Linux rule. The > spec permits a gap: the DC region base is device assigned and only has to be > 256MB aligned (r4.0 Table 8-347). It now reads: > > Linux has no support for more than one dynamic capacity partition. Read > and validate all the partitions but configure only the first partition > as 'dynamic ram 1'. Additional partitions can be added in the future if > such a device ever materializes. Linux additionally requires partitions > to be contiguous. Therefore, check for and disallow any gap between the > end of the pmem partition and the first DC partition, as well as gaps > between the remaining DC partitions. > Is this limitation something we expect to ever change, or is it something like "The spec doesn't disallow it, but basically there's no good way to reason about this otherwise"? Where reasonable, we should try to work the "Linux opinion of how this should work" into the CXL docs in-tree so it's clear where we put constraints in where the spec does not. ~Gregory