Giter Site home page Giter Site logo

nluhux / vmm_clock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voutilad/vmm_clock

0.0 0.0 0.0 22 KB

Experimental implementation of a kvmclock-derived clocksource for Linux guests under OpenBSD's hypervisor

License: GNU General Public License v2.0

Makefile 8.24% C 91.76%

vmm_clock's Introduction

vmm_clock

This is a Linux clocksource implementation based on the existing Linux kvmclock. It's specifically designed for using when running a Linux kernel as a guest under OpenBSD's vmm(4)/vmd(8) hypervisor framework.

Primary goals:

  • provide a clocksource that doesn't suffer from unmanageable clock-drift as seen when using refined-jiffies with a more recent Linux LTS kernel (e.g. 5.4)
  • provide a clocksource loadable as a module that does not require users build a complete kernel from source
  • be platform independent, i.e. work the same on Intel and AMD hosts.

Secondary goals:

  • make the code as short and tight as possible
  • identify a means of testing clock drift

Known issues:

  • if you try to unload the module, you will probably panic the kernel
  • since kvmclock wasn't designed to be a module, it may never be possible to support module removal

Prerequisites

You'll need OpenBSD 6.8 or newer as it contains fixes I provided for race conditions in vmd(8) that cause stability problems with Linux guests. It is 100% required for this kernel module to work. If you try to use this with an older OpenBSD version, I guarantee you will have runaway vmd(8) processes or crashes.

Building & Installing

For now, follow some of the pre-reqs for virtio_vmmci and you should just be able to:

# make && make install && modprobe vmm_clock

You can load it at boot by creating /etc/modules-load.d/vmm_clock.conf with just the contents:

vmm_clock

Tested Platforms and Configs

I'm testing with the following:

  • Alpine 3.12.2 and their stock v5.4 -virt kernel
  • Debian Buster 10.4 and its v4.19 kernel
  • Ubuntu 20.04 and its v5.4 kernel

As usual, no warranty...use at your own risk, etc.!

License

GPLv2...see LICENSE file.

vmm_clock's People

Contributors

voutilad 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.