Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: Gregory Price <gourry@gourry.net>,
	"Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>,
	Huaisheng Ye <huaisheng.ye@intel.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"pei.p.jia@intel.com" <pei.p.jia@intel.com>,
	"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Subject: Re: [RFC PATCH] cxl/core: reenable Mem_Enable bit of DVSEC control when RR decodes outside platform ranges
Date: Tue, 15 Apr 2025 17:21:47 +0100	[thread overview]
Message-ID: <20250415172147.0000406f@huawei.com> (raw)
In-Reply-To: <43967129-86ec-4dbc-a065-11269e311fed@intel.com>

On Wed, 9 Apr 2025 08:13:48 -0700
Dave Jiang <dave.jiang@intel.com> wrote:

> On 4/9/25 7:13 AM, Gregory Price wrote:
> > On Mon, Apr 07, 2025 at 08:31:13AM +0000, Zhijian Li (Fujitsu) wrote:  
> >> [1] https://lore.kernel.org/linux-cxl/20240409075846.85370-1-lizhijian@fujitsu.com/  
> > 
> > After looking at this, I see why this hasn't been fixed in QEMU.
> > Basically QEMU doesn't implement the right reset mechanism.
> > 
> > ct3_reset calls
> > 	cxl_component_register_init_common()
> > 		ARRAY_FIELD_DP32(reg_state, CXL_HDM_DECODER_GLOBAL_CONTROL,
> > 				 HDM_DECODER_ENABLE, 0)
> > 
> > But it never resets MEM_ENABLE in the dvsecs.
> > 
> > I'm not sure it's sane for Linux to be trying to handle hardware that
> > doesn't itself reset correctly - and doing this fix just for QEMU seems
> > a bit too far.  
> 
> I agree. No need to twist Linux in a bunch for something broken on QEMU. Until there's actual hardware that does this deployed in the field, we should just leave the Linux driver as is.

It's not yet fixed in QEMU because the proposed fix stops the CDAT DOE working.
https://lore.kernel.org/linux-cxl/20240802174010.000025e7@Huawei.com/

We don't correctly handle reset today.  I'm thoroughly in favour
of fixing qemu, but we need to do it carefully and not break other.

> 
> > 
> > The correct fix here is building an accessor for the existing CXL dvsecs
> > and updating it during ct3_reset.

Yes. Will be something along those lines but needs thorough testing.

Jonathan

> > 
> > ~Gregory  
> 
> 


  reply	other threads:[~2025-04-15 16:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-06 11:27 [RFC PATCH] cxl/core: reenable Mem_Enable bit of DVSEC control when RR decodes outside platform ranges Huaisheng Ye
2025-04-07  8:31 ` Zhijian Li (Fujitsu)
2025-04-09  3:51   ` Ye, Huaisheng
2025-04-09 14:13   ` Gregory Price
2025-04-09 15:13     ` Dave Jiang
2025-04-15 16:21       ` Jonathan Cameron [this message]
2025-04-08  3:22 ` Gregory Price
2025-04-09  3:48   ` Ye, Huaisheng
2025-04-09 14:01     ` Gregory Price
2025-04-10  7:12       ` Ye, Huaisheng
2025-04-15 16:30       ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250415172147.0000406f@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=gourry@gourry.net \
    --cc=huaisheng.ye@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=pei.p.jia@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox