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

Davidlohr Bueso posted 4 patches 5 days, 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260602231806.2469011-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 <jonathan.cameron@huawei.com>, Fan Ni <fan.ni@samsung.com>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Zhao Liu <zhao1.liu@intel.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
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 ++++++++++++++++
tests/data/acpi/x86/q35/CEDT.cxl | Bin 184 -> 184 bytes
6 files changed, 101 insertions(+), 10 deletions(-)
[PATCH -qemu 0/4] hw/cxl: Host-only default CFMW restrictions and per-window options
Posted by Davidlohr Bueso 5 days, 5 hours ago
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. Qemu hardcodes this to 0x2f, which advertises Device Coherent,
host-only coherent and Back-Invalidate (BI) simultaneously, which is a
spec violation/UB.

 - Patches 1-3 fix the default Window Restrictions from 0x2f to
   0xe (host-only coherent, volatile, persistent), so an unconfigured
   window is spec-compliant out of the box. I have split it in 3 patches
   as indicated by the bios-tables-test, please shout if I did something
   stupid updating the binary (this was a bit confusing).

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

Without patch 4 the HDM-DB support is effectively untestable upstream.

Davidlohr Bueso (4):
  tests/bios-tables-test: Exclude CEDT.cxl for host-only restriction default
  hw/cxl: Use host-only coherency for default CFMW restrictions
  tests/acpi/cxl: Update CEDT.cxl for host-only default restrictions
  hw/cxl: Add per-capability CXL Fixed Memory Window restriction flags

 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 ++++++++++++++++
 tests/data/acpi/x86/q35/CEDT.cxl | Bin 184 -> 184 bytes
 6 files changed, 101 insertions(+), 10 deletions(-)

-- 
2.39.5