From nobody Mon Jun 8 05:28:35 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1780442375; cv=none; d=zohomail.com; s=zohoarc; b=Pogei3ULCLh1TSo3zhEha5WodwSGRD7TMqQx7e81UUw6wP4hu0QiAtJSw+Z02hQLtrDFct/3XvSP7WxlVfmw/VCpO6wgqBhPUiyLpitM6dn87NpDZdbeNrcsHPIQdJuFkLyT2uaTjyn7U0bY2F6NVm8z//VddtSq4UU1UbDnW8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780442375; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Y60gMEITJfCqStaTYSFD8uzsncBlRLgD4z5UccFv+RI=; b=h0dIl1hUh0p/DMZduv9oA/uctZ4VAPKWUpG95B45oyvhYmQQAUgA9+r2FeRc0dbMwyEkLbXUuUZxqPJU/Sqi7lvDifeti8GuQrSLUhwlh83egxbsu4ABbOvhYCiYZfMgheLEr1FPWMTfYEZhq+4ZujfgzjkcS1FehQhQPWk5gj8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780442375881844.716235208678; Tue, 2 Jun 2026 16:19:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUYNo-00033z-IR; Tue, 02 Jun 2026 19:18:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNn-00033j-Pd for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:51 -0400 Received: from fly.ash.relay.mailchannels.net ([23.83.222.61]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNm-0008M8-5z for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:51 -0400 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BD56A402C75; Tue, 02 Jun 2026 23:18:47 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (100-103-80-215.trex-nlb.outbound.svc.cluster.local [100.103.80.215]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 60884402C7E; Tue, 02 Jun 2026 23:18:47 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.103.80.215 (trex/7.1.5); Tue, 02 Jun 2026 23:18:47 +0000 Received: from localhost.localdomain (unknown [181.212.92.203]) (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-a251.dreamhost.com (Postfix) with ESMTPSA id 4gVRbT732Vz1041; Tue, 2 Jun 2026 16:18:45 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net 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-Wipe-Absorbed: 1af98fc53376dabc_1780442327626_2445509738 X-MC-Loop-Signature: 1780442327626:3667555747 X-MC-Ingress-Time: 1780442327626 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1780442327; bh=Y60gMEITJfCqStaTYSFD8uzsncBlRLgD4z5UccFv+RI=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=LP1V0C+nvIbxNEFifrTaPCggxU0rWlDpZrnVmZ/XRqr2y7EZLhEekoxx9FeyV4INf sew8BRzpkOSu4atWRRBw3yl69MCaFhTja3UDToYu5TgK7tHjXC9SohsLVif1gEwyBk dEJTTNX6wKtuTSxAJlVFysxyA8xTpB55RcQVRSEp2QHmTr6gzR0gPoqymUq/yvU9c1 eKnz9PuckKHoCJ2UpyUUYUUG0xWzFv9SKp7Ko0HDpcpp7w+Z4YliPZlg/rsDEr3YDg KF0mlz5x/Ha54v/i0+rSXrBkBedPG69synmMc1Z3buMNkKOTRIzO+yHwGzkSiDrCXa 4mK7eJpiKb9dQ== From: Davidlohr Bueso To: jic23@kernel.org Cc: linux-cxl@vger.kernel.org, qemu-devel@nongnu.org, dave@stgolabs.net Subject: [PATCH 1/4] tests/bios-tables-test: Exclude CEDT.cxl for host-only restriction default Date: Tue, 2 Jun 2026 16:18:03 -0700 Message-Id: <20260602231806.2469011-2-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260602231806.2469011-1-dave@stgolabs.net> References: <20260602231806.2469011-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: softfail client-ip=23.83.222.61; envelope-from=dave@stgolabs.net; helo=fly.ash.relay.mailchannels.net X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stgolabs.net) X-ZM-MESSAGEID: 1780442377657158500 Content-Type: text/plain; charset="utf-8" The next patch changes the default CXL Fixed Memory Window restrictions to host-only coherency, dropping Device Coherent and Back-Invalidate. Signed-off-by: Davidlohr Bueso --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8bf4..b4646b5b3147 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/x86/q35/CEDT.cxl", --=20 2.39.5 From nobody Mon Jun 8 05:28:35 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1780442402; cv=none; d=zohomail.com; s=zohoarc; b=Ioo2qLn4C6jDKttbD2tU9YKCEd1pOCMpn1YXtZAh3l23H3SpygfJjqCoy02B6bV/10jvP357XWsk7LoPSuaSwE5m9Cgpe6Rl5HFYEYX5tsICC8T2N+bGpmftCQZgmXYjxChfol6m6C46D0gfHv6JkQU0ED9LAsCC/V3j2PSAegc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780442402; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EUCYD7G0hS4r9cU0to/bYQKfqUIG9pVGYsJSpBxIsk8=; b=bH8ylpiztHtZ3WOioqPxwzFmWLdBWZO1FVBYzqbMb1QFA483xsztYdZCdWN9mPfLXMkyUEnouSDR1jHlGkwE3hlacYjsXbm6Ik2m+7cTMBUfrzycFN1qZwJHGXMaBRymZCz5VGSJ1hNprbfnwQuk3I8bq5r/9KhlWhlAcwiQto8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780442402767608.8024495903045; Tue, 2 Jun 2026 16:20:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUYNr-000351-07; Tue, 02 Jun 2026 19:18:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNo-000340-U8 for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:52 -0400 Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNn-0008MI-BL for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:52 -0400 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AFC4C721ED6; Tue, 02 Jun 2026 23:18:49 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (100-109-199-18.trex-nlb.outbound.svc.cluster.local [100.109.199.18]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 2DD507208C6; Tue, 02 Jun 2026 23:18:49 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.199.18 (trex/7.1.5); Tue, 02 Jun 2026 23:18:49 +0000 Received: from localhost.localdomain (unknown [181.212.92.203]) (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-a251.dreamhost.com (Postfix) with ESMTPSA id 4gVRbW4jzTz107X; Tue, 2 Jun 2026 16:18:47 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net 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-Ski-Bored: 3126b925763d1e9f_1780442329622_3306041104 X-MC-Loop-Signature: 1780442329622:256772112 X-MC-Ingress-Time: 1780442329621 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1780442329; bh=EUCYD7G0hS4r9cU0to/bYQKfqUIG9pVGYsJSpBxIsk8=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=Qsm48XZINYSgLbaLokaL/Wyj6m/ApOOvZssuEmoSBw2jF8zMhy56SZZRYg8BxGqxt 3p2kHGoGp1t2r3vGkWzyV08xSGxNcpLGYXeF2+RMiJK+PaZqsggAGLoVdahBTjs/GL BiVrh4VN962urZ/lfrOyHiUeuE0I2f7NVsoq4/b1GJo8HZfNTt3p6w35JvrRp5wYHE UwrW1iGJBbFdhD4fBESi3u037hCw2MJ17Y57SLfWYlPQ8RRHNH0UHhflC1GS5PePMO vYe+F0+VSqNG8H6LUBYFEEwbYWvu6dAomrw4Lv/1iLJSfRLxAPQLFwuQQBb/eHjGIo 6JY9EEzm20i/w== From: Davidlohr Bueso To: jic23@kernel.org Cc: linux-cxl@vger.kernel.org, qemu-devel@nongnu.org, dave@stgolabs.net Subject: [PATCH 2/4] hw/cxl: Use host-only coherency for default CFMW restrictions Date: Tue, 2 Jun 2026 16:18:04 -0700 Message-Id: <20260602231806.2469011-3-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260602231806.2469011-1-dave@stgolabs.net> References: <20260602231806.2469011-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: softfail client-ip=23.83.218.253; envelope-from=dave@stgolabs.net; helo=iguana.tulip.relay.mailchannels.net X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stgolabs.net) X-ZM-MESSAGEID: 1780442404506154100 Content-Type: text/plain; charset="utf-8" Change the default CXL Fixed Memory Window restrictions from 0x2f to 0xe, dropping Device Coherent and Back-Invalidate. host-only coherent combined with Back-Invalidate is undefined behavior. Device Coherent alongside host-only coherent is permitted by the spec (multiple restriction bits may be set) but advertises conflicting coherency modes; neither belongs in the host-only default. Signed-off-by: Davidlohr Bueso --- hw/acpi/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/cxl.c b/hw/acpi/cxl.c index f92f7fa3d558..5ce5e8e083ba 100644 --- a/hw/acpi/cxl.c +++ b/hw/acpi/cxl.c @@ -172,7 +172,7 @@ static void cedt_build_cfmws(CXLFixedWindow *fw, Aml *c= edt) build_append_int_noprefix(table_data, fw->enc_int_gran, 4); =20 /* Window Restrictions */ - build_append_int_noprefix(table_data, 0x2f, 2); + build_append_int_noprefix(table_data, 0xe, 2); =20 /* QTG ID */ build_append_int_noprefix(table_data, 0, 2); --=20 2.39.5 From nobody Mon Jun 8 05:28:35 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1780442387; cv=none; d=zohomail.com; s=zohoarc; b=KO73OWa+ggtKvqPMrP9haTGAkdw5E6hjDGldfNi6gw4nbUNcOisj2/Nce9sreFzmYSfoAo8tPVgPL9Mj9U2w6rz70FBj/CMBLEHF7glg0GK8MJwoXVqYcibyqSFpy5HjvdqjXVMhI85bMvmBHijI2+IyKvHfK16Rd86nJtU7Gqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780442387; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2mGLD0wl25r1asFKim0hraTc613N8Kw+BsTweRKBvoo=; b=ei2SlUDxASBhDIXAwoWuq/Yhv+VV0KkVvwdY+Jfb6LHdS8PU4vlnnQTmojeJ+y7N8XbGlAf7CKTTDmQgZW+neqJ8qilcCHa5+3e4VNKNkbgTEL04yByycqr578LqBr7d1w5p6mKR5HwRuvMjm5TykBn9jpXWxu6lOtGV34p5Ws8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17804423873790.750617125867052; Tue, 2 Jun 2026 16:19:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUYNs-00035B-E6; Tue, 02 Jun 2026 19:18:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNq-00034f-KM for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:54 -0400 Received: from iguana.tulip.relay.mailchannels.net ([23.83.218.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNp-0008MX-5h for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:54 -0400 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 54A0462F2F; Tue, 02 Jun 2026 23:18:51 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (100-101-141-32.trex-nlb.outbound.svc.cluster.local [100.101.141.32]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0982B62B1F; Tue, 02 Jun 2026 23:18:51 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.101.141.32 (trex/7.1.5); Tue, 02 Jun 2026 23:18:51 +0000 Received: from localhost.localdomain (unknown [181.212.92.203]) (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-a251.dreamhost.com (Postfix) with ESMTPSA id 4gVRbY3GnCz107p; Tue, 2 Jun 2026 16:18:49 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net 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-Plucky-Spot: 2b67ec0f0938dd5a_1780442331265_451508995 X-MC-Loop-Signature: 1780442331265:3454953683 X-MC-Ingress-Time: 1780442331265 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1780442330; bh=2mGLD0wl25r1asFKim0hraTc613N8Kw+BsTweRKBvoo=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=FcJjX5X0SEZ34VRIKdic6J42a6aneyxDPcWIZuLrLcfLOu9x2HqxZp735KAVX1GaB zZ9jKZFtCLKYNWTuocCA4ckI/26B+JMuBi2JTfbMEWuGrNlhAIjNOBNuWa40tR6/oV Lf+kGtwQVi7LS6zrnaF0BQzUiVccy4kBILbyXGwxbiZzSJn3arl+J/eFU2RDE4NbqT yyIZPZsmf+CCjhzTWuCbIg1h4CAGcFHauOpz+PKB4iVTjM0XMNwYxUVRst2qClwb1g WDs5feDAUep6J84V18zL8spNw1pWqbCrr47BfKrd1hxU/Jlc6VY/pdRWe/Cj0JIlzf 6WeHI0Lgnw54w== From: Davidlohr Bueso To: jic23@kernel.org Cc: linux-cxl@vger.kernel.org, qemu-devel@nongnu.org, dave@stgolabs.net Subject: [PATCH 3/4] tests/acpi/cxl: Update CEDT.cxl for host-only default restrictions Date: Tue, 2 Jun 2026 16:18:05 -0700 Message-Id: <20260602231806.2469011-4-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260602231806.2469011-1-dave@stgolabs.net> References: <20260602231806.2469011-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: softfail client-ip=23.83.218.253; envelope-from=dave@stgolabs.net; helo=iguana.tulip.relay.mailchannels.net X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stgolabs.net) X-ZM-MESSAGEID: 1780442390333154100 Content-Type: text/plain; charset="utf-8" With the default CXL Fixed Memory Window restrictions changed to host-only coherency, update the expected CEDT to drop Device Coherent and Back Invalidate from the advertised CFMWS restrictions. [064h 0100 001h] Subtable Type : 01 [CXL Fixed Memory Window = Structure] [065h 0101 001h] Reserved : 00 [066h 0102 002h] Length : 0028 [068h 0104 004h] Reserved : 00000000 [06Ch 0108 008h] Window base address : 0000000110000000 [074h 0116 008h] Window size : 0000000100000000 [07Ch 0124 001h] Interleave Members : 00 [07Dh 0125 001h] Interleave Arithmetic : 00 [07Eh 0126 002h] Reserved : 0000 [080h 0128 004h] Granularity : 00000005 [084h 0132 002h] Restrictions : 000E # Changed from 002F [086h 0134 002h] QtgId : 0000 [088h 0136 004h] First Target : 0000000C Signed-off-by: Davidlohr Bueso --- tests/data/acpi/x86/q35/CEDT.cxl | Bin 184 -> 184 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/x86/q35/CEDT.cxl b/tests/data/acpi/x86/q35/CED= T.cxl index c35f3882eee67aa5613af427234d1ccd196aa249..15e30750b4d963eeced503204a5= 213f755892b77 100644 GIT binary patch delta 36 ncmdnNxPy_)+0`Xv2Ll5G Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780442375686318.279383100744; Tue, 2 Jun 2026 16:19:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wUYNv-00035t-9x; Tue, 02 Jun 2026 19:18:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNs-00035O-UI for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:56 -0400 Received: from shrimp.cherry.relay.mailchannels.net ([23.83.223.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wUYNr-0008Mo-0z for qemu-devel@nongnu.org; Tue, 02 Jun 2026 19:18:56 -0400 Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1FE50460E21; Tue, 02 Jun 2026 23:18:53 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (100-101-154-94.trex-nlb.outbound.svc.cluster.local [100.101.154.94]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C4BB94629C4; Tue, 02 Jun 2026 23:18:52 +0000 (UTC) Received: from pdx1-sub0-mail-a251.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.101.154.94 (trex/7.1.5); Tue, 02 Jun 2026 23:18:53 +0000 Received: from localhost.localdomain (unknown [181.212.92.203]) (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-a251.dreamhost.com (Postfix) with ESMTPSA id 4gVRbb3C4Dz107p; Tue, 2 Jun 2026 16:18:51 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net 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-Tart-Occur: 7771d85103379b86_1780442333042_3697789684 X-MC-Loop-Signature: 1780442333042:694014145 X-MC-Ingress-Time: 1780442333042 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1780442332; bh=brLZIX1KDosdIr4n25K+Re2pc2kLmvxA2oySiv1HIo0=; h=From:To:Cc:Subject:Date:Content-Transfer-Encoding; b=jB9pMMdHrKTNeKp+LHNqemcPorD39bJzByHewKZ/tQGRdSXHtrZgb9H6w45aQTL/i roPpog9jZppdGZfm1Q/u5j2J6r6W0YVoYgwjfiIbSGoMMchX4+iaYJsPB13CdAHPtN hg1xDXZ+JYn2wG6Mq/A7c0fP81gLE+DGM49ubFkE5R5m+3RBIFUKhJQBcurY3betrE u2pjOVGMJCUEdOjr3wo4kQHm/iA5AsyDU995xN9bv9/j1bEv2RI+HXVc481nDsH3hL mwbIz2YA6I09hUopP+Fi0PSSsdbaZmjh20wnD/LXcOswvHcq1kxjAg6T25HbJWvRiF sDTEoza9WDYFQ== From: Davidlohr Bueso To: jic23@kernel.org Cc: linux-cxl@vger.kernel.org, qemu-devel@nongnu.org, dave@stgolabs.net Subject: [PATCH 4/4] hw/cxl: Add per-capability CXL Fixed Memory Window restriction flags Date: Tue, 2 Jun 2026 16:18:06 -0700 Message-Id: <20260602231806.2469011-5-dave@stgolabs.net> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260602231806.2469011-1-dave@stgolabs.net> References: <20260602231806.2469011-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: softfail client-ip=23.83.223.164; envelope-from=dave@stgolabs.net; helo=shrimp.cherry.relay.mailchannels.net X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @stgolabs.net) X-ZM-MESSAGEID: 1780442377770158500 Content-Type: text/plain; charset="utf-8" Expose the CFMWS Window Restrictions as named per-capability machine properties (device-coherent, host-only, volatile, persistent, fixed-config, back-invalidate), making the advertised restrictions configurable per window. Signed-off-by: Davidlohr Bueso --- docs/system/devices/cxl.rst | 13 +++------ hw/acpi/cxl.c | 2 +- hw/cxl/cxl-host.c | 55 +++++++++++++++++++++++++++++++++++++ include/hw/cxl/cxl.h | 12 ++++++++ qapi/machine.json | 29 +++++++++++++++++++ 5 files changed, 101 insertions(+), 10 deletions(-) diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst index 9d0771cdfd73..cf3f2c81785c 100644 --- a/docs/system/devices/cxl.rst +++ b/docs/system/devices/cxl.rst @@ -384,15 +384,14 @@ An example of 4 devices below a switch suitable for 1= , 2 or 4 way interleave:: -device cxl-type3,bus=3Dswport3,persistent-memdev=3Dcxl-mem3,lsa=3Dcxl-l= sa3,id=3Dcxl-pmem3,sn=3D0x4 \ -M cxl-fmw.0.targets.0=3Dcxl.1,cxl-fmw.0.size=3D4G,cxl-fmw.0.interleave-= granularity=3D4k =20 -An example of 4 type3 devices with volatile memory below a switch. Two of = the devices -use HDM-DB for coherence, which requires operating in Flit mode:: +An example of 2 type3 devices with volatile memory below a switch. The dev= ices +use HDM-DB for coherence, which requires operating in Flit mode and a CXL = window +configured to permit device-coherent Back-Invalidate model:: =20 qemu-system-x86_64 -M q35,cxl=3Don -m 4G,maxmem=3D8G,slots=3D8 -smp 4 \ ... -object memory-backend-ram,id=3Dcxl-mem0,share=3Don,size=3D256M \ -object memory-backend-ram,id=3Dcxl-mem1,share=3Don,size=3D256M \ - -object memory-backend-ram,id=3Dcxl-mem2,share=3Don,size=3D256M \ - -object memory-backend-ram,id=3Dcxl-mem3,share=3Don,size=3D256M \ -device pxb-cxl,bus_nr=3D12,bus=3Dpcie.0,id=3Dcxl.1 \ -device cxl-rp,port=3D0,bus=3Dcxl.1,id=3Droot_port0,chassis=3D0,slot=3D0= \ -device cxl-rp,port=3D1,bus=3Dcxl.1,id=3Droot_port1,chassis=3D0,slot=3D1= \ @@ -401,11 +400,7 @@ use HDM-DB for coherence, which requires operating in = Flit mode:: -device cxl-type3,bus=3Dswport0,volatile-memdev=3Dcxl-mem0,id=3Dcxl-mem0= ,sn=3D0x1,x-256b-flit=3Don,hdm-db=3Don \ -device cxl-downstream,port=3D1,bus=3Dus0,id=3Dswport1,chassis=3D0,slot= =3D5 \ -device cxl-type3,bus=3Dswport1,volatile-memdev=3Dcxl-mem1,id=3Dcxl-mem1= ,sn=3D0x2,x-256b-flit=3Don,hdm-db=3Don \ - -device cxl-downstream,port=3D2,bus=3Dus0,id=3Dswport2,chassis=3D0,slot= =3D6 \ - -device cxl-type3,bus=3Dswport2,volatile-memdev=3Dcxl-mem2,id=3Dcxl-mem2= ,sn=3D0x3 \ - -device cxl-downstream,port=3D3,bus=3Dus0,id=3Dswport3,chassis=3D0,slot= =3D7 \ - -device cxl-type3,bus=3Dswport3,volatile-memdev=3Dcxl-mem3,id=3Dcxl-mem3= ,sn=3D0x4 \ - -M cxl-fmw.0.targets.0=3Dcxl.1,cxl-fmw.0.size=3D4G,cxl-fmw.0.interleave-= granularity=3D4k + -M cxl-fmw.0.targets.0=3Dcxl.1,cxl-fmw.0.size=3D4G,cxl-fmw.0.interleave-= granularity=3D4k,cxl-fmw.0.back-invalidate=3Don =20 A simple arm/virt example featuring a single direct connected CXL Type 3 Volatile Memory device:: diff --git a/hw/acpi/cxl.c b/hw/acpi/cxl.c index 5ce5e8e083ba..77c1db6561b4 100644 --- a/hw/acpi/cxl.c +++ b/hw/acpi/cxl.c @@ -172,7 +172,7 @@ static void cedt_build_cfmws(CXLFixedWindow *fw, Aml *c= edt) build_append_int_noprefix(table_data, fw->enc_int_gran, 4); =20 /* Window Restrictions */ - build_append_int_noprefix(table_data, 0xe, 2); + build_append_int_noprefix(table_data, fw->restrictions, 2); =20 /* QTG ID */ build_append_int_noprefix(table_data, 0, 2); diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c index f3479b19914f..7af431bf1555 100644 --- a/hw/cxl/cxl-host.c +++ b/hw/cxl/cxl-host.c @@ -61,6 +61,61 @@ static void cxl_fixed_memory_window_config(CXLFixedMemor= yWindowOptions *object, fw->enc_int_gran =3D 0; } =20 + if (object->device_coherent) { + fw->restrictions |=3D CXL_FMW_DEVICE_COHERENT; + } + if (object->back_invalidate) { + if (object->has_device_coherent && !object->device_coherent) { + error_setg(errp, "CFMW BI requires device-coherent"); + return; + } + fw->restrictions |=3D CXL_FMW_DEVICE_COHERENT | CXL_FMW_BI; + } + if (object->host_only) { + fw->restrictions |=3D CXL_FMW_HOST_ONLY; + } else if (!object->has_host_only && + !(fw->restrictions & CXL_FMW_DEVICE_COHERENT)) { + /* host-only coherent is the default when no model is requested. */ + fw->restrictions |=3D CXL_FMW_HOST_ONLY; + } + + if (!(fw->restrictions & (CXL_FMW_DEVICE_COHERENT | CXL_FMW_HOST_ONLY)= )) { + error_setg(errp, "CFMW coherency model required"); + return; + } + + /* + * Reject the undefined and conflicting coherency combinations, + * per CXL r4.0 9.18.1.3. + */ + if ((fw->restrictions & CXL_FMW_HOST_ONLY) && + (fw->restrictions & CXL_FMW_BI)) { + error_setg(errp, "CFMW host-only coherency + BI is undefined behav= ior"); + return; + } + if ((fw->restrictions & CXL_FMW_DEVICE_COHERENT) && + (fw->restrictions & CXL_FMW_HOST_ONLY)) { + error_setg(errp, + "CFMW device and host-only coherency are mutually exclu= sive"); + return; + } + + if (object->fixed_config) { + fw->restrictions |=3D CXL_FMW_FIXED_CONFIG; /* no-op */ + } + + /* Volatile and persistent are permitted unless explicitly disabled. */ + if (!object->has_q_volatile || object->q_volatile) { + fw->restrictions |=3D CXL_FMW_VOLATILE; + } + if (!object->has_persistent || object->persistent) { + fw->restrictions |=3D CXL_FMW_PERSISTENT; + } + if (!(fw->restrictions & (CXL_FMW_VOLATILE | CXL_FMW_PERSISTENT))) { + error_setg(errp, "CFMW volatile and/or persistent memory required"= ); + return; + } + fw->targets =3D g_malloc0_n(fw->num_targets, sizeof(*fw->targets)); for (i =3D 0, target =3D object->targets; target; i++, target =3D targ= et->next) { /* This link cannot be resolved yet, so stash the name for now */ diff --git a/include/hw/cxl/cxl.h b/include/hw/cxl/cxl.h index 998f495a9847..187d5466528c 100644 --- a/include/hw/cxl/cxl.h +++ b/include/hw/cxl/cxl.h @@ -27,6 +27,17 @@ =20 typedef struct PXBCXLDev PXBCXLDev; =20 +/* + * CEDT CFMWS "Window Restrictions" bits (CXL r4.0 9.18.1.3), advertising + * which capabilities the host bridges below this window support. + */ +#define CXL_FMW_DEVICE_COHERENT (1 << 0) /* HDM-D */ +#define CXL_FMW_HOST_ONLY (1 << 1) /* HDM-H */ +#define CXL_FMW_VOLATILE (1 << 2) +#define CXL_FMW_PERSISTENT (1 << 3) +#define CXL_FMW_FIXED_CONFIG (1 << 4) +#define CXL_FMW_BI (1 << 5) /* HDM-DB, Back-Invalidate */ + typedef struct CXLFixedWindow { SysBusDevice parent_obj; int index; @@ -36,6 +47,7 @@ typedef struct CXLFixedWindow { uint8_t num_targets; uint8_t enc_int_ways; uint8_t enc_int_gran; + uint16_t restrictions; /* Todo: XOR based interleaving */ MemoryRegion mr; hwaddr base; diff --git a/qapi/machine.json b/qapi/machine.json index 685e4e29b87d..a5be531403a1 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -551,15 +551,44 @@ # accesses will go to a given interleave target. Accepted values # [256, 512, 1k, 2k, 4k, 8k, 16k] # +# @device-coherent: Window permits device-coherent (minimally HDM-D) +# accesses. (since 11.0) +# +# @host-only: Window permits host-only coherent (HDM-H) accesses. +# (since 11.0) +# +# @volatile: Window permits volatile memory. (since 11.0) +# +# @persistent: Window permits persistent memory. (since 11.0) +# +# @fixed-config: Window has a fixed device configuration. Advertised +# in the CEDT only; not otherwise emulated. (since 11.0) +# +# @back-invalidate: Window permits Back-Invalidate (HDM-DB). Implies +# @device-coherent. (since 11.0) +# # @targets: Target root bridge IDs from -device ...,id=3D for each # root bridge. # +# Coherency defaults to host-only coherent; request a device model +# with @device-coherent or @back-invalidate instead. @volatile and +# @persistent are permitted unless set to false, and at least one is +# required. Clearing @host-only with no device model is rejected, as +# are host-only coherent + back-invalidate and device-coherent + +# host-only coherent. +# # Since: 7.1 ## { 'struct': 'CXLFixedMemoryWindowOptions', 'data': { 'size': 'size', '*interleave-granularity': 'size', + '*device-coherent': 'bool', + '*host-only': 'bool', + '*volatile': 'bool', + '*persistent': 'bool', + '*fixed-config': 'bool', + '*back-invalidate': 'bool', 'targets': ['str'] }} =20 ## --=20 2.39.5