This file contains hidden or 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
#define _GNU_SOURCE | |
#include <asm/bootparam.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <linux/kvm.h> | |
#include <linux/kvm_para.h> | |
#include <stdarg.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains hidden or 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
#!/usr/bin/env python | |
from collections import defaultdict | |
import sys | |
import time | |
import curses | |
import math | |
""" | |
Continously shows the histogram of a stream of strings. |
This file contains hidden or 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
diff --git a/bindings/cpu_aarch64.h b/bindings/cpu_aarch64.h | |
index f1514aa..4afd5dd 100644 | |
--- a/bindings/cpu_aarch64.h | |
+++ b/bindings/cpu_aarch64.h | |
@@ -69,7 +69,7 @@ static inline uint64_t mul64_32(uint64_t a, uint32_t b, uint8_t s) | |
} | |
#endif /* !ASM_FILE */ | |
-static inline void cpu_set_tls_base(uint64_t base) | |
+__attribute__((always_inline)) static inline void cpu_set_tls_base(uint64_t base) |
This file contains hidden or 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 "solo5.h" | |
#include "../../bindings/lib.c" | |
#if defined(__linux__) | |
__thread volatile uint64_t data; | |
#else | |
/* This case is not tested. */ | |
volatile uint64_t data; | |
#endif |
This file contains hidden or 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
--- a/tenders/hvt/hvt_module_blk.c | |
+++ b/tenders/hvt/hvt_module_blk.c | |
@@ -116,8 +116,8 @@ static int setup(struct hvt *hvt) | |
if (diskfd == -1) | |
err(1, "Could not open disk: %s", diskfile); | |
- blkinfo.sector_size = 512; | |
- blkinfo.num_sectors = lseek(diskfd, 0, SEEK_END) / 512; | |
+ blkinfo.sector_size = 16384; | |
+ blkinfo.num_sectors = lseek(diskfd, 0, SEEK_END) / 16384; |
This file contains hidden or 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
diff --git a/bindings/spt/start.c b/bindings/spt/start.c | |
index 4064a41..f9ddede 100644 | |
--- a/bindings/spt/start.c | |
+++ b/bindings/spt/start.c | |
@@ -20,10 +20,23 @@ | |
#include "bindings.h" | |
+extern uintptr_t __stack_chk_guard; | |
+ |
This file contains hidden or 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 argparse | |
import pexpect | |
import os | |
import time | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--cmd', dest='cmd', help='unikernel command', default='echo hi', type=str) | |
parser.add_argument('--show', dest='show', help='show output', default=False, type=bool) | |
parser.add_argument('--num', dest='num', help='number of runs', default=10, type=int) | |
parser.add_argument('--timeout', dest='timeout', help='timeout', default=30, type=int) |
This file contains hidden or 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
umount /tmp/mnt_fat_test || true | |
mkdir -p /tmp/mnt_fat_test | |
( | |
dd if=/dev/zero of=test/disk-512.dat count=4096 bs=4096 | |
mkfs.fat -f 1 -S 512 test/disk-512.dat | |
mount test/disk-512.dat /tmp/mnt_fat_test | |
cd /tmp/mnt_fat_test | |
bash -c "mkdir -p {root1,root2}/{abc,xyz/cba/zyx}" |
This file contains hidden or 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
./tests/test_hello/ukvm-bin --gdb ./tests/test_hello/test_hello.ukvm & | |
gdb \ | |
--eval-command="set confirm off" \ | |
--eval-command="shell sleep 1" \ | |
--eval-command="target remote localhost:1234" \ | |
--eval-command="set {int} 0x00040000 = 12345" \ | |
--eval-command="p {int} 0x00040000" \ | |
--eval-command="b solo5_console_write" \ | |
--eval-command="c" \ | |
--eval-command="c" \ |
This file contains hidden or 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 sys | |
# Parse an exported raw genome data file from 23andme.com, wihch is basically | |
# one SNP per line. Each SNP is looked up in a small dictionary of | |
# "interesting" genes, like the ones related to celiac disease, | |
# lactointolerance, or obesity. The first and only arg is the name of the file | |
# (umcompressed). | |
db = {'rs2187668': {'geno': | |
{'AA': 'Autoimmune disorder risk (lupus, celiac disease) due to 2 HLA-DRB1*0301 alleles', |