All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] cxl/pci: Fix the GPF DVSEC setup path
@ 2026-09-22 10:00 Guixin Liu
  2026-09-22 10:00 ` [PATCH 1/3] cxl/pci: Use the Device GPF DVSEC for restricted endpoints Guixin Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Guixin Liu @ 2026-09-22 10:00 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Dan Williams, Ira Weiny, Li Ming
  Cc: linux-cxl

Three small fixes for the GPF setup path in cxl/core/pci.c, found
while reworking the same area for a downstream backport.

Patch 1 is the one with user-visible impact: on an RCD the GPF DVSEC
lookup takes the port path, so dirty shutdown tracking never arms and
the count stays invalid. The other two deal with error handling and
a full-register rewrite of the phase control register.

Testing on a QEMU CXL topology, with the patched cxl_core hot-swapped
in and the topology re-enumerated. With the phase 1/2 timeout
registers of all four dports (two root ports, two switch downstream
ports) zeroed beforehand, every dport came back at 0x0702 — base 2,
scale 7, the same value the unpatched code writes. So the timeout
write ran on each of them: the read-modify-write of patch 3, through
the error-checked setup of patch 2. With the registers left at their
programmed value instead, the setup takes the "already at max" early
return and writes nothing. Re-enumeration comes up clean, all three
memdevs back.

What QEMU cannot exercise: the topology has no RCD, so the RC_END
branch of patch 1 never ran — though the emulated type-3 devices do
expose the Device GPF DVSEC that the fix selects for a restricted
endpoint. A config write to a live DVSEC does not fail, so the error
paths of patch 2 stayed cold. And the phase control register defines
no non-timeout bits today, so patch 3 lands on the same value the old
full rewrite did.

Guixin Liu (3):
  cxl/pci: Use the Device GPF DVSEC for restricted endpoints
  cxl/pci: Program the Port GPF timeouts before caching the DVSEC
  cxl/pci: Update only the Port GPF timeout fields

 drivers/cxl/core/pci.c | 38 ++++++++++++++++++++++++++------------
 1 file changed, 26 insertions(+), 12 deletions(-)

-- 
2.43.7


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-08  3:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 10:00 [PATCH 0/3] cxl/pci: Fix the GPF DVSEC setup path Guixin Liu
2026-09-22 10:00 ` [PATCH 1/3] cxl/pci: Use the Device GPF DVSEC for restricted endpoints Guixin Liu
2026-09-25 23:36   ` Jonathan Cameron
2026-09-28 23:45   ` Dave Jiang
2026-09-22 10:00 ` [PATCH 2/3] cxl/pci: Program the Port GPF timeouts before caching the DVSEC Guixin Liu
2026-09-25 23:43   ` Jonathan Cameron
2026-09-28 23:46   ` Dave Jiang
2026-09-22 10:00 ` [PATCH 3/3] cxl/pci: Update only the Port GPF timeout fields Guixin Liu
2026-09-25 23:44   ` Jonathan Cameron
2026-10-08  3:15     ` Guixin Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.