Qingtian Box (QtBox)
Qingtian Box is the pci device, realized on the primary vm, to provide a message channel which controls the lifecycle of qt enclaves in the Huawei Cloud. The corresponding Qingtian Box driver is available in the upstream Linux kernel.
Driver information
The Qingtian Box kernel driver is currently available for the v4.18+ kernel. Out-of-tree driver build can be done using the Makefile in the 'qingtian/virtio-qtbox' directory.
Prerequisites
- Install
make,glibc-2.0,git,gcc,clang,gnutls-devel,nettle-devel,glib2-devel
Source-code Components
We organize all QTbox's components as following (all paths are relative to the QTbox root directory):
virtio_qtbox.c: A implementation for qtbox-pci probe and remove
virtio_qtbox_cmdq.c: A implementation for qtbox cmd queue process
virtio_qtbox_dataq.c: A implementation for qtbox data queue process
virtio_qtbox_eventq.c: A implementation for qtbox event queue process
uapi: Uniform Application Program Interface file for qtbox
tests: Interface tests file for qtbox
service: A implementation for qtbox management-func such as define, resouce add, start, stop and undefine
How to install Qingtian Box driver
-
Clone the repository
-
Compilation:
cd ${Qingtian Box root dir} && make -
insmod ${QTBOX_DRIVER_PATH}.ko(Note: You can see the device /dev/qtbox_service0 after insmod virtio-qtbox.ko) -
you are now ready to go
Lisence
This project is licensed under the GNU GENERAL PUBLIC v2.0 License.
Contribution
Please check CONTRIBUTION.md out.