Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SAFE_QUEUE | |
#define SAFE_QUEUE | |
#include <condition_variable> | |
#include <mutex> | |
#include <queue> | |
// A threadsafe-queue. | |
template <class T> | |
class SafeQueue |
- QEMU includes bundled option ROMs which are loaded by default unless a device is specifically setup with --romfile="".
- These options roms are bundled as binaries. The source code for the same can be found at http://ipxe.org/
- These options roms are useful for example when you want to PXE boot over a virtio-net device.
Here is an example of booting via Network PXE using the option ROM
qemu-system-x86_64 \
virtio is a kernel virtual bus. From drivers/virtio/virtio.c
:
static struct bus_type virtio_bus = {
.name = "virtio",
.match = virtio_dev_match,
.dev_groups = virtio_dev_groups,
.uevent = virtio_uevent,
.probe = virtio_dev_probe,
.remove = virtio_dev_remove,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Compile: | |
* gcc -std=gnu11 -Wall -Wextra c_priority_queue_threads.c -o priority_queue_threads -lpthread -lrt | |
*/ | |
#include <errno.h> | |
#include <mqueue.h> | |
#include <fcntl.h> /* For O_* constants. */ | |
#include <sys/stat.h> /* For mode constants. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi All! | |
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future. | |
Feel free to request any features you'd like to see, and I'll prioritize them accordingly. | |
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it. | |
Here's the link to the repository: https://github.com/Pulimet/ADBugger | |
App Description: | |
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups. |
But default in linux you can figure out how many times and for what reasons there is a VM Exit from a VM into the kvm kernel module. However given the ubiquity of vhost and the ability of kvm to emulate most device models directly in the kernel, most of those VM exits do not result in a transition from host kernel into the QEMU. The transitions from VM -> kvm -> QEMU are typically the most expensive.
Here we try to figure out how many of the VM Exits result in the invocation of QEMU.
This can be done very simply with perf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/device.h> | |
#include <linux/init.h> | |
#include <linux/fs.h> | |
#include <linux/mm.h> | |
#include <asm/uaccess.h> | |
#define MAX_SIZE (PAGE_SIZE * 2) /* max size mmaped to userspace */ | |
#define DEVICE_NAME "mchar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<linux/module.h> | |
#include<linux/kernel.h> | |
#include<linux/string.h> | |
#include<linux/vmalloc.h> | |
#include<linux/mm.h> | |
#include<linux/init.h> | |
#include<linux/proc_fs.h> | |
#include<linux/sched.h> | |
#include<linux/uaccess.h> | |
#include<linux/fs.h> |
NewerOlder