qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC QEMU PATCH v4 0/2] cxl: Support creation of a new CXL Host Bridge
@ 2025-08-07 10:59 wangyuquan
  2025-08-07 10:59 ` [RFC QEMU PATCH v4 1/2] hw/pxb-cxl: Rename the pxb cxl host bridge wangyuquan
  2025-08-07 10:59 ` [RFC QEMU PATCH v4 2/2] pci-host/cxl: Support creation of a new CXL Host Bridge wangyuquan
  0 siblings, 2 replies; 6+ messages in thread
From: wangyuquan @ 2025-08-07 10:59 UTC (permalink / raw)
  To: jonathan.cameron, fan.ni, mst, marcel.apfelbaum, rad,
	peter.maydell, leif.lindholm, graf, claudio.fontana, philmd,
	richard.henderson
  Cc: chenbaozi, qemu-devel, linux-cxl, Yuquan Wang

From: Yuquan Wang <wangyuquan1236@phytium.com.cn>

v3 -> v4:
- Simplify variable definitions (Jonathan)
- Fix some alignment and space problems (Jonathan)
- Include the header file for MemoryRegion (Jonathan)
- Rebased on 'Make the CXL fixed memory windows devices'
- Keep cxl_fixed_memory_window_config() static and remove its declaration in the header file
v2 -> v3:
- Update the commit message
- Fix some alignment and space problems
- Add a SPDX header for the new file
- Remove unnecessary comments
- Add CXL_HOST_BRIDGE config
v1 -> v2:
- Move the code of new bridge to hw/pci-host/cxl.c
- Fix and simplify some logic on handling the different bridge types

Background
==========
Currently the base CXL support for arm platforms is only on Jonathan's
patches[1]. Some platform like SBSA-REF can be more like a real machine,
thus the support of CXL could be meaningful. However, the pxb-cxl-host
realization on this platform seems not satisfying their requirements[2].

New CXL HOST design
===================
Defines a new CXL host bridge type (TYPE_CXL_HOST). This is an
independent CXL host bridge which combined GPEX features (ECAM, MMIO
windows and irq) and CXL Host Bridge Component Registers (CHBCR).

The root bus path of CXL_HOST is "0001:00", that would not affect the
original pcie host topology. In the previous, the pxb-cxl-host with
any CXL root ports and CXL endpoint devices would occupy the BDF
number of the original pcie domain. This new type provide a solution
to resolve the problem.

Remaining problems
==================
I tried to use 'object_resolve_path' but it could not work in
'cxl_fmws_link', so I used 'TYPE_DEVICE' to match that.

Reviewing
=========
Welcome more PCI folks to review this patch, thanks a lot!

Link:
[1]: https://lore.kernel.org/linux-cxl/20220616141950.23374-1-Jonathan.Cameron@huawei.com/
[2]: https://lists.nongnu.org/archive/html/qemu-arm/2024-11/msg00522.html

Yuquan Wang (2):
  pci-host/cxl: Support creation of a new CXL Host Bridge
  hw/pxb-cxl: Rename the pxb cxl host bridge

 hw/cxl/cxl-host.c                     |  56 +++++++---
 hw/pci-bridge/pci_expander_bridge.c   |   8 +-
 hw/pci-host/Kconfig                   |   4 +
 hw/pci-host/cxl.c                     | 146 ++++++++++++++++++++++++++
 hw/pci-host/meson.build               |   1 +
 include/hw/cxl/cxl.h                  |   7 +-
 include/hw/pci-host/cxl_host_bridge.h |  24 +++++
 7 files changed, 229 insertions(+), 17 deletions(-)
 create mode 100644 hw/pci-host/cxl.c
 create mode 100644 include/hw/pci-host/cxl_host_bridge.h

-- 
2.34.1



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

end of thread, other threads:[~2025-09-18  3:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 10:59 [RFC QEMU PATCH v4 0/2] cxl: Support creation of a new CXL Host Bridge wangyuquan
2025-08-07 10:59 ` [RFC QEMU PATCH v4 1/2] hw/pxb-cxl: Rename the pxb cxl host bridge wangyuquan
2025-09-17 16:32   ` Jonathan Cameron via
2025-08-07 10:59 ` [RFC QEMU PATCH v4 2/2] pci-host/cxl: Support creation of a new CXL Host Bridge wangyuquan
2025-09-17 16:37   ` Jonathan Cameron via
2025-09-18  2:59     ` Yuquan Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).