From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAFAD4734F2 for ; Tue, 4 Aug 2026 16:00:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785859258; cv=none; b=BPFHmOWYgawGDO3BNtDaR9BrlvPlKN05Oa5XFpl41BHYlBgcYz1xpSrQw+Ll4xSrPOfGrzJtOqcU77HkB+BimIJyHHr+yCGCKayWNVaL67mDlpPmFo7UkBbjxfsdu5bKmTK1WSr18pusoUdfEzpHcUJlaEVBBeVm77p+pEp3h2Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785859258; c=relaxed/simple; bh=LZRF7XvkTJh5mVX/xE5sHCqUfQy1DFUWTGiWnGs02HQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EOyvzpbDiDUBYiOmnJPwOTZURb3zh9bFPOqRMk79LEm658+nwsjH6WofY1RaqFYSwDhCEOJZSqA8CLGkNT5JsT6uNhei92tnVWBQiiWLEqzWA4wk9OdFL378qeVfwnkge6JMjGKr1ZTU2pGnBEGgsa/WF/BivfgXWeDbtEhg4PA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=tgsUV6d4; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="tgsUV6d4" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-92ea24a2dbfso2234685a.0 for ; Tue, 04 Aug 2026 09:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1785859256; x=1786464056; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=gIywxDE/xXwcJzhaWMUxRZtRSyfvUoSn8AJ9dIdrl7c=; b=tgsUV6d4HQEOkkIKqOsJkz7lUmegMlM8zzz6a8dX4ySfGPqeB1NSIns/BukcIp/Gxk SiamCv/dP3W8uUA/sTRscgA2ZHYLu/jkODp3emIuEY9yrfYnorjZYLJxozvc9Nlx8o4k BE0hrLzffspACbN8k5/OFSPg06YaQ7WC8Fu9Ek+32T+lE694sY1KKAAnFdrZilx3WUjE GmhDxD9BrGeRJg9n42RNtdbqeS8pR6fT1iDTxKDbCtkxHmt9tCw/V1/fn1duHarRs9Kh 8suArCYrBqHaQbqyr4pP39G27sSgw9TbGlbTDb2SNfGf3PpV/dgZmgY5HkJTPuP/A47K yP1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785859256; x=1786464056; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gIywxDE/xXwcJzhaWMUxRZtRSyfvUoSn8AJ9dIdrl7c=; b=VZ5MkuWNyhQ8v644wI8Q5MQ+ceERrBcGAp2LwLOVO5S1iMvWzbjA3oc4NOQTFoXpXD SWl8uQsdPeEeBcd+KJiwUdRR09RcnjS0xsajM5TDYFD2+Na4c1FVk5Arz9qI28UtwMfY VIO7s+DVwO3Lm3Jni2KoxG2X37iSgbEre6as1i8NZSe/wgnNM+65kRQ8/sNi4Qm/EDsh 5LoPTV4ayjeYP4a/vl5FaFe0EpwCRp/CBbeQM/sG6ihbz+AMm5808Oxm7lCa6FQcl7hN Eqno4mPn0rRuzlutPZ+I7YALqo0c0Et9XRHaRNCQo5yo5aFwk6JLql1BkjsVPJ8dXgkl mmhw== X-Forwarded-Encrypted: i=1; AHgh+Rr77sjyhAbTCigBmTcsjdOfYocfnKPB7//BV+gsLxc5HnYkUY2AkHcYspPiP/xkwoBTVzH2Qzj9D0JkyAI=@vger.kernel.org X-Gm-Message-State: AOJu0Yxagu54B1eyC7fNM8f0yxXxF56g648JNtgeY7+qU2JwTJNKGPN6 jbZ9WFA1894F97u/HWEDcd/vhtkWHt3GZ+ACTqbWR2E29wB0lg5W9hZqRxNeyYrwopg= X-Gm-Gg: AR+sD12LBYJo3Htn05BYLra3pEAsYslqdeCsRkQkQrtlG4SIYX++8HPvYmtLNT034Hg Skl8nH2IduJSF0EQMDkJhdcicyCQ1H+/FMFqTCtib/sztDzoARRhqrypYcxWmWIEm3xAr8FJKrQ KVcheVzdpTqvppfj6MwoytagTIyclOzzSNtzblI5efFt4BzE5pfiJ2rCc1rbIre7KGz1yxt/D+F eQGO+8/EbikQnAxkUEKvjvD7HDozxeG5h2mTC6IHseMMpZQbx2hkGmL+gp6xLsbOt2OWngXobMW RjFbNACZ9Wpvy7348SA0cTJcRmOFia3LZUqcDD0kH5AEgqfDN/N0e++K/a9kG2tPJjNt0VYlG5t KkODqhMDOY3OT3oWH9KiaDwTjgjRKKZtUj8AV0fXOA7snboVcP/1IY++1/LWsnqP2/kFq17sauQ EU/np+Ja224VrQF6UinosHPkKSAJLFUnWq0o4QSy47HJhcqJufQrD2KigqB9uLSuN674V+dCa3x it6hR57w8IXlQgUV8OAwBT6fDMFvN5lj6zECATMrQPx X-Received: by 2002:a05:620a:a189:10b0:930:f271:6784 with SMTP id af79cd13be357-934a0ab819amr2203775585a.38.1785859241734; Tue, 04 Aug 2026 09:00:41 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-173-79-60-52.washdc.fios.verizon.net. [173.79.60.52]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-908800ae043sm4255856d6.40.2026.08.04.09.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2026 09:00:41 -0700 (PDT) Date: Tue, 4 Aug 2026 12:00:39 -0400 From: Gregory Price To: Anisa Su Cc: Alison Schofield , linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, Dave Jiang , Jonathan Cameron , Fan Ni , Li Ming , Vishal Verma , Davidlohr Bueso , Ira Weiny , Benjamin Cheatham , Wonjae Lee , Junhee Park , Heesoo Kim Subject: Re: [PATCH v12 2/8] cxl/mem: Read dynamic capacity configuration from the device Message-ID: References: <20260731084901.1512819-1-anisa.su@samsung.com> <20260731084901.1512819-3-anisa.su@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > > > > > 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