aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2015-02-03 03:35:15 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-02-09 06:44:14 -0500
commitde8e5d744051568c8aad35c1c2dcf8fd137d10c9 (patch)
tree33413aecd118bb8342e95ad3297a06ce322c07a0 /virt/kvm
parent658b6eda2042c0fe0e3f8acd7ffd11fc6f280119 (diff)
KVM: Disable compat ioctl for s390
We never had a 31bit QEMU/kuli running. We would need to review several ioctls to check if this creates holes, bugs or whatever to make it work. Lets just disable compat support for KVM on s390. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/Kconfig4
-rw-r--r--virt/kvm/kvm_main.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index 50d110654b42..e2c876d5a03b 100644
--- a/virt/kvm/Kconfig
+++ b/virt/kvm/Kconfig
@@ -43,3 +43,7 @@ config HAVE_KVM_ARCH_TLB_FLUSH_ALL
43 43
44config KVM_GENERIC_DIRTYLOG_READ_PROTECT 44config KVM_GENERIC_DIRTYLOG_READ_PROTECT
45 bool 45 bool
46
47config KVM_COMPAT
48 def_bool y
49 depends on COMPAT && !S390
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 32449e0e9aa8..8579f1876e5a 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -92,7 +92,7 @@ struct dentry *kvm_debugfs_dir;
92 92
93static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl, 93static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
94 unsigned long arg); 94 unsigned long arg);
95#ifdef CONFIG_COMPAT 95#ifdef CONFIG_KVM_COMPAT
96static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl, 96static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl,
97 unsigned long arg); 97 unsigned long arg);
98#endif 98#endif
@@ -2052,7 +2052,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
2052static struct file_operations kvm_vcpu_fops = { 2052static struct file_operations kvm_vcpu_fops = {
2053 .release = kvm_vcpu_release, 2053 .release = kvm_vcpu_release,
2054 .unlocked_ioctl = kvm_vcpu_ioctl, 2054 .unlocked_ioctl = kvm_vcpu_ioctl,
2055#ifdef CONFIG_COMPAT 2055#ifdef CONFIG_KVM_COMPAT
2056 .compat_ioctl = kvm_vcpu_compat_ioctl, 2056 .compat_ioctl = kvm_vcpu_compat_ioctl,
2057#endif 2057#endif
2058 .mmap = kvm_vcpu_mmap, 2058 .mmap = kvm_vcpu_mmap,
@@ -2342,7 +2342,7 @@ out:
2342 return r; 2342 return r;
2343} 2343}
2344 2344
2345#ifdef CONFIG_COMPAT 2345#ifdef CONFIG_KVM_COMPAT
2346static long kvm_vcpu_compat_ioctl(struct file *filp, 2346static long kvm_vcpu_compat_ioctl(struct file *filp,
2347 unsigned int ioctl, unsigned long arg) 2347 unsigned int ioctl, unsigned long arg)
2348{ 2348{
@@ -2434,7 +2434,7 @@ static int kvm_device_release(struct inode *inode, struct file *filp)
2434 2434
2435static const struct file_operations kvm_device_fops = { 2435static const struct file_operations kvm_device_fops = {
2436 .unlocked_ioctl = kvm_device_ioctl, 2436 .unlocked_ioctl = kvm_device_ioctl,
2437#ifdef CONFIG_COMPAT 2437#ifdef CONFIG_KVM_COMPAT
2438 .compat_ioctl = kvm_device_ioctl, 2438 .compat_ioctl = kvm_device_ioctl,
2439#endif 2439#endif
2440 .release = kvm_device_release, 2440 .release = kvm_device_release,
@@ -2721,7 +2721,7 @@ out:
2721 return r; 2721 return r;
2722} 2722}
2723 2723
2724#ifdef CONFIG_COMPAT 2724#ifdef CONFIG_KVM_COMPAT
2725struct compat_kvm_dirty_log { 2725struct compat_kvm_dirty_log {
2726 __u32 slot; 2726 __u32 slot;
2727 __u32 padding1; 2727 __u32 padding1;
@@ -2768,7 +2768,7 @@ out:
2768static struct file_operations kvm_vm_fops = { 2768static struct file_operations kvm_vm_fops = {
2769 .release = kvm_vm_release, 2769 .release = kvm_vm_release,
2770 .unlocked_ioctl = kvm_vm_ioctl, 2770 .unlocked_ioctl = kvm_vm_ioctl,
2771#ifdef CONFIG_COMPAT 2771#ifdef CONFIG_KVM_COMPAT
2772 .compat_ioctl = kvm_vm_compat_ioctl, 2772 .compat_ioctl = kvm_vm_compat_ioctl,
2773#endif 2773#endif
2774 .llseek = noop_llseek, 2774 .llseek = noop_llseek,