Troubleshooting

This section provides solutions to common problems you may encounter.

Index

  1. Illegal Instruction Error with SIMD Access in QEMU
  2. cxl Package Issue
  3. daxctl Package Issue
  4. xcena_cli Execution Errors
  5. Example Test Failures

Illegal Instruction Error with SIMD Access in QEMU

Problem

When accessing CXL memory allocated by PXL’s memAlloc API using SIMD instructions within QEMU, an illegal instruction error may occur. This issue can also arise when accessing the memory using float* or double* pointers.

Solution

To resolve this issue, run QEMU in no-KVM mode. This can be done by adding the --no-kvm option when starting QEMU:

./run.sh --no-kvm

Refer to the following help message in the SDK emulator:

./run.sh --help

Usage: ./run.sh [options]
Options:
    --debug    : Run QEMU with CXL debug log
    --qemu     : QEMU path (default: qemu)
    --kernel   : Kernel path (default: kernel)
    --rootfs   : Select root file system (debian, fedora, ubuntu) (default: ubuntu)
    --cxl      : CXL memory configuration file (default: cfg/cxl/pmem)
    --port     : Host network port (default: user ID dependent)
    --no-kvm   : Disable KVM acceleration

cxl Package Issue

Problem

The cxl list command is not working.

Solution

  1. Ensure the environment is a Docker container:
  2. Check the cxl package version:
    • If the version is incorrect, certain features may not be visible.
      cxl version          # Expected version: 72.1+
      
  3. If issues persist, try reinstalling Docker.

daxctl Package Issue

Problem

The daxctl list command is not working.

Solution

  1. Ensure the environment is a Docker container.
  2. Verify that the CXL device is attached as a .Mem device:
    lspci | grep CXL                # Check the BDF (Bus Device Function).
    lspci -vvs <BDF> | grep CXLCtl  # Ensure "Mem+" is included.
    

xcena_cli Execution Errors

Problem

The output is 0 in the xcena_cli num-device command.

Solution

  1. Ensure the required Python modules are installed:
    pip list | grep -E 'click|pandas|pyvcd|serial|pexpect'
    
  2. Check if Docker was started with the --privileged flag:
    ls /sys/fs/cgroup/    # If successful, Docker is running in privileged mode.
    
  3. Confirm that the mx_dma module is loaded into the kernel:
    lsmod | grep mx_dma
    
  4. (Re-)Install and reload the mx_dma module if necessary:
    docker cp xcena_sdk:/work/driver /tmp/mx_dma
    docker stop xcena_sdk
    docker rm xcena_sdk
    
    cd /tmp/mx_dma
    sudo ./install.sh
    
    reboot
    
    lsmod | grep mx_dma
    
    # If mx_dma is not loaded, reload the modules:
    sudo rmmod cxl_pmem cxl_acpi cxl_pci cxl_core mx_dma
    sudo insmod /lib/modules/5.15.0-43-generic/extra/mx_dma.ko
    sudo insmod /lib/modules/5.15.0-43-generic/extra/cxl_5.15/core/cxl_core.ko
    sudo insmod /lib/modules/5.15.0-43-generic/extra/cxl_5.15/cxl_pci.ko
    sudo insmod /lib/modules/5.15.0-43-generic/extra/cxl_5.15/cxl_acpi.ko
    sudo insmod /lib/modules/5.15.0-43-generic/extra/cxl_5.15/cxl_pmem.ko
    
    # Re-run a Docker container
    

Example Test Failures

Problem

An example test fails with a core dump.

Steps to Troubleshoot

  1. Check if num_device is greater than or equal to 1:
    xcena_cli num-device
    
  2. Verify that MSUB bitmap is non-zero:
    xcena_cli device-info 0
    
    • If it is 0x0, offloading cannot proceed.