* [PATCH/RFC] KVM: Disable compat ioctl for s390
@ 2015-02-04 11:27 Christian Borntraeger
2015-02-04 12:53 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2015-02-04 11:27 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: KVM, Christian Borntraeger
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>
---
virt/kvm/Kconfig | 4 ++++
virt/kvm/kvm_main.c | 12 ++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index fc0c5e6..e84d87c 100644
--- a/virt/kvm/Kconfig
+++ b/virt/kvm/Kconfig
@@ -37,3 +37,7 @@ config HAVE_KVM_CPU_RELAX_INTERCEPT
config KVM_VFIO
bool
+
+config KVM_COMPAT
+ def_bool y
+ depends on COMPAT && !S390
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 67252e4..5894bf9 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -89,7 +89,7 @@ struct dentry *kvm_debugfs_dir;
static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
unsigned long arg);
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl,
unsigned long arg);
#endif
@@ -1944,7 +1944,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
static struct file_operations kvm_vcpu_fops = {
.release = kvm_vcpu_release,
.unlocked_ioctl = kvm_vcpu_ioctl,
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
.compat_ioctl = kvm_vcpu_compat_ioctl,
#endif
.mmap = kvm_vcpu_mmap,
@@ -2225,7 +2225,7 @@ out:
return r;
}
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
static long kvm_vcpu_compat_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
@@ -2317,7 +2317,7 @@ static int kvm_device_release(struct inode *inode, struct file *filp)
static const struct file_operations kvm_device_fops = {
.unlocked_ioctl = kvm_device_ioctl,
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
.compat_ioctl = kvm_device_ioctl,
#endif
.release = kvm_device_release,
@@ -2606,7 +2606,7 @@ out:
return r;
}
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
struct compat_kvm_dirty_log {
__u32 slot;
__u32 padding1;
@@ -2653,7 +2653,7 @@ out:
static struct file_operations kvm_vm_fops = {
.release = kvm_vm_release,
.unlocked_ioctl = kvm_vm_ioctl,
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_KVM_COMPAT
.compat_ioctl = kvm_vm_compat_ioctl,
#endif
.llseek = noop_llseek,
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH/RFC] KVM: Disable compat ioctl for s390
2015-02-04 11:27 [PATCH/RFC] KVM: Disable compat ioctl for s390 Christian Borntraeger
@ 2015-02-04 12:53 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-02-04 12:53 UTC (permalink / raw)
To: Christian Borntraeger; +Cc: KVM
On 04/02/2015 12:27, Christian Borntraeger wrote:
> 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>
> ---
> virt/kvm/Kconfig | 4 ++++
> virt/kvm/kvm_main.c | 12 ++++++------
> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
> index fc0c5e6..e84d87c 100644
> --- a/virt/kvm/Kconfig
> +++ b/virt/kvm/Kconfig
> @@ -37,3 +37,7 @@ config HAVE_KVM_CPU_RELAX_INTERCEPT
>
> config KVM_VFIO
> bool
> +
> +config KVM_COMPAT
> + def_bool y
> + depends on COMPAT && !S390
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 67252e4..5894bf9 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -89,7 +89,7 @@ struct dentry *kvm_debugfs_dir;
>
> static long kvm_vcpu_ioctl(struct file *file, unsigned int ioctl,
> unsigned long arg);
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> static long kvm_vcpu_compat_ioctl(struct file *file, unsigned int ioctl,
> unsigned long arg);
> #endif
> @@ -1944,7 +1944,7 @@ static int kvm_vcpu_release(struct inode *inode, struct file *filp)
> static struct file_operations kvm_vcpu_fops = {
> .release = kvm_vcpu_release,
> .unlocked_ioctl = kvm_vcpu_ioctl,
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> .compat_ioctl = kvm_vcpu_compat_ioctl,
> #endif
> .mmap = kvm_vcpu_mmap,
> @@ -2225,7 +2225,7 @@ out:
> return r;
> }
>
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> static long kvm_vcpu_compat_ioctl(struct file *filp,
> unsigned int ioctl, unsigned long arg)
> {
> @@ -2317,7 +2317,7 @@ static int kvm_device_release(struct inode *inode, struct file *filp)
>
> static const struct file_operations kvm_device_fops = {
> .unlocked_ioctl = kvm_device_ioctl,
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> .compat_ioctl = kvm_device_ioctl,
> #endif
> .release = kvm_device_release,
> @@ -2606,7 +2606,7 @@ out:
> return r;
> }
>
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> struct compat_kvm_dirty_log {
> __u32 slot;
> __u32 padding1;
> @@ -2653,7 +2653,7 @@ out:
> static struct file_operations kvm_vm_fops = {
> .release = kvm_vm_release,
> .unlocked_ioctl = kvm_vm_ioctl,
> -#ifdef CONFIG_COMPAT
> +#ifdef CONFIG_KVM_COMPAT
> .compat_ioctl = kvm_vm_compat_ioctl,
> #endif
> .llseek = noop_llseek,
>
Looks good.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-04 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 11:27 [PATCH/RFC] KVM: Disable compat ioctl for s390 Christian Borntraeger
2015-02-04 12:53 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).