Hello, Jonathan

Recently I run some cxl tests on qemu virt(branch:cxl-2024-04-22-draft) but met 
some
problems.

Problems: 
1) the virt machine could not set the right numa topology from user input;

My Qemu numa set:
-object memory-backend-ram,size=2G,id=mem0 \
-numa node,nodeid=0,cpus=0-1,memdev=mem0 \
-object memory-backend-ram,size=2G,id=mem1 \
-numa node,nodeid=1,cpus=2-3,memdev=mem1 \

However, the system shows:
root@ubuntu-jammy-arm64:~# numactl -H
        available: 1 nodes (0)
        node 0 cpus: 0 1 2 3
        node 0 size: 4166 MB
        node 0 free: 3920 MB
        node distances:
        node   0 
        0:  10 

Boot Kernel print:
[    0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x40000000-0xbfffffff]
[    0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0xc0000000-0x13fffffff]
[    0.000000] ACPI: Unknown target node for memory at 0x10000000000, assuming 
node 0
[    0.000000] NUMA: Warning: invalid memblk node 16 [mem 
0x0000000004000000-0x0000000007ffffff]
[    0.000000] NUMA: Faking a node at [mem 
0x0000000004000000-0x000000013fffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x13f7f89c0-0x13f7fafff]

2) it seems like the problem of allocating numa node in arm for cxl memory 
still exists;
Previous discussion: 
https://lore.kernel.org/linux-cxl/20231011150620.00002...@huawei.com/

root@debian-bullseye-arm64:~# cxl create-region -d decoder0.0 -t ram
[   68.653873] cxl region0: Bypassing cpu_cache_invalidate_memregion() for 
testing!
[   68.660568] Unknown target node for memory at 0x10000000000, assuming node 0

If not, maybe I could try to do something to help fix this problem.


My full qemu command line:
qemu-system-aarch64 \
-M virt,gic-version=3,cxl=on \
-m 4G \
-smp 4 \
-object memory-backend-ram,size=2G,id=mem0 \
-numa node,nodeid=0,cpus=0-1,memdev=mem0 \
-object memory-backend-ram,size=2G,id=mem1 \
-numa node,nodeid=1,cpus=2-3,memdev=mem1 \
-cpu cortex-a57 \
-bios QEMU_EFI.fd.bak \
-device virtio-blk-pci,drive=hd,bus=pcie.0 \
-drive if=none,id=hd,file=../disk/debos_arm64.ext \
-nographic \
-object memory-backend-file,id=mem2,mem-path=/tmp/mem2,size=256M,share=true \
-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=mem2,id=cxl-mem1 \
-M cxl-fmw.0.targets.0=cxl.1,cxl-fmw.0.size=4G \
-qmp tcp:127.0.0.1:4444,server,nowait \

Qemu version: the lastest commit of branch cxl-2024-04-22-draft in 
"https://gitlab.com/jic23/qemu"; 
Kernel version: 6.6.0

Many thanks
Yuquan


Reply via email to