From: Yuquan Wang <wangyuquan1236@phytium.com.cn>
To: Jonathan.Cameron@Huawei.com
Cc: qemu-devel@nongnu.org, linux-cxl@vger.kernel.org
Subject: CXL numa error on arm64 qemu virt machine
Date: Wed, 8 May 2024 16:00:51 +0800 [thread overview]
Message-ID: <20240508080051.3756934-1-wangyuquan1236@phytium.com.cn> (raw)
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.0000212a@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
next reply other threads:[~2024-05-08 8:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 8:00 Yuquan Wang [this message]
2024-05-08 12:02 ` CXL numa error on arm64 qemu virt machine Jonathan Cameron via
2024-05-09 8:35 ` Yuquan Wang
2024-05-10 17:16 ` Jonathan Cameron via
2024-05-17 10:07 ` Yuquan Wang
2024-05-17 10:14 ` Jonathan Cameron via
2024-05-17 18:03 ` Jonathan Cameron via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240508080051.3756934-1-wangyuquan1236@phytium.com.cn \
--to=wangyuquan1236@phytium.com.cn \
--cc=Jonathan.Cameron@Huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).