diff options
author | Masatake YAMATO <yamato@redhat.com> | 2017-12-02 04:05:28 +0900 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-12-01 22:27:01 +0000 |
commit | 5f61f158c3680e003b81bb9e311358ab842b0de1 (patch) | |
tree | 8c4944f0038efec47765318ee773c2b4a3c174f9 | |
parent | 312073760fcd6806d9918f4526d804b504c6353a (diff) | |
download | strace-5f61f158c3680e003b81bb9e311358ab842b0de1.tar.gz |
kvm: decode the argument of KVM_CREATE_VCPU ioctl command
* kvm.c (kvm_ioctl_create_vcpu): New function.
(kvm_ioctl) <KVM_CREATE_VCPU>: Use it.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
-rw-r--r-- | kvm.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -33,10 +33,21 @@ #ifdef HAVE_LINUX_KVM_H # include <linux/kvm.h> +static int +kvm_ioctl_create_vcpu(struct tcb *const tcp, const kernel_ulong_t arg) +{ + uint32_t cpuid = arg; + + tprintf(", %u", cpuid); + return RVAL_IOCTL_DECODED | RVAL_FD; +} + int kvm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t arg) { switch (code) { + case KVM_CREATE_VCPU: + return kvm_ioctl_create_vcpu(tcp, arg); case KVM_CREATE_VM: return RVAL_DECODED | RVAL_FD; case KVM_RUN: |