• NetBSD
  • NVMM test failure on NetBSD

So there are some dev tools for little projects that do not quiet work on NetBSD (gradle), so I am trying to do linux in a VM using qemu on NetBSD 9.1. I am hitting quiet a few issues with distros getting spun up on qemu hanging up for having issues with loading their kernels. I am guessing there may be an issue with qemu and maybe NVMM since NVMM appears to be providing the back end hypervisor for qemu based off what I read. So I tried the nvmm tests under /usr/test/lib/libnvmm using atf-run | atf-report

This is my output:

`mbp-netbsd$ atf-run | atf-report
Tests root: /usr/tests/lib/libnvmm

t_io_assist (1/2): 1 test cases
io_assist: [0.048695s] Failed: I/O Assist failed with errno 13
[0.049566s]

t_mem_assist (2/2): 1 test cases
mem_assist: [0.043862s] Failed: Mem Assist failed with errno 13
[0.044294s]

Failed test cases:
t_io_assist:io_assist, t_mem_assist:mem_assist

Summary for 2 test programs:
0 passed test cases.
2 failed test cases.
0 expected failed test cases.
0 skipped test cases.`

Please file a PR with detailed information about the CPU model on your host machine (cpuctl identify 0).

  • Jay likes this.

I got it figured out. My assumption was that nvmm was built into the kernel. Turns out not so, so I pulled down the sources and did the whole set up the build tools and compile the module.

Might be a good candidate for contribution into the NetBSD user guide? Looking through it there was not really much on loadable kernel modules and I had to rely on google-fu and some blog posts.

Generally you don't need to build it, just modload it, but I guess I did give you a newer kernel without giving you the associated modules. :\

  • Jay likes this.

Its no problem. It was a good learning experience for me! Learned a bit about NetBSD and how easy it is to build things in the src directory when its been pulled down. Huh, so normally the nvmm module is included as apart of the kernel without having to build it?

stares at an old PPC iBook I have this new knowledge can come in handy.

  • Jay likes this.

It's included in /stand as a module by default since 9.0 and can be loaded with modload nvmm. Kernel modules are tied to a particular kernel version so you need to update them if you update to a kernel from a newer release. It's not built-in to the kernel because while it's loaded it blocks things like suspend from happening.