Linux CXL
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
Cc: Huaisheng Ye <huaisheng.ye@intel.com>,
	"Jonathan.Cameron@huawei.com" <Jonathan.Cameron@huawei.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"dave.jiang@intel.com" <dave.jiang@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: Wed, 9 Apr 2025 09:13:51 -0500	[thread overview]
Message-ID: <Z_aAnzqR-UP9rmIY@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <02fbb2a7-3973-4c7f-8b7d-cfabbb379467@fujitsu.com>

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.

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

~Gregory

  parent reply	other threads:[~2025-04-09 14:13 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 [this message]
2025-04-09 15:13     ` Dave Jiang
2025-04-15 16:21       ` Jonathan Cameron
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=Z_aAnzqR-UP9rmIY@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --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