#!/usr/sbin/stap -g
# Requires guru mode (-g) for target variable writes
probe syscall.ioctl {
    SG_IO = 0x2285
    if($cmd == SG_IO && execname() == "qemu-kvm") {
        printf("filtering SG_IO ioctl request from qemu-kvm process %d\n", pid())
        $cmd   = 0x0
        $fd    = -1
    }
}
