Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.83.212.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796226281; b=r67FO3Vex+58d1dLSmBR9moPHd89txiXfG7Ek3OcubJpn0HKjQmHqYvQsmZF1OvhqGl0 wMTw7QxNEILrFu53Dn5kXfDhMlPo8Tn+I8HIFz9YsP/1OKQwZxdPeXEEG+QqAwT5v1/tl zLh4MNS23yRFH0/rxlkX9yG5NKF80Bz9aJ8ylm6qHwSbqeaIBQFFsTtcSHB2HF+/KRJoN FMJWQ1YYnAKTisAMXRcEwNeKdhE+QYVkxYQV22tL8iWRFPytwiotDv9EP3uzVU0Bih5vY f3no/5rT/VyxIe4ONJq46Y6MWte+Cpd8ATA5F/bGgY14sKsHuvwrAgUuUdgczqFP4oA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796226281; h=DMARC-Filter:X-Sender-Id:Received:Received:X-Sender-Id:X-MC-Relay: X-MailChannels-SenderId:X-MailChannels-Auth-Id:X-Trade-Stretch: X-MC-Loop-Signature:X-MC-Ingress-Time:Received:Received: DKIM-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=R7w72Ea75nunf/+rl1jtxZaDdX1KV1vnHm4pED4borE=; b=tDRSUMpTdG2zRtjuCVeR/ozppHli7b0ylrd3h12wQVJcDeWpkeC7r5XWSXBy8UnbHNU2 QyeDOvQZGC6Mwtpsc13At3fAbvKwZtnpiz5+qMo7SosTr8ClqTb7RWYap/NOOulwuEwPs nSPxleSvMLdQn9GiVRxCXTCS0NgCgtyBTM6dk+cWhnxLRqVnPxzHH737oaFTmezb1OT2c V0c0EE5l0XBDD6cfMmg2fe+iJORV9q7EkO8pFpM5YOV2ZgQ/I0uZ8ejbFjBzArfXz7K14 qXNBoJqo8uF+CsDTeuvk1qcKTJrP71ppArqb10CZB4Ul4VHZ7i3bW9TXK1rhLckSu7A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stgolabs.net; spf=fail smtp.mailfrom=stgolabs.net; dkim=pass header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=Dm+NclRo; arc=none smtp.remote-ip=23.83.212.45 Received: from crocodile.elm.relay.mailchannels.net (crocodile.elm.relay.mailchannels.net [23.83.212.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6881606A31A for ; Wed, 2 Dec 2026 15:44:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E6881606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=stgolabs.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=stgolabs.net header.i=@stgolabs.net header.a=rsa-sha256 header.s=dreamhost header.b=Dm+NclRo X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2B2E1721114; Wed, 02 Dec 2026 15:44:34 +0000 (UTC) Received: from pdx1-sub0-mail-a229.dreamhost.com (100-96-3-121.trex-nlb.outbound.svc.cluster.local [100.96.3.121]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 9FE3E72278E; Wed, 02 Dec 2026 15:44:33 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Trade-Stretch: 257aa78a4dbaf7f1_1796226273912_1183445326 X-MC-Loop-Signature: 1796226273912:3025468864 X-MC-Ingress-Time: 1796226273912 Received: from pdx1-sub0-mail-a229.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.96.3.121 (trex/8.0.2); Wed, 02 Dec 2026 15:44:33 +0000 Received: from offworld.tailf5af7a.ts.net (unknown [76.167.199.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a229.dreamhost.com (Postfix) with ESMTPSA id 4jfhrw6xnvzTC; Wed, 2 Dec 2026 07:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1796226273; bh=R7w72Ea75nunf/+rl1jtxZaDdX1KV1vnHm4pED4borE=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=Dm+NclRoDfyzE0dmR/y+XQ4trXD7SfWRo0ZZhSwdUU0BulLnFRnJWpOQQst8ZMiqc Px25FeGIGP2+oGPR6DzVJw60JLnJyR+90H+GZp/LJFtuTTvTq4Dg8V50qH/ZqzkZ8g YjUbUI0+9fmmlkoLVutlZJ2hFcpt0JQKBzqGRh7HfP4qXfk0YKnIyCRl3lnzsc2Dbk AG/tvhYMyx7q4JXwHvihA4uoYhJ6Aw6cmhQ7b+vfGiO34YcMWcitVEg0v9D11Jktca gT50pjjiTA8fS5Uf8tu2QUbExYOtHTfH/lwmK6jW2Ca+C+A0enkVm0LQ11glsKJT/q LNaHtHwXFseYw== From: Davidlohr Bueso To: dave.jiang@intel.com Cc: jic23@kernel.org, alison.schofield@intel.com, ming.li@zohomail.com, icheng@nvidia.com, benjamin.cheatham@amd.com, unsung0317@gmail.com, linux-cxl@vger.kernel.org, dave@stgolabs.net Subject: [PATCH v2 00/10] cxl: Userspace background commands Date: Wed, 2 Dec 2026 07:43:54 -0800 Message-Id: <20261202154404.4016305-1-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 X-Mailing-List: linux-cxl@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi, Changes from v1: o Dropped handling Activate FW asynchronously. Nothing bounds how long an activation may take, so there is no good answer to how long the firmware upload should wait for its result. Deferred until the spec has the device report it. Patch 4 is what is left of that patch, the decoupling from security, and Jonathan's tag is dropped as such. o New fixes in patches 1 and 2, and new patch 7. o Fixed the cxl_test build. (Unsung) o Converted to scoped_guard() and clarified comments. (Jonathan) o Rebased on v7.4-rc5. This is v2 of the mailbox background command series[1]. It lets userspace make use of the background operation capability, with the kernel aborting such an operation whenever it needs the device for one of its own, and adds Populate Log as the first command to use it. v1 has been sitting since June of last year. Unsung's work on online firmware activation[2] ran into the same background handling, and the discussion there is what brought this back. o Patches 1-2 are fixes to the existing background handling, and can go in on their own. o Patch 3 tracks which commands the CEL has as background capable. o Patch 4 moves the async handling out of the security state. o Patches 5-6 no longer hold the mbox_mutex while polling for a background command the kernel waits for. o Patch 7 adds the return codes an abort request can come back with. o Patches 8-9 allow userspace background commands. o Patch 10 adds Populate Log. Testing was done with cxl_test and the ndctl suite, and with the qemu based tests at [3], which also carry the qemu fixes they rely on. [1] https://lore.kernel.org/all/20250617193611.564668-1-dave@stgolabs.net/ [2] https://lore.kernel.org/all/20261125124358.3583223-1-unsung0317@gmail.com/ [3] https://github.com/davidlohr/cxl-bg-tests Thanks! Davidlohr Bueso (9): cxl/pci: Reschedule the poller with the capped timeout cxl/pci: Preserve Mailbox Control bits when ringing the doorbell cxl/mbox: Track background commands from CEL cxl/mbox: Decouple async background handling from security cxl/pci: Lockless background synchronous polling cxl/mbox: Stronger cxl_mbox_background_complete() semantics cxl/mbox: Add missing mailbox return codes cxl/mbox: Allow userspace background commands cxl/mbox: Shout upon async bgcmd race Ravi Shankar (1): cxl/mbox: Add Populate Log support drivers/cxl/core/hdm.c | 2 +- drivers/cxl/core/mbox.c | 45 ++++- drivers/cxl/core/memdev.c | 7 +- drivers/cxl/cxlmem.h | 53 +++++- drivers/cxl/pci.c | 318 +++++++++++++++++++++++++---------- include/cxl/mailbox.h | 4 + include/uapi/linux/cxl_mem.h | 1 + tools/testing/cxl/test/mem.c | 10 +- 8 files changed, 334 insertions(+), 106 deletions(-) base-commit: 693c2e04e3f1d4c59af236e1211b7b8cb165a790 -- 2.39.5