summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasatake YAMATO <yamato@redhat.com>2017-12-02 04:05:28 +0900
committerDmitry V. Levin <ldv@altlinux.org>2017-12-01 22:27:01 +0000
commit5f61f158c3680e003b81bb9e311358ab842b0de1 (patch)
tree8c4944f0038efec47765318ee773c2b4a3c174f9
parent312073760fcd6806d9918f4526d804b504c6353a (diff)
downloadstrace-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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kvm.c b/kvm.c
index b8c81ac5b..9e4f9978a 100644
--- a/kvm.c
+++ b/kvm.c
@@ -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: