-
NOTE: cxl-tool.sh is not maintained anymore, always use cxl-tool.py.
-
For feedback, please email [email protected].
-
If you like the tool, please star it to attract more people's interests.
-
ADD suppot for archlinux (tested on my laptop, may need more fix);
-
Now you can test bare metal with simple configuration, see commit 87697211e3a96aaec946baa57e9b18f6d31401f8
-
Done: recently I started to move the code to python so it is easier to support more complicated use workflow. cxl-tool.py is the new main file.*
1. Updated DCD test workflow; 2. Add mctp setup; 3. Add ras related test support; 4. ...
NOTE:
- the tool needs python3 and some other packages. Before starting to use it.
- Make sure you have git, ssh, python3, python-is-python3, gdb, gcc installed.
- Also, before creating the qemu image, generate ssh key first with ssh-keygen on the host if not already exist.
- The created image uses the public key to enable passwordless access.
- download cxl-test-tool from github;
- Install packages needed (python3, python-is-python3, ssh);
- Generate ssh key if not already (for keyless access to the VM) on the host;
- cp run_vars.example .vars.config;
- Configure .vars.config as needed;
- setup QEMU: ./cxl-tool.py --setup-qemu (If ninja not found, check if the right location is pointed for ninja)
- Create Qemu image for VM: ./cxl-tool.py --create-image
- setup Kernel: ./cxl-tool.py --setup-kernel
- Start a VM with basic CXL topology: ./cxl-tool.py --run
- login to the VM by: ./cxl-tool.py --login
- Enjoy and explore more with the tool ...
All the run configuration options are defined in .vars.config. This options will control where the directory of qemu, kernel, and which qemu image we want to use. Also, all the URLs related to git clone operation is defined there. The easiest way to generate the file is to copy run_vars.example and make the change as needed.
- qemu launch command string is stored: /tmp/cxl-logs/cmd
- qemu topology used: /tmp/cxl-logs/topo
- qemu run output: /tmp/cxl-logs/qemu.log
cxl-tool.py --create-image
This will generate qemu image under at location "QEMU_IMG" that can be used by the following steps.
cxl-tool.py --setup-qemu
cxl-tool.py --build-qemu
cxl-tool.py --setup-kernel
cxl-tool.py --run -A kvm -T m2
cxl-tool.py --run -A kvm --create-topo
cxl-tool.py --install-ndctl
cxl-tool.py --cxl-pmem-test mem0
cxl-tool.py --qdb
cxl-tool.py --kdb
cxl-tool.py --ndb "cxl list"
cxl-tool.py --C "commands to execute in vm"
cxl-tool.py --run/poweroff/shutdown
cxl-tool.py --create-dcR mem0
cxl-tool.py --issue-qmp qmp_file
This command can be used for poison injection, dc extent add/release
cxl-tool.py --help
- Apply the patch test-workflows/0001-qapi-cxl.json-Add-QMP-interfaces-to-print-out-accept.patch on top of qemu source code which have DCD emulation support;
- Create a cxl topology that has DCD support (only single dcd device tested) in .cxl-topology.xml;
- run test: cxl-tool.py --dcd-test