|
@@ -52,6 +52,7 @@
|
|
|
|
|
|
#include <asm/processor.h>
|
|
#include <asm/processor.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
|
|
+#include <asm/ioctl.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/uaccess.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/pgtable.h>
|
|
|
|
|
|
@@ -2032,6 +2033,9 @@ static long kvm_vcpu_ioctl(struct file *filp,
|
|
if (vcpu->kvm->mm != current->mm)
|
|
if (vcpu->kvm->mm != current->mm)
|
|
return -EIO;
|
|
return -EIO;
|
|
|
|
|
|
|
|
+ if (unlikely(_IOC_TYPE(ioctl) != KVMIO))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
#if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS)
|
|
#if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS)
|
|
/*
|
|
/*
|
|
* Special cases: vcpu ioctls that are asynchronous to vcpu execution,
|
|
* Special cases: vcpu ioctls that are asynchronous to vcpu execution,
|