pmem / ndctl

A "device memory" enabling project encompassing tools and libraries for CXL, NVDIMMs, DAX, memory tiering and other platform memory device topics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I hoped to disable EFI Specific Purpose Memory Support,just I want to use QEMU to simulate CXL DRAM and have it exist as a general-purpose System RAM, becoming a separate zNUMA node. However, I have not been successful and the device can always be found under the cxl list command.

Yemaoxin opened this issue · comments

I have made the greatest effort to consult the documentation of the kernel and QEMU.

Here is my setup.

QEMU version 8.0.50 is the version corresponding to the QEMU official website documentation. https://gitlab.com/jic23/qemu/-/tree/cxl-2023-05-19

Linux Kervel version:6.3.4

OS Image:Ubuntu22.04

QEMU_RUN command:
${QEMU_RUN} -enable-kvm -cpu host -smp 16 \ -kernel ${KERNEL_PATH} \ -M type=q35,cxl=on\ -append "${KERNEL_CMD}" \ -drive if=ide,file=${QEMU_IMG},cache=none \ -m 32G,maxmem=64G -vnc :3 \ -serial stdio \ -display none \ -netdev "user,id=network0,hostfwd=tcp::23511-:22" \ -device "e1000,netdev=network0" \ -object memory-backend-ram,id=vmem0,share=on,size=16G \ -object memory-backend-file,id=cxl-lsa0,share=on,mem-path=/tmp/lsa.raw,size=256M \ -device pxb-cxl,bus_nr=12,bus=pcie.0,id=cxl.1 \ -device cxl-rp,port=0,bus=cxl.1,id=root_port13,chassis=0,slot=2 \ -device cxl-type3,bus=root_port13,volatile-memdev=vmem0,lsa=cxl-lsa0,id=cxl-vmem0 \ -M cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=4G

CXL list -M
image
numactl -H
image
QEMU seems to always use CXL as special-purpose DRAM instead of becoming a zNUMA node.

Where do I should fix?Is it the option for Linux kernel compilation?

I have already set the corresponding kernel parameters. CONFIG_EFI_SOFT_RESERVE=n