- Notifications
You must be signed in to change notification settings - Fork9
Linux kernel module for memflow's KVM connector
License
memflow/memflow-kvm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a connector for Kernel based virtual machines, by using a driver that maps all KVM pages into the memflow process (userspace -> userspace DMA).
memflow-kmod
includes the kernel module that performs the operations.
memflow-kvm-ioctl
provides a rust based IOCTL api to the kernel module.
memflow-kvm
provides a memflow physical memory connector that uses the ioctl.
Recommended way is to usememflowup.
Your kernel must be compiled withCONFIG_KALLSYMS=y
, andCONFIG_KALLSYMS_ALL=y
being set in kconfig.
Stable versions are available underreleases.
Debian/Ubuntu package can be installed withsudo dpkg -i memflow-dkms_${VERSION}_amd64.deb
, whereVERSION
is the version of the downloaded module.
For other distributions, run this command:
sudo dkms install --archive=memflow-${VERSION}-source-only.dkms.tar.gz
It might be necessary to also load the module at runtime:
sudo modprobe memflow
To load the module at startup create a new file in/etc/modules-load.d/
:
/etc/modules-load.d/memflow-kvm.conf---# Load memflow-kvm module on startupmemflow
The simplest way to setup the kernel module is to create a new group calledmemflow
and use a udev rule to set access rights to/dev/memflow
automatically when the module is being loaded:
groupadd memflowusermod -a -G memflow $USER
Then create the udev rule in/etc/udev/rules.d/
:
/etc/udev/rules.d/99-memflow-kvm.rules---KERNEL=="memflow" SUBSYSTEM=="misc" GROUP="memflow" MODE="0660"
Install the connector usingcargo build --release --all-features
. This will compile the connector in release mode and place it undertarget/release/
directory. Do copy out the underlying shared library to~/.local/lib/memflow/
if you want to use it across other memflow tools.
Initialize submodules:
git submodule update --init
Runmake
. output will be placed inmemflow-kmod/memflow.ko
.
Then to install the module:
source dkms.confmkdir /usr/src/$BUILT_MODULE_NAME-$PACKAGE_VERSIONcp -r * /usr/src/$BUILT_MODULE_NAME-$PACKAGE_VERSIONdkms build -m $BUILT_MODULE_NAME -v $PACKAGE_VERSIONdkms install -m $BUILT_MODULE_NAME -v $PACKAGE_VERSION
Then you can load the module:
sudo modprobe memflow
Q. I'm getting this warning:
warning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))warning: set the LLVM_CONFIG_PATH environment variable to the full path to a valid `llvm-config` executable (including the executable itself)
A. This warning is harmless and can be safely ignored.
Whilememflow-kvm-ioctl
, andmemflow-kvm
are licensed under theMIT
license,memflow-kmod
is licensed only underGPL-2
.
About
Linux kernel module for memflow's KVM connector
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.