Theoretically SPDK should be able to support multiple storage backends, including NVMe drive, Linux AIO and malloc ramdisk.
So it looks like you do need to have a NVMe drive...
Below are the instructions of how to setup the test environment.
Host Environment: CentOS 7
1. Compile SPDK
$ cd spdk
$ git submodule update --init (clone submodule DPDK)
$ sudo ./scripts/pkgdep.sh (install dependencies, ignore unnecessary packages)
$ ./configure
$ make -j8
2. Install QEMU 2.12.0
$ tar xvf qemu-2.12.0.tar.xz && cd qemu-2.12.0
$ ./configure --target-list=x86_64-softmmu
$ make -j8 && sudo make install
3. Setup Hugepages
Edit /etc/default/grub, add
intel_iommu=on default_hugepagesz=1G hugepagesz=1G hugepages=16 (reserve 16GB hugepages for testing)
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
4. Auto load vfio module
Edit /etc/modules-load.d/vfio.conf, add
vfio_pci
5. Reboot
$ sudo reboot
6. Setup SPDK
$ cd spdk && sudo su
# ulimit -l unlimited
# HUGEMEM=16384 ./scripts/setup.sh
# ./app/vhost/vhost -S /var/tmp -s 1024 -m 0x1 & (start vhost daemon)
# ./scripts/rpc.py construct_nvme_bdev -b nvme0 -t pcie -a 0000:03:00.0 (NVMe drive's pci address)
# ./scripts/rpc.py construct_lvol_store nvme0n1 lvs.nvme0n1
# ./scripts/rpc.py construct_lvol_bdev -l lvs.nvme0n1 lvol.0 20480 (create a 20GB logical volume)
# ./scripts/rpc.py construct_vhost_scsi_controller vhost.0
# ./scripts/rpc.py add_vhost_scsi_lun vhost.0 0 lvs.nvme0n1/lvol.0 (should then have a /var/tmp/vhost.0 socket)
7. Copy rootfs image into logical volume
# ./scripts/rpc.py start_nbd_disk lvs.nvme0n1/lvol.0 /dev/nbd0
# dd if=CentOS-7.3-x86_64-SPDK-NVMe.img of=/dev/nbd0 oflag=direct bs=1M (Copy the 20GB image into the logical volume, see attached file)
# ./scripts/rpc.py stop_nbd_disk /dev/nbd0
rpm install ...
9. Start QEMU
# /usr/local/bin/qemu-system-x86_64 \
-enable-kvm -cpu host -smp 4 \
-m 4G -object memory-backend-file,id=mem0,size=4G,mem-path=/dev/hugepages,share=on -numa node,memdev=mem0 \
-drive file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd,format=raw,if=pflash \
-chardev socket,id=spdk_vhost_scsi0,path=/var/tmp/vhost.0 \
-device vhost-user-scsi-pci,chardev=spdk_vhost_scsi0,num_queues=4,bootindex=0 \
...