Skip to content

Commit aa8a6a5

Browse files
authored
Merge pull request #49 from slp/bump-v1.0.0
Update README.md and bump version to v1.0.0
2 parents eb3f050 + f516764 commit aa8a6a5

File tree

4 files changed

+53
-20
lines changed

4 files changed

+53
-20
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
LIBRARY_HEADER = include/libkrun.h
22
INIT_BINARY = init/init
33

4-
ABI_VERSION=0
5-
FULL_VERSION=0.2.1
4+
ABI_VERSION=1
5+
FULL_VERSION=1.0.0
66

77
ifeq ($(SEV),1)
88
VARIANT = -sev

README.md

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,40 +24,53 @@ It integrates a VMM (Virtual Machine Monitor, the userspace side of an Hyperviso
2424

2525
* Become a generic VMM.
2626
* Be compatible with all kinds of workloads.
27-
* Provide the best possible performance.
2827

29-
## Device support
28+
## Variants
3029

31-
### Virtio devices
30+
This project provides two different variants of the library:
31+
32+
- **libkrun**: Generic variant compatible with all Virtualization-capable systems.
33+
- **libkrun-sev**: Variant including support for AMD SEV (bare SEV and SEV-ES) memory encryption and remote attestation. Requires an SEV-capable CPU.
34+
35+
Each variant generates a dynamic library with a different name (and ```soname```), so both can be installed at the same time in the same system.
36+
37+
## Virtio device support
38+
39+
### All variants
3240

3341
* virtio-console
42+
* virtio-vsock (specialized for TSI, Transparent Socket Impersonation)
43+
44+
### libkrun
45+
3446
* virtio-fs
35-
* virtio-vsock
3647
* virtio-balloon (only free-page reporting)
48+
* virtior-rng
3749

38-
### Networking
50+
### libkrun-sev
3951

40-
In ```libkrun```, networking is implemented using a novel technique called **socket-to-vsock impersonation**. This allows the VM to have network connectivity without a virtual interface (hence, ```virtio-net``` is not among the list of supported devices).
52+
* virtio-block
4153

42-
The current implementation of this technique, found part in this repository and the other part in the kernel patches included with [libkrunfw](https://github.com/containers/libkrunfw) is just a **proof-of-concept**. It's limited to IPv4 TCP and UNIX connections, only supports recv/send operations, and the implementation itself is still quite hacky. We expect this technique to mature within ```libkrun```, so it can be eventually upstreamed into the Linux kernel and other VMMs.
54+
## Networking
4355

44-
#### DNS resolutions issues
56+
In ```libkrun```, networking is implemented using a novel technique called **Transparent Socket Impersonation**, or **TSI**. This allows the VM to have network connectivity without a virtual interface (hence, ```virtio-net``` is not among the list of supported devices).
4557

46-
As, by default, ```glibc``` will use UDP for DNS requests, which is not yet supported by the **socket-to-vsock impersonation** technique described above, name resolution will fail with the default configuration. To work around this, you need to add the following line to the ```/etc/resolv.conf``` of the root filesystem servicing the isolated process:
58+
This technique supports both outgoing and incoming connections. It's possible for userspace applications running in the VM are able to transparently connect to endpoints outside the VM, and also receive connections from the outside to ports listening inside the VM.
4759

48-
```
49-
options use-vc
50-
```
60+
### Limitations
61+
62+
**TSI** only supports impersonating AF_INET SOCK_DGRAM and SOCK_STREAM sockets. This implies it's not possible to communicate outside the VM with raw sockets.
5163

5264
## Building and installing
5365

54-
### Linux
66+
### Linux (generic variant)
5567

5668
#### Requirements
5769

5870
* [libkrunfw](https://github.com/containers/libkrunfw)
5971
* A working [Rust](https://www.rust-lang.org/) toolchain
6072
* C Library static libraries, as the [init](init/init.c) binary is statically linked (package ```glibc-static``` in Fedora)
73+
* patchelf
6174

6275
#### Compiling
6376

@@ -71,6 +84,28 @@ make
7184
sudo make install
7285
```
7386

87+
### Linux (SEV variant)
88+
89+
#### Requirements
90+
91+
* The SEV variant of [libkrunfw](https://github.com/containers/libkrunfw), which provides a ```libkrunfw-sev.so``` library.
92+
* A working [Rust](https://www.rust-lang.org/) toolchain
93+
* C Library static libraries, as the [init](init/init.c) binary is statically linked (package ```glibc-static``` in Fedora)
94+
* patchelf
95+
* OpenSSL headers and libraries (package ```openssl-devel``` in Fedora).
96+
97+
#### Compiling
98+
99+
```
100+
make SEV=1
101+
```
102+
103+
#### Installing
104+
105+
```
106+
sudo make SEV=1 install
107+
```
108+
74109
### macOS
75110

76111
#### Requirements
@@ -133,9 +168,7 @@ LD_LIBRARY_PATH=/usr/local/lib64 ./chroot_vm rootfs/ /bin/sh
133168

134169
## Status
135170

136-
While functional, ```libkrun``` is still in a **very early development stage**.
137-
138-
Our first priority now is **getting feedback from potential users of the library**, to build a Community around it that would **help us set the priorities and shape it** to be useful for them.
171+
```libkrun``` has achieved maturity and starting version ```1.0.0``` the public API is guaranteed to be stable, following [SemVer](https://semver.org/).
139172

140173
## Acknowledgments
141174

src/libkrun/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "libkrun"
3-
version = "0.2.0"
3+
version = "1.0.0"
44
authors = ["Sergio Lopez <[email protected]>"]
55
edition = "2021"
66
build = "build.rs"

0 commit comments

Comments
 (0)