qemu-system-x86_64: invalid accelerator nvmm. Is this a bug ?

Aaron LI aly at aaronly.me
Fri Dec 31 15:53:59 PST 2021

Hi Mario,

> On Dec 31, 2021, at 23:51, Mario Marietto <marietto2008 at gmail.com> wrote:
> Hello.
> For sure I don't want to bother you,but after having posted this question in several places and no one replied (like IRC,the ML,or Reddit or the UnitedBSD forum),
I didn’t seem to see this question on the #dragonflybsd IRC and this mailing list.
> I've thought of trying this unorthodox method,just because...I need support to understand the reasons for this error. I also think that by helping me,you are also helping the other DFLY lovers. Thanks for the understanding. Taking in consideration that NVMM has been ported from NetBSD and on the NetBSD this same error has been fixed,as you can see below :
> http://mail-index.netbsd.org/pkgsrc-users/2021/09/05/msg034346.html
> it seems that the fix has not been ported to DFLY,so for this reason we can't use NVMM.
Sure. I noticed such a fix to Qemu upstream some time ago.

But well, we can’t directly use the official unmodified version. The DPorts version should be used and there are several necessary patches (ideally we’d better push to upstream, but that takes time and efforts).

It looks to me you were using the Qemu build from upstream rather than installed via pkg(8). If yes, then that’s the issue, and you just switch to our version and should just work.


> So,this is what I did :
> I'm trying to test qemu and nvmm on :
> DragonFly marietto 6.1-DEVELOPMENT DragonFly v6.1.0.573.gfca8e8-DEVELOPMENT #0: Wed Dec 22 09:11:32 CET 2021 marietto at marietto:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64
> first of all I added these users on the nvmm group :
> root at marietto:/home/marietto # pw groupmod nvmm -m marietto
> root at marietto:/home/marietto # pw groupmod nvmm -m root
> then,I've launched this vm :
> qemu-system-x86_64 \
> -machine type=q35,accel=nvmm \
> -smp cpus=4 -m 8G \
> -drive if=pflash,format=raw,readonly=on,file=/usr/local/share/uefi-edk2-qemu/QEMU_UEFI_CODE-x86_64.fd \
> -drive if=pflash,format=raw,file=/usr/local/share/uefi-edk2-qemu/QEMU_UEFI_VARS-x86_64.fd \
> -drive file=/mnt/dragonfly-ufs/bhyve/impish-cuda-11-4-nvidia-470.img,if=none,id=disk0 \
> -device virtio-blk-pci,drive=disk0 \
> -netdev user,id=net0,hostfwd=tcp: \
> -device virtio-net-pci,netdev=net0 \
> -object rng-random,id=rng0,filename=/dev/urandom \
> -device virtio-rng-pci,rng=rng0 \
> -display curses \
> WARNING: Image format was not specified for '/mnt/dragonfly-ufs/bhyve/impish-cuda-11-4-nvidia-470.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions.
> unfortunately I get this error,that it seems a bug to me :
> qemu-system-x86_64: invalid accelerator nvmm
> just because nvmm works great :
> root at marietto:/home/marietto/Desktop # nvmmctl identify
> nvmm: Kernel API version 3
> nvmm: State size 1008
> nvmm: Comm size 4096
> nvmm: Max machines 128
> nvmm: Max VCPUs per machine 128
> nvmm: Max RAM per machine 127T
> nvmm: Arch Mach conf 0
> nvmm: Arch VCPU conf 0x3<CPUID,TPR>
> nvmm: Guest FPU states 0x3<x87,SSE>
The NVMM part looks good.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20220101/283c163f/attachment-0002.htm>

More information about the Users mailing list