# Copyright 2021 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

include <asm/msr.h>
include <uapi/asm/msr.h>
include <uapi/linux/fcntl.h>

resource fd_msr[fd]

syz_open_dev$MSR(dev ptr[in, string["/dev/cpu/#/msr"]], id intptr, flags const[O_RDONLY]) fd_msr
read$msr(fd fd_msr, buf buffer[out], count len[buf])

ioctl$X86_IOC_RDMSR_REGS(fd fd_msr, cmd const[X86_IOC_RDMSR_REGS], arg ptr[in, array[int32, 8]])
