Linux Power Management development
 help / color / mirror / Atom feed
From: Tomasz Wolski <tomasz.wolski@fujitsu.com>
To: tomasz.wolski@fujitsu.com
Cc: alison.schofield@intel.com, ardb@kernel.org,
	benjamin.cheatham@amd.com, bp@alien8.de,
	dan.j.williams@intel.com, dave.jiang@intel.com,
	dave@stgolabs.net, gregkh@linuxfoundation.org,
	huang.ying.caritas@gmail.com, ira.weiny@intel.com, jack@suse.cz,
	jeff.johnson@oss.qualcomm.com, jonathan.cameron@huawei.com,
	len.brown@intel.com, linux-cxl@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, lizhijian@fujitsu.com,
	ming.li@zohomail.com, nathan.fontenot@amd.com,
	nvdimm@lists.linux.dev, pavel@kernel.org, peterz@infradead.org,
	rafael@kernel.org, rrichter@amd.com,
	smita.koralahallichannabasappa@amd.com, terry.bowman@amd.com,
	vishal.l.verma@intel.com, willy@infradead.org,
	yaoxt.fnst@fujitsu.com, yazen.ghannam@amd.com
Subject: Re: [PATCH v8 0/9] dax/hmem, cxl: Coordinate Soft Reserved handling with CXL and HMEM
Date: Fri, 17 Apr 2026 01:44:28 +0200	[thread overview]
Message-ID: <20260416234428.13623-1-tomasz.wolski@fujitsu.com> (raw)
In-Reply-To: <20260416224618.12987-1-tomasz.wolski@fujitsu.com>

One additional remark:
I observed one isue unrelated to this patch during tests
on our AMD machine with two CXL physical cards installed.
Region teardown with "destroy-region" fails with "Operation not permitted":

cxl region: destroy_region: region1: failed to reset decode: Operation not permitted
cxl region: decoder_region_action: region1: failed: Operation not permitted
cxl region: region_action: one or more failures, last failure: Operation not permitted
cxl region: cmd_destroy_region: destroyed 0 regions

Region lock is now correctly set by a fix "cxl: Test decoder flags as bitmasks" 
(commit 0a70b7cd397e545e926c93715ff6366b67c716f6) but I cannot see any option
how it can be unlocked to proceed with the teardown?

Without the lock I'm able to destroy regions:

>static void cxl_region_setup_flags(struct cxl_region *cxlr,
>                                   struct cxl_decoder *cxld)
>{
>        if (cxld->flags & CXL_DECODER_F_LOCK) {
>                dev_err(&cxlr->dev, "cxl_region_setup_flags: would lock, flags: %04lx\n", cxld->flags);
>        }
>        if (test_bit(CXL_DECODER_F_LOCK, &cxld->flags)) {
>                dev_err(&cxlr->dev, "cxl_region_setup_flags: setting CXL_DECODER_F_LOCK, flags: %04lx\n", cxld->flags);
>                set_bit(CXL_REGION_F_LOCK, &cxlr->flags);
>                clear_bit(CXL_REGION_F_NEEDS_RESET, &cxlr->flags);
>        }
>
>        if (cxld->flags & CXL_DECODER_F_NORMALIZED_ADDRESSING)
>                set_bit(CXL_REGION_F_NORMALIZED_ADDRESSING, &cxlr->flags);
>}


[    5.155997] [     T12] cxl region0: cxl_region_setup_flags: would lock, flags: 0030
..
[    5.130070] [     T12] cxl region1: cxl_region_setup_flags: would lock, flags: 0030

  reply	other threads:[~2026-04-16 23:45 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-22 19:53 [PATCH v8 0/9] dax/hmem, cxl: Coordinate Soft Reserved handling with CXL and HMEM Smita Koralahalli
2026-03-22 19:53 ` [PATCH v8 1/9] dax/bus: Use dax_region_put() in alloc_dax_region() error path Smita Koralahalli
2026-03-23 17:11   ` Dave Jiang
2026-03-23 17:57   ` Jonathan Cameron
2026-03-23 19:37   ` Dan Williams
2026-03-22 19:53 ` [PATCH v8 2/9] dax/hmem: Factor HMEM registration into __hmem_register_device() Smita Koralahalli
2026-03-23 17:14   ` Dave Jiang
2026-03-23 17:59   ` Jonathan Cameron
2026-03-22 19:53 ` [PATCH v8 3/9] dax/hmem: Request cxl_acpi and cxl_pci before walking Soft Reserved ranges Smita Koralahalli
2026-03-23 19:54   ` Dan Williams
2026-03-24  5:46     ` Koralahalli Channabasappa, Smita
2026-03-24 16:25       ` Dan Williams
2026-03-22 19:53 ` [PATCH v8 4/9] dax/hmem: Gate Soft Reserved deferral on DEV_DAX_CXL Smita Koralahalli
2026-03-22 19:53 ` [PATCH v8 5/9] dax/cxl, hmem: Initialize hmem early and defer dax_cxl binding Smita Koralahalli
2026-03-22 19:53 ` [PATCH v8 6/9] dax: Track all dax_region allocations under a global resource tree Smita Koralahalli
2026-03-23 17:31   ` Dave Jiang
2026-03-23 20:55   ` Dan Williams
2026-03-22 19:53 ` [PATCH v8 7/9] cxl/region: Add helper to check Soft Reserved containment by CXL regions Smita Koralahalli
2026-03-22 19:53 ` [PATCH v8 8/9] dax/hmem, cxl: Defer and resolve Soft Reserved ownership Smita Koralahalli
2026-03-23 18:03   ` Jonathan Cameron
2026-03-23 18:13   ` Jonathan Cameron
2026-03-24 21:50     ` Koralahalli Channabasappa, Smita
2026-03-25 12:12       ` Jonathan Cameron
2026-03-23 18:17   ` Dave Jiang
2026-03-22 19:53 ` [PATCH v8 9/9] dax/hmem: Reintroduce Soft Reserved ranges back into the iomem tree Smita Koralahalli
2026-03-23 21:09   ` Dan Williams
2026-04-16 22:46 ` [PATCH v8 0/9] dax/hmem, cxl: Coordinate Soft Reserved handling with CXL and HMEM Tomasz Wolski
2026-04-16 23:44   ` Tomasz Wolski [this message]
2026-05-12 12:57   ` Tomasz Wolski
2026-05-12 15:44     ` Dave Jiang

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=20260416234428.13623-1-tomasz.wolski@fujitsu.com \
    --to=tomasz.wolski@fujitsu.com \
    --cc=alison.schofield@intel.com \
    --cc=ardb@kernel.org \
    --cc=benjamin.cheatham@amd.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=huang.ying.caritas@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=jack@suse.cz \
    --cc=jeff.johnson@oss.qualcomm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=len.brown@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=ming.li@zohomail.com \
    --cc=nathan.fontenot@amd.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=pavel@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=rrichter@amd.com \
    --cc=smita.koralahallichannabasappa@amd.com \
    --cc=terry.bowman@amd.com \
    --cc=vishal.l.verma@intel.com \
    --cc=willy@infradead.org \
    --cc=yaoxt.fnst@fujitsu.com \
    --cc=yazen.ghannam@amd.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