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.

Deliverables:

Implementation:

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):

https://xenbits.xen.org/docs/unstable/support-matrix.html

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

https://xenbits.xenproject.org/gitweb/?p=xen.git;a=commit;h=5c883cf036cf5ab8b1b79390549e2475f7a568dd

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:

https://wiki.xenproject.org/wiki/Blktap3

(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:

https://wiki.xenproject.org/wiki/Blktap

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.

https://events.static.linuxfound.org/sites/events/files/slides/20131025%20-%20Storage%20Performance%20PDF.pdf

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

https://wiki.xenproject.org/wiki/Archived/Xen_Development_Projects#Enabling_the_9P_File_System_transport_as_a_paravirt_device

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