Displaying 8 results from an estimated 8 matches for "3b68f9d".
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...M_TABLE:
+ * for use on legacy kernels without VHOST_GET_MEM_MAX_NREGIONS support. */
+#define VHOST_MEM_MAX_NREGIONS_DEFAULT 64
+
/* VHOST_NET specific defines */
/* Attach virtio net ring to a raw socket, or tap device.
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 9e8e004..3b68f9d 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
long r;
int i, fd;
+ if (ioctl == VHOST_GET_MEM_MAX_NREGIONS) {
+ r = VHOST_MEMORY_MAX_NREGIONS;
+ goto done;
+ }
+
/* If yo...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...M_TABLE:
+ * for use on legacy kernels without VHOST_GET_MEM_MAX_NREGIONS support. */
+#define VHOST_MEM_MAX_NREGIONS_DEFAULT 64
+
/* VHOST_NET specific defines */
/* Attach virtio net ring to a raw socket, or tap device.
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 9e8e004..3b68f9d 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
long r;
int i, fd;
+ if (ioctl == VHOST_GET_MEM_MAX_NREGIONS) {
+ r = VHOST_MEMORY_MAX_NREGIONS;
+ goto done;
+ }
+
/* If yo...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...old way.
OTOH if you won't think it's useful, let me know.
> > +
> > /* VHOST_NET specific defines */
> >
> > /* Attach virtio net ring to a raw socket, or tap device.
> > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > index 9e8e004..3b68f9d 100644
> > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > long r;
> > int i, fd;
> >
> > + if (ioctl == VHOST_GET_MEM_MAX_NREGIO...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...old way.
OTOH if you won't think it's useful, let me know.
> > +
> > /* VHOST_NET specific defines */
> >
> > /* Attach virtio net ring to a raw socket, or tap device.
> > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > index 9e8e004..3b68f9d 100644
> > --- a/drivers/vhost/vhost.c
> > +++ b/drivers/vhost/vhost.c
> > @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > long r;
> > int i, fd;
> >
> > + if (ioctl == VHOST_GET_MEM_MAX_NREGIO...
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...t; >
> > > > +
> > > > /* VHOST_NET specific defines */
> > > >
> > > > /* Attach virtio net ring to a raw socket, or tap device.
> > > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > > index 9e8e004..3b68f9d 100644
> > > > --- a/drivers/vhost/vhost.c
> > > > +++ b/drivers/vhost/vhost.c
> > > > @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > > > long r;
> > > > int i, fd;
> > &...
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...t; >
> > > > +
> > > > /* VHOST_NET specific defines */
> > > >
> > > > /* Attach virtio net ring to a raw socket, or tap device.
> > > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > > index 9e8e004..3b68f9d 100644
> > > > --- a/drivers/vhost/vhost.c
> > > > +++ b/drivers/vhost/vhost.c
> > > > @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > > > long r;
> > > > int i, fd;
> > &...
2015 Jun 24
0
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...AX_NREGIONS_DEFAULT 64
^^^ not used below,
if it's for legacy then perhaps s/DEFAULT/LEGACY/
> +
> /* VHOST_NET specific defines */
>
> /* Attach virtio net ring to a raw socket, or tap device.
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 9e8e004..3b68f9d 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> long r;
> int i, fd;
>
> + if (ioctl == VHOST_GET_MEM_MAX_NREGIONS) {
> + r = VHOST_MEMORY_MAX_...
2015 Jun 24
0
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...is enough to try fix userspace.
>
> > > +
> > > /* VHOST_NET specific defines */
> > >
> > > /* Attach virtio net ring to a raw socket, or tap device.
> > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> > > index 9e8e004..3b68f9d 100644
> > > --- a/drivers/vhost/vhost.c
> > > +++ b/drivers/vhost/vhost.c
> > > @@ -917,6 +917,11 @@ long vhost_dev_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *argp)
> > > long r;
> > > int i, fd;
> > >
> > > + if...