qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Introduce CXL type-2 device emulation
@ 2024-12-12 13:04 Zhi Wang
  2024-12-12 13:04 ` [PATCH 1/3] hw/cxl: factor out cxl_host_addr_to_dpa() Zhi Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Zhi Wang @ 2024-12-12 13:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: dan.j.williams, dave.jiang, jonathan.cameron, ira.weiny, fan.ni,
	alex.williamson, alucerop, clg, acurrid, cjia, smitra, ankita,
	aniketa, kwankhede, targupta, zhiw, zhiwang

Hi folks:

Per the discussion with Ira/Jonathan in the LPC 2024 and in the CXL
discord channel, we are trying to introduce a CXL type-2 device emulation
in QEMU, as there are work currently on supporting CXL type-2 device [1]
in Linux kernel and CXL type-2 device virtualization [2].

It provides a bare minimum base for folks who would like to:

- Contribute and test the CXL type-2 device support in the linux kernel
  and CXL type-2 virtualization without having an actual HW.
- Introduce more emulated features to prototype the kernel CXL type-2
  device features and CXL type-2 virtualization.

To test this patchset, please refer to steps in [3]. Use this patcheset
with the latest QEMU repo to be the QEMU host. It achieves the same output
as in the demo video [4]: The VFIO CXL core and VFIO CXL sample variant
driver can be attached to the emulated device in the L1 guest and assigned
to the L2 guest. The sample driver in the L2 guest can attach to the
pass-thrued device and create the CXL region.

Tested on the CXL type-2 virtualization RFC patches [3] with an extra
fix [5].

[1] https://lore.kernel.org/linux-cxl/20241209185429.54054-1-alejandro.lucero-palau@amd.com/T/#t
[2] https://www.youtube.com/watch?v=e5OW1pR84Zs
[3] https://lore.kernel.org/kvm/20240920223446.1908673-3-zhiw@nvidia.com/T/
[4] https://youtu.be/zlk_ecX9bxs?si=pf9CttcGT5KwUgiH
[5] https://lore.kernel.org/linux-cxl/20241212123959.68514-1-zhiw@nvidia.com/T/#u

Zhi Wang (3):
  hw/cxl: factor out cxl_host_addr_to_dpa()
  hw/cxl: introduce cxl_component_update_dvsec()
  hw/cxl: introduce CXL type-2 device emulation

 MAINTAINERS                    |   1 +
 docs/system/devices/cxl.rst    |  11 ++
 hw/cxl/cxl-component-utils.c   | 103 ++++++++++-
 hw/cxl/cxl-host.c              |  19 +-
 hw/mem/Kconfig                 |   5 +
 hw/mem/cxl_accel.c             | 319 +++++++++++++++++++++++++++++++++
 hw/mem/cxl_type3.c             |  61 +------
 hw/mem/meson.build             |   1 +
 include/hw/cxl/cxl_component.h |   7 +
 include/hw/cxl/cxl_device.h    |  25 +++
 include/hw/pci/pci_ids.h       |   1 +
 11 files changed, 484 insertions(+), 69 deletions(-)
 create mode 100644 hw/mem/cxl_accel.c

-- 
2.43.5



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

end of thread, other threads:[~2025-01-31 11:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 13:04 [PATCH 0/3] Introduce CXL type-2 device emulation Zhi Wang
2024-12-12 13:04 ` [PATCH 1/3] hw/cxl: factor out cxl_host_addr_to_dpa() Zhi Wang
2025-01-21 15:52   ` Jonathan Cameron via
2024-12-12 13:04 ` [PATCH 2/3] hw/cxl: introduce cxl_component_update_dvsec() Zhi Wang
2025-01-21 15:57   ` Jonathan Cameron via
2024-12-12 13:04 ` [PATCH 3/3] hw/cxl: introduce CXL type-2 device emulation Zhi Wang
2024-12-12 17:02   ` Alejandro Lucero Palau
2024-12-12 18:33     ` Zhi Wang
2025-01-21 16:16   ` Jonathan Cameron via
2025-01-31 10:45     ` Zhi Wang
2025-01-31 11:52       ` Jonathan Cameron via
2024-12-12 16:49 ` [PATCH 0/3] Introduce " Alejandro Lucero Palau
2024-12-12 18:10   ` Zhi Wang
2025-01-21 15:34     ` Jonathan Cameron via
2025-01-31 10:37       ` Zhi 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).