用Qemu模拟一个下面的Numa架构:
启动命令如下:
#!/bin/bash QEMU=qemu-system-aarch64 sudo $QEMU\ -M virt,gic-version=3,virtualization=on,type=virt \ -cpu cortex-a57 -nographic -m 4G \ -smp cores=4,threads=1,sockets=2 \ -object memory-backend-ram,id=mem0,size=2G \ -object memory-backend-ram,id=mem1,size=2G \ -numa node,memdev=mem0,cpus=0-3,nodeid=0 \ -numa node,memdev=mem1,cpus=4-7,nodeid=1 \ -fsdev local,security_model=passthrough,id=fsdev0,path=/home/pengdonglin/data0/Qemu/share \ -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \ -drive if=none,file=./ubuntu.img,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 \ -append "noinitrd root=/dev/vda1 rootfstype=ext4 rw console=ttyAMA0" \ -kernel ./linux5.8/out_arm64/arch/arm64/boot/Image \ -netdev user,id=eth0,hostfwd=tcp::8765-:22 -device virtio-net-device,netdev=eth0 \ -nographic