diff options
Diffstat (limited to 'virt')
| -rw-r--r-- | virt/kvm/Kconfig | 4 | ||||
| -rw-r--r-- | virt/kvm/kvm_main.c | 12 |
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 | ||
| 44 | config KVM_GENERIC_DIRTYLOG_READ_PROTECT | 44 | config KVM_GENERIC_DIRTYLOG_READ_PROTECT |
| 45 | bool | 45 | bool |
| 46 | |||
| 47 | config 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 | ||
| 93 | static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl, | 93 | static 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 |
| 96 | static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl, | 96 | static 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) | |||
| 2052 | static struct file_operations kvm_vcpu_fops = { | 2052 | static 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 |
| 2346 | static long kvm_vcpu_compat_ioctl(struct file *filp, | 2346 | static 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 | ||
| 2435 | static const struct file_operations kvm_device_fops = { | 2435 | static 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 |
| 2725 | struct compat_kvm_dirty_log { | 2725 | struct compat_kvm_dirty_log { |
| 2726 | __u32 slot; | 2726 | __u32 slot; |
| 2727 | __u32 padding1; | 2727 | __u32 padding1; |
| @@ -2768,7 +2768,7 @@ out: | |||
| 2768 | static struct file_operations kvm_vm_fops = { | 2768 | static 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, |
