Skip to content

platform: add SlimVM platform#13596

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl940094281
Open

platform: add SlimVM platform#13596
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl940094281

Conversation

@copybara-service

Copy link
Copy Markdown

platform: add SlimVM platform

SlimVM is a lightweight VMX-based platform for gVisor that accelerates sentry system calls by eliminating unnecessary user/kernel context switches.

In a traditional gVisor + KVM setup, every guest syscall triggers a full VM exit to userspace, then re-enters the kernel via a regular syscall:

gr0 -> hr0 (vm_exit) -> hr3 (ioctl return) -> hr0 (re-invoke syscall)

SlimVM eliminates this overhead. When the guest executes a VMCALL, the VM exits into VMX root mode where SlimVM directly invokes the host kernel's syscall handler, then immediately resumes the guest:

gr0 -> hr0 (vmcall + direct function call)

SlimVM requires a companion kernel module that provides the /dev/slimvm device interface. See https://github.com/antgroup/slimvm for the kernel module and full documentation.

A sentry->host getpid microbenchmark (Xeon 6982P-C, host kernel 5.10.134)
shows the effect:

path ns/op (mean of 10) vs base
base 82.5 1.0x
slimvm 420.9 5.1x
kvm 3566.1 43.2x

slimvm is ~8.5x faster than the kvm platform on this path. See the issue
for details.

Updates: #13330

Co-developed-by: Chenggang chenggang.qcg@antfin.com
Co-developed-by: Robin Luk lubin.lu@antgroup.com
Co-developed-by: Tiwei Bie tiwei.btw@antgroup.com
Co-developed-by: Jianfeng Tan henry.tjf@antgroup.com
Co-developed-by: liushi.ls liushi.ls@antfin.com
Co-developed-by: Yong He chenglang.hy@antgroup.com
Co-developed-by: Aaron Lu ziqian.lzq@antfin.com
Co-developed-by: chris.zn chris.zn@alibaba-inc.com
Co-developed-by: Lai Jiangshan jiangshan.ljs@antfin.com
Co-developed-by: Lingfu yupeng.chenyp@alibaba-inc.com
Co-developed-by: Min Le lemin.lm@antgroup.com
Co-developed-by: Quan Xu wutu.xq@alibaba-inc.com
Co-developed-by: Zhang Haoyu zhanghaoyu.zhy@alibaba-inc.com
Co-developed-by: Dawei Shen shendawei.sdw@antgroup.com
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13331 from tianyuzhou95:albert/slimvm-pr 86eddc2

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jun 30, 2026
SlimVM is a lightweight VMX-based platform for gVisor that accelerates sentry system calls by eliminating unnecessary user/kernel context switches.

In a traditional gVisor + KVM setup, every guest syscall triggers a full VM exit to userspace, then re-enters the kernel via a regular syscall:

  gr0 -> hr0 (vm_exit) -> hr3 (ioctl return) -> hr0 (re-invoke syscall)

SlimVM eliminates this overhead. When the guest executes a VMCALL, the VM exits into VMX root mode where SlimVM directly invokes the host kernel's syscall handler, then immediately resumes the guest:

  gr0 -> hr0 (vmcall + direct function call)

SlimVM requires a companion kernel module that provides the /dev/slimvm device interface. See https://github.com/antgroup/slimvm for the kernel module and full documentation.

A sentry->host getpid microbenchmark (Xeon 6982P-C, host kernel 5.10.134)
shows the effect:

| path   | ns/op (mean of 10) | vs base |
| ------ | -----------------: | ------: |
| base   |               82.5 |   1.0x |
| slimvm |              420.9 |   5.1x |
| kvm    |             3566.1 |  43.2x  |

slimvm is ~8.5x faster than the kvm platform on this path. See the issue
for details.

Updates: #13330

Co-developed-by: Chenggang <chenggang.qcg@antfin.com>
Co-developed-by: Robin Luk <lubin.lu@antgroup.com>
Co-developed-by: Tiwei Bie <tiwei.btw@antgroup.com>
Co-developed-by: Jianfeng Tan <henry.tjf@antgroup.com>
Co-developed-by: liushi.ls <liushi.ls@antfin.com>
Co-developed-by: Yong He <chenglang.hy@antgroup.com>
Co-developed-by: Aaron Lu <ziqian.lzq@antfin.com>
Co-developed-by: chris.zn <chris.zn@alibaba-inc.com>
Co-developed-by: Lai Jiangshan <jiangshan.ljs@antfin.com>
Co-developed-by: Lingfu <yupeng.chenyp@alibaba-inc.com>
Co-developed-by: Min Le <lemin.lm@antgroup.com>
Co-developed-by: Quan Xu <wutu.xq@alibaba-inc.com>
Co-developed-by: Zhang Haoyu <zhanghaoyu.zhy@alibaba-inc.com>
Co-developed-by: Dawei Shen <shendawei.sdw@antgroup.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#13331 from tianyuzhou95:albert/slimvm-pr 86eddc2
PiperOrigin-RevId: 940094281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant