This repository contains all the work done for the project TCG Plugin: Cache modelling, wherein a multi-core, multi-level cache modelling TCG plugin is developed. I also wrote a QEMU blog post that contains more technical information about the internals of the plugin, along with an example demonstrating how to make use of it. The plugin can be optionally attached to QEMU on either user-mode emulation or full-system emulation. On
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
use16 | |
org 0x7c00 | |
; Set stack | |
mov bp, 0x8000 | |
mov sp, bp | |
; Load 2nd stage | |
mov bx, 0x07E0 | |
mov es, bx |
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
import numpy as np | |
import pandas as pd | |
from matplotlib import pyplot as plt | |
import os | |
if not os.getenv("LAB_PATH"): | |
print("Set Lab Path\n") | |
exit(1) | |
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
static struct virtio_blk blk_device; | |
static struct slab_t *virtio_blk_req_slab; | |
void virtio_blk_isr() | |
{ | |
uint32_t intr_status = VIRTIO_READ(VIRTIO_MMIO_INTERRUPT_STATUS); | |
VIRTIO_WRITE(VIRTIO_MMIO_INTERRUPT_ACK, intr_status); | |
while (blk_device.last_seen_used != blk_device.virtq.used->idx) { |
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
660a661,664 | |
> pkgconfig_fuse_LIBS | |
> pkgconfig_fuse_CFLAGS | |
> pkgconfig_fuse3_LIBS | |
> pkgconfig_fuse3_CFLAGS | |
670a675,676 | |
> pkgconfig_XZ_LIBS | |
> pkgconfig_XZ_CFLAGS | |
673a680,683 | |
> pkgconfigdir |
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
#!/bin/bash | |
MNT_DIR="/mnt/zfs-$RANDOM" | |
sudo apt install kpartx | |
sudo losetup /dev/loop13 $1 | |
sudo kpartx -av /dev/loop13 | |
sudo mkdir $MNT_DIR | |
sudo zpool import -d /dev/mapper/ -R $MNT_DIR | |
sudo zpool import zroot -R $MNT_DIR -f |