Skip to content

Instantly share code, notes, and snippets.

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 129f66fe7a11..87ff1e5f354d 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -140,4 +140,7 @@ config KVM_XEN
config KVM_EXTERNAL_WRITE_TRACKING
bool
+config KVM_MODULE_VERSION
+ int
qemu-system-x86_64 --enable-kvm -kernel vmlinux -append "console=ttyS0 root=/dev/nvme0n1 init=/sbin/sh" -cpu host -smp 2 -m 2G -display none -serial stdio -drive file=/tmp/testdisk.img,if=none,id=nvme -device nvme,drive=nvme,serial=disk -drive file=/tmp/vac.img,if=none,id=nvme1 -device nvme,drive=nvme1,serial=disk1 -drive file=/tmp/disk.img,if=none,id=nvme2 -device nvme,drive=nvme2,serial=disk2 -no-reboot
/tmp/q/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -L /tmp/q/share/qemu -kernel x86/msr.flat
for i in *.flat; do /tmp/q/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -L /tmp/q/share/qemu -kernel $i; done
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.4.0-rc2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90400
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23400
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.4.0-rc2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90400
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23400
#include <pthread.h>
static int go;
static int should_exit;
void *ctr(void *p) {
int *counter = p;
for (;;) {
if (__atomic_load_n(&go, __ATOMIC_RELAXED))
always [madvise] never
mode: always
[always] madvise never
Initializing array made of 33554432 64-bit words (256.00 MiB).
Source pages allocated with transparent hugepages: 100.0% (65536 pages, 100.0% flagged)
Legend:
BandW: Implied bandwidth (assuming 64-byte cache line) in MB/s
% Eff: Effectiness of this lane count compared to the prior, as a % of ideal
Speedup: Speedup factor for this many lanes versus one lane
Applying Sattolo's algorithm... chain total: 33554432
1
> f5ab40da
167772150 steps in 14312734 uS
715.446776 MB/s
2
> 3d86c6d0
167772140 steps in 7332881 uS
1396.449605 MB/s
3
> 6c41197b
ffffffff801c2500: 55 push %rbp
ffffffff801c2501: 48 89 e5 mov %rsp,%rbp
ffffffff801c2504: 8b 05 66 18 1a 00 mov 0x1a1866(%rip),%eax # ffffffff80363d70 <wall_clock>
ffffffff801c250a: 83 f8 01 cmp $0x1,%eax
ffffffff801c250d: 7f 08 jg ffffffff801c2517 <arch_current_ticks()+0x17>
ffffffff801c250f: 85 c0 test %eax,%eax
ffffffff801c2511: 75 0f jne ffffffff801c2522 <arch_current_ticks()+0x22>
ffffffff801c2513: 31 c0 xor %eax,%eax
ffffffff801c2515: 5d pop %rbp
ffffffff801c2516: c3 retq

Keybase proof

I hereby claim:

  • I am vsrinivas on github.
  • I am vsrinivas (https://keybase.io/vsrinivas) on keybase.
  • I have a public key whose fingerprint is 4B90 06E3 8FA6 8072 B98E 6C66 974C 20CD 27C2 F2DD

To claim this, I am signing this object:

#define _XOPEN_SOURCE 500
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <string.h>
#include <unordered_set>