[PATCH 4/8] kvm: decode the argument for KVM_CREATE_VCPU ioctl command
Masatake YAMATO
yamato at redhat.com
Fri Dec 1 05:45:54 UTC 2017
* kvm.c (kvm_ioctl): Handle KVM_CREATE_VCPU.
(kvm_ioctl_create_vcpu): New function.
Signed-off-by: Masatake YAMATO <yamato at redhat.com>
---
kvm.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/kvm.c b/kvm.c
index fdcf3466..1b21dab5 100644
--- a/kvm.c
+++ b/kvm.c
@@ -43,10 +43,21 @@ kvm_ioctl_create_vm(struct tcb *const tcp, const kernel_ulong_t arg)
#endif
}
+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 kvm_ioctl_create_vm(tcp, arg);
--
2.13.6
More information about the Strace-devel
mailing list