[PATCH v2 0/5] hw/cxl: hw/cxl: Host-only default CFMW restrictions and per-window options

Davidlohr Bueso posted 5 patches 4 days, 10 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260720233242.901544-1-dave@stgolabs.net
Maintainers: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Jonathan Cameron <jic23@kernel.org>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Zhao Liu <zhao1.liu@intel.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
docs/system/devices/cxl.rst      |  25 ++++----
hw/acpi/cxl.c                    |   2 +-
hw/cxl/cxl-host.c                |  46 +++++++++++++++
include/hw/cxl/cxl.h             |  12 ++++
qapi/machine.json                |  28 +++++++++
tests/data/acpi/x86/q35/CEDT.cxl | Bin 184 -> 184 bytes
tests/qtest/cxl-test.c           |  95 +++++++++++++++++++++++++++++++
7 files changed, 197 insertions(+), 11 deletions(-)
[PATCH v2 0/5] hw/cxl: hw/cxl: Host-only default CFMW restrictions and per-window options
Posted by Davidlohr Bueso 4 days, 10 hours ago
Changes since v1 [0]:
 - Keep device-coherent (HDM-D) in the default alongside host-only -- 0x0f
   rather than v1's 0xe, dropping only Back-Invalidate. (Jonathan)
 - Give the mixed HDM-DB / host-only docs example a window per host bridge
   so the mapping is explicit and both windows are exercised (Jonathan).
 - Add qtests (new patch 5).

[0] https://lore.kernel.org/all/20260602231806.2469011-1-dave@stgolabs.net/

As of commit e6742e71c24 CXL emulation is incurring in an (per spec)
undefined behaviour scenario, by allowing the CXL Window to publish
all three coherency models. This series addresses this issue.

The CEDT CFMWS "Window Restrictions" field (CXL r4.0 9.18.1.3) advertises
which coherency models and memory types a CXL Fixed Memory Window (CFMW)
permits.

 - Patches 1-3 drop Back-Invalidate from the default Window Restrictions
   (0x2f -> 0x0f), keeping both the device-coherent and host-only coherency
   models plus volatile and persistent, so an unconfigured window is
   spec-compliant out of the box. It is split into three patches as the
   bios-tables-test workflow requires (exclude CEDT.cxl, change the value,
   regenerate the blob, please shout if I'm doing something silly).

 - Patch 4 makes the restrictions configurable per window via named machine
   properties -- device-coherent, host-only, volatile, persistent,
   fixed-config, back-invalidate. 

 - Patch 5 adds qtests.

Thanks!

Davidlohr Bueso (5):
  tests/bios-tables-test: Exclude CEDT.cxl for the CFMW restriction
    change
  hw/cxl: Drop Back-Invalidate from default CFMW window restrictions
  tests/acpi/cxl: Update CEDT.cxl for the default CFMW restrictions
  hw/cxl: Add configurable CXL Fixed Memory Window restriction flags
  tests/qtest/cxl: Add CXL Fixed Memory Window restriction flag tests

 docs/system/devices/cxl.rst      |  25 ++++----
 hw/acpi/cxl.c                    |   2 +-
 hw/cxl/cxl-host.c                |  46 +++++++++++++++
 include/hw/cxl/cxl.h             |  12 ++++
 qapi/machine.json                |  28 +++++++++
 tests/data/acpi/x86/q35/CEDT.cxl | Bin 184 -> 184 bytes
 tests/qtest/cxl-test.c           |  95 +++++++++++++++++++++++++++++++
 7 files changed, 197 insertions(+), 11 deletions(-)


base-commit: b9e9a55f9950b78ef4c940d0599409c614f36766
-- 
2.39.5
Re: [PATCH v2 0/5] hw/cxl: hw/cxl: Host-only default CFMW restrictions and per-window options
Posted by Davidlohr Bueso 4 days, 10 hours ago
bleh sorry, the cover letter subject should say -qemu.