Displaying 20 results from an estimated 20 matches for "iminor".
Did you mean:
minor
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ange, is the intention to create a single global char
dev?
If so, why is there this:
+static int vhost_vdpa_open(struct inode *inode, struct file *filep)
+{
+ struct vhost_vdpa *v;
+ struct vhost_dev *dev;
+ struct vhost_virtqueue **vqs;
+ int nvqs, i, r, opened;
+
+ v = vhost_vdpa_get_from_minor(iminor(inode));
?
If the idea is to create a per-vdpa char dev then this stuff belongs
in vhost_vdpa_probe(), the cdev should be part of the vhost_vdpa, and
the above should be container_of not an idr lookup.
Jason
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...ange, is the intention to create a single global char
dev?
If so, why is there this:
+static int vhost_vdpa_open(struct inode *inode, struct file *filep)
+{
+ struct vhost_vdpa *v;
+ struct vhost_dev *dev;
+ struct vhost_virtqueue **vqs;
+ int nvqs, i, r, opened;
+
+ v = vhost_vdpa_get_from_minor(iminor(inode));
?
If the idea is to create a per-vdpa char dev then this stuff belongs
in vhost_vdpa_probe(), the cdev should be part of the vhost_vdpa, and
the above should be container_of not an idr lookup.
Jason
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...ei
>
> If so, why is there this:
>
> +static int vhost_vdpa_open(struct inode *inode, struct file *filep)
> +{
> + struct vhost_vdpa *v;
> + struct vhost_dev *dev;
> + struct vhost_virtqueue **vqs;
> + int nvqs, i, r, opened;
> +
> + v = vhost_vdpa_get_from_minor(iminor(inode));
>
> ?
>
> If the idea is to create a per-vdpa char dev then this stuff belongs
> in vhost_vdpa_probe(), the cdev should be part of the vhost_vdpa, and
> the above should be container_of not an idr lookup.
>
> Jason
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...)
return ret;
}
-#ifdef CONFIG_COMPAT
-static long pp_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static int pp_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
@@ -790,9 +782,7 @@ static const struct file_operations pp_fops = {
.write = pp_write,
.poll = pp_poll,
.unlocked_ioctl = pp_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = pp_compat_ioctl,
-#endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = pp_open,
.release = pp_release,...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...)
return ret;
}
-#ifdef CONFIG_COMPAT
-static long pp_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static int pp_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
@@ -790,9 +782,7 @@ static const struct file_operations pp_fops = {
.write = pp_write,
.poll = pp_poll,
.unlocked_ioctl = pp_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = pp_compat_ioctl,
-#endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = pp_open,
.release = pp_release,...
2020 Feb 05
0
[PATCH] vhost: introduce vDPA based backend
...> +
> > +static int vhost_vdpa_open(struct inode *inode, struct file *filep)
> > +{
> > + struct vhost_vdpa *v;
> > + struct vhost_dev *dev;
> > + struct vhost_virtqueue **vqs;
> > + int nvqs, i, r, opened;
> > +
> > + v = vhost_vdpa_get_from_minor(iminor(inode));
> > + if (!v)
> > + return -ENODEV;
> > +
> > + opened = atomic_cmpxchg(&v->opened, 0, 1);
> > + if (opened) {
> > + r = -EBUSY;
> > + goto err;
> > + }
> > +
> > + nvqs = v->nvqs;
> > + vhost_vdpa_reset(v);
>...
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...tatic long pp_compat_ioctl(struct file *file, unsigned int cmd,
> - unsigned long arg)
> -{
> - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
> -}
> -#endif
> -
> static int pp_open(struct inode *inode, struct file *file)
> {
> unsigned int minor = iminor(inode);
> @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = {
> .write = pp_write,
> .poll = pp_poll,
> .unlocked_ioctl = pp_ioctl,
> -#ifdef CONFIG_COMPAT
> - .compat_ioctl = pp_compat_ioctl,
> -#endif
> + .compat_ioctl = compat_ptr_ioctl,
>...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...)
return ret;
}
-#ifdef CONFIG_COMPAT
-static long pp_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static int pp_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
@@ -790,9 +782,7 @@ static const struct file_operations pp_fops = {
.write = pp_write,
.poll = pp_poll,
.unlocked_ioctl = pp_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = pp_compat_ioctl,
-#endif
+ .compat_ioctl = generic_compat_ioctl_ptrarg,
.open = pp_open,
.release = pp...
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...)
return ret;
}
-#ifdef CONFIG_COMPAT
-static long pp_compat_ioctl(struct file *file, unsigned int cmd,
- unsigned long arg)
-{
- return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
-}
-#endif
-
static int pp_open(struct inode *inode, struct file *file)
{
unsigned int minor = iminor(inode);
@@ -786,9 +778,7 @@ static const struct file_operations pp_fops = {
.write = pp_write,
.poll = pp_poll,
.unlocked_ioctl = pp_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = pp_compat_ioctl,
-#endif
+ .compat_ioctl = compat_ptr_ioctl,
.open = pp_open,
.release = pp_release,...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...dev.
> + return -ENOTSUPP;
> +}
> +
> +static int vhost_vdpa_open(struct inode *inode, struct file *filep)
> +{
> + struct vhost_vdpa *v;
> + struct vhost_dev *dev;
> + struct vhost_virtqueue **vqs;
> + int nvqs, i, r, opened;
> +
> + v = vhost_vdpa_get_from_minor(iminor(inode));
> + if (!v)
> + return -ENODEV;
> +
> + opened = atomic_cmpxchg(&v->opened, 0, 1);
> + if (opened) {
> + r = -EBUSY;
> + goto err;
> + }
> +
> + nvqs = v->nvqs;
> + vhost_vdpa_reset(v);
> +
> + vqs = kmalloc_array(nvqs, sizeof(*vqs), GFP_...
2020 Feb 04
10
[PATCH] vhost: introduce vDPA based backend
...dev.
> + return -ENOTSUPP;
> +}
> +
> +static int vhost_vdpa_open(struct inode *inode, struct file *filep)
> +{
> + struct vhost_vdpa *v;
> + struct vhost_dev *dev;
> + struct vhost_virtqueue **vqs;
> + int nvqs, i, r, opened;
> +
> + v = vhost_vdpa_get_from_minor(iminor(inode));
> + if (!v)
> + return -ENODEV;
> +
> + opened = atomic_cmpxchg(&v->opened, 0, 1);
> + if (opened) {
> + r = -EBUSY;
> + goto err;
> + }
> +
> + nvqs = v->nvqs;
> + vhost_vdpa_reset(v);
> +
> + vqs = kmalloc_array(nvqs, sizeof(*vqs), GFP_...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...vtest->list);
+ spin_unlock(&viotest_list_lock);
+
+ kfree(vtest);
+
+}
+
+static int viotest_open(struct inode *inode, struct file *file)
+{
+ struct viotest_dev *vtest;
+ bool found=false;
+
+ spin_lock(&viotest_list_lock);
+
+ list_for_each_entry(vtest, &viotest_list, list)
+ if (iminor(inode) == MINOR(vtest->dev)){
+ found=true;
+ break;
+ }
+
+ BUG_ON(!found);
+
+ spin_unlock(&viotest_list_lock);
+
+ file->private_data = vtest;
+
+ return nonseekable_open(inode, file);
+}
+
+static int viotest_release(struct inode *inode, struct file *file)
+{
+ struct viotest_dev...
2009 Jun 19
2
[PATCH/RFC] virtio_test: A module for testing virtio via userspace
...vtest->list);
+ spin_unlock(&viotest_list_lock);
+
+ kfree(vtest);
+
+}
+
+static int viotest_open(struct inode *inode, struct file *file)
+{
+ struct viotest_dev *vtest;
+ bool found=false;
+
+ spin_lock(&viotest_list_lock);
+
+ list_for_each_entry(vtest, &viotest_list, list)
+ if (iminor(inode) == MINOR(vtest->dev)){
+ found=true;
+ break;
+ }
+
+ BUG_ON(!found);
+
+ spin_unlock(&viotest_list_lock);
+
+ file->private_data = vtest;
+
+ return nonseekable_open(inode, file);
+}
+
+static int viotest_release(struct inode *inode, struct file *file)
+{
+ struct viotest_dev...
2010 Jan 27
9
[Bridge] [PATCH 0/3 v3] macvtap driver
This is the third version of the macvtap device driver, following another major restructuring and a lot of bug fixes:
* Change macvtap to be based around a struct sock
* macvtap: fix initialization
* return 0 to netlink
* don't use rcu for q->file and q->vlan pointers
* macvtap: checkpatch.pl fixes
* macvtap: fix tun IFF flags
* Use a struct socket to make tx flow control work
* disable
2010 Jan 27
9
[Bridge] [PATCH 0/3 v3] macvtap driver
This is the third version of the macvtap device driver, following another major restructuring and a lot of bug fixes:
* Change macvtap to be based around a struct sock
* macvtap: fix initialization
* return 0 to netlink
* don't use rcu for q->file and q->vlan pointers
* macvtap: checkpatch.pl fixes
* macvtap: fix tun IFF flags
* Use a struct socket to make tx flow control work
* disable
2010 Jan 27
9
[Bridge] [PATCH 0/3 v3] macvtap driver
This is the third version of the macvtap device driver, following another major restructuring and a lot of bug fixes:
* Change macvtap to be based around a struct sock
* macvtap: fix initialization
* return 0 to netlink
* don't use rcu for q->file and q->vlan pointers
* macvtap: checkpatch.pl fixes
* macvtap: fix tun IFF flags
* Use a struct socket to make tx flow control work
* disable
2009 Dec 03
3
[RFC 0/2] macvtap, second try
I did not get this ready for the merge window, but people asked what
the status of this is so I'm posting it now to solicit feedback.
The first patch just adds some hooks into macvlan.c and is less
invasive than the previous version. That part should be fine
and I'd like this to get merged into macvlan for 2.6.33 if people
agree that the approach is right.
The second patch adds the
2009 Dec 03
3
[RFC 0/2] macvtap, second try
I did not get this ready for the merge window, but people asked what
the status of this is so I'm posting it now to solicit feedback.
The first patch just adds some hooks into macvlan.c and is less
invasive than the previous version. That part should be fine
and I'd like this to get merged into macvlan for 2.6.33 if people
agree that the approach is right.
The second patch adds the
2009 Dec 03
3
[RFC 0/2] macvtap, second try
I did not get this ready for the merge window, but people asked what
the status of this is so I'm posting it now to solicit feedback.
The first patch just adds some hooks into macvlan.c and is less
invasive than the previous version. That part should be fine
and I'd like this to get merged into macvlan for 2.6.33 if people
agree that the approach is right.
The second patch adds the
2019 Apr 04
1
Proof of concept for GPU forwarding for Linux guest on Linux host.
Hi,
This is a proof of concept of GPU forwarding for Linux guest on Linux host.
I'd like to get comments and suggestions from community before I put more
time on it. To summarize what it is:
1. It's a solution to bring GPU acceleration for Linux vm guest on Linux host.
It could works with different GPU although the current proof of concept only
works with Intel GPU.
2. The basic idea