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
KVM_GET_API_VERSION = 0xAE00 | |
KVM_CREATE_VM = 0xAE01 | |
KVM_SET_USER_MEMORY_REGION = 0x4020AE46 | |
KVM_CREATE_VCPU = 0xAE41 | |
KVM_GET_SREGS = 0x8138AE83 | |
KVM_SET_SREGS = 0x4138AE84 | |
KVM_NR_INTERRUPTS = 0x100 | |
KVM_GET_VCPU_MMAP_SIZE = 0xAE04 | |
KVM_GET_REGS = 0x8090AE81 | |
KVM_SET_REGS = 0x4090AE82 |
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
#!/usr/bin/python3 | |
from fcntl import ioctl | |
import sys | |
import time | |
from mmap import mmap, PROT_READ, PROT_WRITE, MAP_SHARED, MAP_PRIVATE, MAP_ANONYMOUS | |
from structs import * | |
RAM_SIZE = 0x10000 |