Abstract: The blktap2 method provides a userland daemon to provide access to on disk files, arbitrated by the kernel. The NetBSD kernel lacks this support and currently disables blktap in xentools.



The driver interacts with some areas of the kernel that are different from linux - eg: inter-domain page mapping, interdomain signalling. This may make it more challenging than a simple driver, especially with test/debug/performance risk.

Note: There's opportunity to compare notes with the FUSE/rump implementations.

See http://wiki.xenproject.org/wiki/Blktap and http://xenbits.xensource.com/hg/xen-unstable.hg/file/tip/tools/blktap2/README

blktap2 is long dead (except maybe inside Citrix and maybe OpenXT), deprecated since Xen 4.10 (and not really supported since probably about Xen 4.3, up to 2015):


It was finally entirely removed from the Xen repo last year:


If I understand correctly blktap2 died because it couldn't be upstreamed into the Linux kernel due to its licensing (i.e. it wasn't GNU-enough).

blktap3 came along and seemed better, but blktap3 is effectively dead too, and also note that blktap3 as-is effectively relies on libaio and Linux AIO system calls:


(You will find almost all of the links and repos for blktap3 are dead.)

In the mean time blktap (aka blktap1) is still used (as I understand it blktap is just a Linux driver that speaks blkback, the Xen PV block protocol, from dom0 to domUs; along with a daemon and library and tools for building userland block storage providers, such as to VHD files) and so it could also be a great project for NetBSD dom0 as it would add good and easy support for VHD files:


BTW, the following slides give a good (but increasingly dated) analysis and overview of Xen storage access technologies and some of their issues. Herein I believe you can effectively substitute bktap1 and blktap2 as they have the same basic structure.


Finally note that 9pfs via VirtIO may be another way forward, but that's also now in the "Archived" section on the XenProject Wiki:


Comment by woods-stackoverflow.com late Saturday evening, April 10th, 2021