Commit dc32bb67 authored by Sonny Rao's avatar Sonny Rao Committed by Michael S. Tsirkin

vhost: add vsock compat ioctl

This will allow usage of vsock from 32-bit binaries on a 64-bit
Signed-off-by: default avatarSonny Rao <>
Reviewed-by: default avatarStefan Hajnoczi <>
Signed-off-by: default avatarMichael S. Tsirkin <>
parent 26b36604
......@@ -699,12 +699,23 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,
static long vhost_vsock_dev_compat_ioctl(struct file *f, unsigned int ioctl,
unsigned long arg)
return vhost_vsock_dev_ioctl(f, ioctl, (unsigned long)compat_ptr(arg));
static const struct file_operations vhost_vsock_fops = {
.owner = THIS_MODULE,
.open = vhost_vsock_dev_open,
.release = vhost_vsock_dev_release,
.llseek = noop_llseek,
.unlocked_ioctl = vhost_vsock_dev_ioctl,
.compat_ioctl = vhost_vsock_dev_compat_ioctl,
static struct miscdevice vhost_vsock_misc = {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment