Git Product home page Git Product logo

vm-virtio's Introduction

Build Status

vm-virtio

The vm-virtio crate provides a virtio device implementation:

  • A virtio virtqueue and Descriptor chain API
  • A virtio device trait (VirtioDevice)

Virtio Device trait

Virtio device implementations will implement the VirtioDevice trait. Typically the VMM will implement virtio devices and provide the paravirtualized IO emulation for all supported virtio devices. For example a VMM willing to emulate a virtio networking device will implement the VirtioDevice trait.

The VirtioDevice implementation will be discovered by the guest through a virtio transport layer (MMIO, PCI or channel IO). The transport layer implementation will then call into the VirtioDevice activate method to notify the device that the guest driver is done configuring it and that it should be ready to handle IO from the guest. On the other hand, the VirtioDevice reset method will be called by the transport layer when the guest driver needs to reset and release all the emulated device resources.

Virtio queue API

The vm-virtio queue API is to be consumed by virtio device implementations. The virtio device (net, block, rng, etc) implementation will call into the queue API to allocate and manage its specific virtio queues:

  • new() to allocate its queues.

  • iter() to iterate over the queue descriptors and consume virtio queue buffers made available by the guest driver.

  • add_used() to place a virtio queue buffer into the queue and have the guest driver consume it.

Tests

Our Continuous Integration (CI) pipeline is implemented on top of Buildkite. For the complete list of tests, check our CI pipeline.

Each individual test runs in a container. To reproduce a test locally, you can use the dev-container on both x86 and arm64.

container_version=5
docker run -it \
           --security-opt seccomp=unconfined \
           --volume $(pwd):/vm-virtio \
           rustvmm/dev:v${container_version}
cd vm-virtio/
cargo test

vm-virtio's People

Contributors

bonzini avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.