From: Marcelo Tosatti <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt
index 126419f..f504e0b 100644
--- a/Documentation/kvm/api.txt
+++ b/Documentation/kvm/api.txt
@@ -631,7 +631,8 @@ such as migration.
struct kvm_clock_data {
__u64 clock; /* kvmclock current value */
- __u64 pad[2];
+ __u32 flags;
+ __u32 pad[9];
};
4.28 KVM_SET_CLOCK
@@ -648,7 +649,8 @@ such as migration.
struct kvm_clock_data {
__u64 clock; /* kvmclock current value */
- __u64 pad[2];
+ __u32 flags;
+ __u32 pad[9];
};
5. The kvm_run structure
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 3270b3b..173a626 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2476,6 +2476,10 @@ long kvm_arch_vm_ioctl(struct file *filp,
if (copy_from_user(&user_ns, argp, sizeof(user_ns)))
goto out;
+ r = -EINVAL;
+ if (user_ns.flags)
+ goto out;
+
r = 0;
ktime_get_ts(&now);
now_ns = timespec_to_ns(&now);
@@ -2495,6 +2499,10 @@ long kvm_arch_vm_ioctl(struct file *filp,
if (copy_to_user(argp, &user_ns, sizeof(user_ns)))
r = -EFAULT;
+ r = -EINVAL;
+ if (user_ns.flags)
+ goto out;
+
break;
}
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 0e8455b..cf2b011 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -515,7 +515,8 @@ struct kvm_irqfd {
struct kvm_clock_data {
__u64 clock;
- __u64 pad[2];
+ __u32 flags;
+ __u32 pad[9];
};
/*
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html