Spin
QEMU
Spin | QEMU | |
---|---|---|
1 | 197 | |
356 | 10,216 | |
- | 3.5% | |
3.3 | 10.0 | |
19 days ago | 5 days ago | |
C | C | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Spin
-
Minimal tips to run isolated code
git clone https://github.com/nimble-code/Spin.git cd Spin make
QEMU
-
Minimal tips to run isolated code
There are several choices for running code in partial or full isolation. Some languages include lightweight environments that do not interfere with each other, e.g., virtual environments in Python. However, due to caching and links, these are not sufficiently isolated for us. At the other end of the spectrum, we can run code in a node of a cloud computing service. However, the overhead and cost make this not worthwhile given our needs: isolation, but not very strong security requirements. Alternatively, we can run a virtual machine or emulator such as QEMU, VirtualBox, or others. This also has too much overhead given our needs.
- Deterministic Replay of QEMU Emulation
-
Weird things I learned while writing an x86 emulator
Over the last year I have been rewriting QEMU's x86 decoder. I am now at a point where it should not be too hard to add APX support.
My decoder is mostly based on the tables in the manual, and the code is mostly okay—not too much indentation and phases mostly easy to separate/identify. Nevertheless there are several cases in which the manual is wrong or doesn't say the whole story.
The top comment explains a bit what's going on: https://github.com/qemu/qemu/blob/59084feb256c617063e0dbe7e6...
- Podman Desktop 1.11: Light mode and new Kubernetes features
-
QEMU networking on macOS
QEMU is an excellent open-source project that enables users to work on various projects across multiple platforms. Starting a VM instance with QEMU is straightforward. On my old Intel-based Mac, the following command will launch an Ubuntu cloud image:
-
Automating the Building of VMs with Packer
Another important tool from the same organization is Vagrant, which provides extra help in running VMs built with Packer. Of course, the choice of a VM provider is also very important, as some VM providers may not be supported on certain platforms. For example, there are no VMware or VirtualBox releases that support Apple Silicon. However, QEMU is supported on most platforms, including Apple Silicon, which is why this provider was chosen here.
-
QEMU Version 9.0.0 Released
My most-wanted QEMU feature: https://github.com/qemu/qemu/commit/a2260983c6553
Using `gic-version=3` on macOS you can now use more than 8 cores on ARM chips.
-
Autoconf makes me think we stopped evolving too soon
A better solution is just to write a plain ass shell script that tests if various C snippets compile.
https://github.com/oilshell/oil/blob/master/configure
https://github.com/oilshell/oil/blob/master/build/detect-pwe...
Not an unholy mix of m4, shell, and C, all in the same file.
---
These are the same style as a the configure scripts that Fabrice Bellard wrote for tcc and QEMU.
They are plain ass shell scripts, because he actually understands the code he writes.
https://github.com/qemu/qemu/blob/master/configure
https://github.com/TinyCC/tinycc/blob/mob/configure
OCaml’s configure script is also “normal”.
You don’t have to copy and paste thousands of lines of GNU stuff that you don’t understand.
(copy of lobste.rs comment)
-
WASM Instructions
Related:
A fast Pascal (Delphi) WebAssembly interpreter:
https://github.com/marat1961/wasm
WASM-4:
https://github.com/aduros/wasm4
Curated list of awesome things regarding WebAssembly (wasm) ecosystem:
https://github.com/mbasso/awesome-wasm
Also, it would be nice if there was a WASM (soft) CPU for QEMU, which (if it existed!) would go here:
https://github.com/qemu/qemu/tree/master/target
-
Revng translates (i386, x86-64, MIPS, ARM, AArch64, s390x) binaries to LLVM IR
> architectural registers are always updated
In tiny code, the guest registers (global TCG variables) are stored in the host's registers until you either call an helper which can access the CPU state or you return (`git grep la_global_sync`). This is the reason why QEMU is not so terribly slow.
But after a check, this also happens when you access the guest memory address space! https://github.com/qemu/qemu/blob/master/include/tcg/tcg-opc... (TCG_OPF_SIDE_EFFECTS is what matters)
But still, in the end, it's the same problem. What QEMU does, can be done in LLVM too. You could probably be more efficient in LLVM by using the exception handling mechanism (invoke and friends) to only serialize back to memory when there's an actual exception, at the cost of higher register pressure. More or less what we do here: https://rev.ng/downloads/bar-2019-paper.pdf
What are some alternatives?
podman - Podman: A tool for managing OCI containers and pods.
UTM - Virtual machines for iOS and macOS
Unicorn Engine - Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, S390x, TriCore, X86)
TermuxArch - Experience the pleasure of the Linux command prompt in Android, Chromebook, Fire OS and Windows on smartphone, smartTV, tablet and wearable https://termuxarch.github.io/TermuxArch/
Vagrant - Vagrant is a tool for building and distributing development environments.
em-dosbox - An Emscripten port of DOSBox
xemu - Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Packer - Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
MicroPython - MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
virt-manager - Desktop tool for managing virtual machines via libvirt
oVirt - oVirt website
k8s-lab-terraform-libvirt - A Kubernetes lab environment using terraform and libvirt