<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr">Hi Mario,</div><div dir="ltr"><br></div><div dir="ltr"><blockquote type="cite">On Dec 31, 2021, at 23:51, Mario Marietto <marietto2008@gmail.com> wrote:<br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><p>Hello.</p>

<p>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),</p></div></div></blockquote>I didn’t seem to see this question on the #dragonflybsd IRC and this mailing list.<br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><p>I've thought of trying this <span class="gmail-Y2IQFc" lang="en">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</span><span class="gmail-Y2IQFc" lang="en"> 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 :<br></span></p><p><span class="gmail-Y2IQFc" lang="en"><a href="http://mail-index.netbsd.org/pkgsrc-users/2021/09/05/msg034346.html">http://mail-index.netbsd.org/pkgsrc-users/2021/09/05/msg034346.html</a></span></p><p><span class="gmail-Y2IQFc" lang="en"> </span></p><p>it seems that the fix has not been ported to DFLY,so for this reason we can't use NVMM.<br></p></div></div></blockquote>Sure. I noticed such a fix to Qemu upstream some time ago.<div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>Check:</div><div><a href="https://www.dragonflybsd.org/docs/docs/howtos/nvmm/">https://www.dragonflybsd.org/docs/docs/howtos/nvmm/</a></div><div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><p>So,this is what I did :<br></p><p>I'm trying to test qemu and nvmm on :</p>


<p><code>DragonFly marietto 6.1-DEVELOPMENT DragonFly 
v6.1.0.573.gfca8e8-DEVELOPMENT #0: Wed Dec 22 09:11:32 CET 2021 
marietto@marietto:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64</code></p>

<p>first of all I added these users on the nvmm group :</p>

<pre><code class="gmail-hljs gmail-language-ruby">root<span class="gmail-hljs-variable">@marietto</span><span class="gmail-hljs-symbol">:/home/marietto</span> <span class="gmail-hljs-comment"># pw groupmod nvmm -m marietto</span>
root<span class="gmail-hljs-variable">@marietto</span><span class="gmail-hljs-symbol">:/home/marietto</span> <span class="gmail-hljs-comment"># pw groupmod nvmm -m root</span></code></pre>

<p>then,I've launched this vm :</p>


<pre><code class="gmail-hljs gmail-language-lua">qemu-system-x86_64 \
-machine <span class="gmail-hljs-built_in">type</span>=q35,accel=nvmm \
-smp cpus=<span class="gmail-hljs-number">4</span> -m <span class="gmail-hljs-number">8</span>G \
-drive <span class="gmail-hljs-keyword">if</span>=pflash,<span class="gmail-hljs-built_in">format</span>=raw,readonly=on,file=/usr/<span class="gmail-hljs-keyword">local</span>/share/uefi-edk2-qemu/QEMU_UEFI_CODE-x86_64.fd \
-drive <span class="gmail-hljs-keyword">if</span>=pflash,<span class="gmail-hljs-built_in">format</span>=raw,file=/usr/<span class="gmail-hljs-keyword">local</span>/share/uefi-edk2-qemu/QEMU_UEFI_VARS-x86_64.fd \
-drive file=/mnt/dragonfly-ufs/bhyve/impish-cuda<span class="gmail-hljs-number">-11</span><span class="gmail-hljs-number">-4</span>-nvidia<span class="gmail-hljs-number">-470.</span>img,<span class="gmail-hljs-keyword">if</span>=none,id=disk0 \
-device virtio-blk-pci,drive=disk0 \
-netdev user,id=net0,hostfwd=tcp:<span class="gmail-hljs-number">127.0</span><span class="gmail-hljs-number">.0</span><span class="gmail-hljs-number">.1</span>:<span class="gmail-hljs-number">6022</span>-:<span class="gmail-hljs-number">22</span> \
-device virtio-net-pci,netdev=net0 \
-object rng-<span class="gmail-hljs-built_in">random</span>,id=rng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=rng0 \
-display curses \

WARNING: Image <span class="gmail-hljs-built_in">format</span> was <span class="gmail-hljs-keyword">not</span> specified <span class="gmail-hljs-keyword">for</span> <span class="gmail-hljs-string">'/mnt/dragonfly-ufs/bhyve/impish-cuda-11-4-nvidia-470.img'</span> <span class="gmail-hljs-keyword">and</span> probing guessed raw. Automatically detecting the <span class="gmail-hljs-built_in">format</span> is dangerous <span class="gmail-hljs-keyword">for</span> raw images, <span class="gmail-hljs-built_in">write</span> operations on block <span class="gmail-hljs-number">0</span> will be restricted. Specify the <span class="gmail-hljs-string">'raw'</span> <span class="gmail-hljs-built_in">format</span> explicitly to <span class="gmail-hljs-built_in">remove</span> the restrictions.</code></pre>
<p>unfortunately I get this error,that it seems a bug to me :</p>

<p><code>qemu-system-x86_64: invalid accelerator nvmm</code></p>


<p>just because nvmm works great :</p>


<pre><code class="gmail-hljs gmail-language-yaml"><span class="gmail-hljs-string">root@marietto:/home/marietto/Desktop</span> <span class="gmail-hljs-comment"># nvmmctl identify</span>

<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Kernel</span> <span class="gmail-hljs-string">API</span> <span class="gmail-hljs-string">version</span> <span class="gmail-hljs-number">3</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">State</span> <span class="gmail-hljs-string">size</span> <span class="gmail-hljs-number">1008</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Comm</span> <span class="gmail-hljs-string">size</span> <span class="gmail-hljs-number">4096</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Max</span> <span class="gmail-hljs-string">machines</span> <span class="gmail-hljs-number">128</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Max</span> <span class="gmail-hljs-string">VCPUs</span> <span class="gmail-hljs-string">per</span> <span class="gmail-hljs-string">machine</span> <span class="gmail-hljs-number">128</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Max</span> <span class="gmail-hljs-string">RAM</span> <span class="gmail-hljs-string">per</span> <span class="gmail-hljs-string">machine</span> <span class="gmail-hljs-string">127T</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Arch</span> <span class="gmail-hljs-string">Mach</span> <span class="gmail-hljs-string">conf</span> <span class="gmail-hljs-number">0</span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Arch</span> <span class="gmail-hljs-string">VCPU</span> <span class="gmail-hljs-string">conf</span> <span class="gmail-hljs-number">0x3</span><span class="gmail-hljs-string"><CPUID,TPR></span>
<span class="gmail-hljs-attr">nvmm:</span> <span class="gmail-hljs-string">Guest</span> <span class="gmail-hljs-string">FPU</span> <span class="gmail-hljs-string">states</span> <span class="gmail-hljs-number">0x3</span><span class="gmail-hljs-string"><x87,SSE></span></code></pre></div></div></blockquote><div>The NVMM part looks good.</div><div><br></div></div><div>Cheers,</div><div>Aaron </div></body></html>