[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ANNOUNCE] minivmi: Zero-dependency, minimal Xen VMI learning project (<500 lines C)


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: junxiao wang <wangjunxiao045@xxxxxxxxx>
  • Date: Thu, 22 Jan 2026 16:29:20 +0800
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=/tzrRzNe1Oo179OoUJ9uBcIR8npvWm7/ge/DfccjyDI=; fh=quJY5mN2l4ZorNvEoO9ngNXalhEvTdq/+W8CvHWhECs=; b=GvSQFFbJfcXTQIbkTgRGQIrm8OGiaRez64B6L+2mB05B2A/A++A66HDxar4jDAXS+o rdEdtxagbqVt57mf0DcsG9iDJhWvpRgxKiOG50lQpqosfaMXWWFl271zyOQxqJ9Z3ihM 0wgScb4wzAsUzHAUJsRjJQYJE/OvGBxYDWD2SH08dciWtJ+B0qPu+HguMeB3gO/Mo1yy Ky5qmtmhwbZkyh4r5Tqrvz1kfJHLNfBfaTuY9ltbiVejG/4ahCcNqX7L7iFHUxh7FMrV 5n5rrop2VpsU5mvXvVSDe04khrLRJF6kBkI+a2+8q7tYivctcDWADHN+Lc63yMzA00O2 C1Xw==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1769070572; cv=none; d=google.com; s=arc-20240605; b=avXR1E9lz6o8AjEMeuC9cOTKIpdsP/FC6k1rQcbyY3KFW5qIyikb3NOZT7Ru+bj8Hg P804ItQ1bRxXC/D3DrgzrMf6m86RjAG2wlk+KIz2X1PFIUdrxo6ZJnfb27H56nRhJgIS CKu5A5gzypat7WbIk/qx0IPc458BxeqZ4K7u8tsi/5wLJ3KPN9uQyXj9jbQ7u8u897KY cKyWGthC748n2u0H4UtCL2sia3ajJN/SZ7kbsgLHnkFMVbuB6363afSQyYC1dok3jbH8 4mQ9pbGK2Qh1PETBSMTgZg0J44MOxxE2mvnGAY3S4HnJcIZwj4/gkBl5BR7inBz9PwFS YTjA==
  • Delivery-date: Thu, 22 Jan 2026 08:29:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi everyone,

I would like to share a small open-source project I've been working
on, called minivmi.

Repo: https://github.com/ania0-art/minivmi

Why I built this:
While learning Xen Virtual Machine Introspection (VMI), I identified a
gap in the available resources for beginners. Existing production
libraries like LibVMI, while powerful, utilize heavy abstraction
layers that can obscure the underlying mechanisms.

On the other hand, while Xen includes a test utility (xen-access.c)
within its source tree, it is tightly coupled with the Xen build
system and lacks educational documentation.

minivmi extracts these core concepts into a standalone,
zero-dependency project based on Xen 4.11 and Ubuntu 20.04. It allows
students to build with a single `make` command, serving as the "Hello
World" that the ecosystem has been missing.

What it is:
minivmi is a "bare-metal" style VMI implementation written in pure C
(< 500 lines). It intentionally bypasses high-level wrappers and
interacts directly with libxc, xenstore, and xenevtchn.

It demonstrates the minimal viable path to:
1. Enumerate domains using libxc.
2. Enable vm_event via xc_monitor_enable.
3. Monitor CR3 (Context Switch) events by manually handling the shared
ring buffer (req_prod/rsp_prod) and event channels.

Current Limitations:
Currently, the project focuses strictly on the event interception
mechanism (Hypercalls & Ring Buffer). It does not yet implement
software page-table walking or memory introspection, keeping the
codebase minimal for understanding the control flow first.

Goal:
This project is strictly educational. It aims to serve as a white-box
reference for anyone teaching or learning Xen internals, bridging the
gap between theory and implementation.

I hope this might be useful for the community's educational resources.
Feedback is welcome!

Best regards,

Junxiao Wang



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.