search for: vhost_set_vring_err

Displaying 20 results from an estimated 74 matches for "vhost_set_vring_err".

2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...p/modify memory layout */ +/* Set up/modify memory layout: see also VHOST_GET_MEM_MAX_NREGIONS below. */ #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) /* Write logging setup. */ @@ -127,6 +127,21 @@ struct vhost_memory { /* Set eventfd to signal an error */ #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. + * Returns: + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail + * 0 - there's no static limit: try and see if it works + * -1 - on failure +...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...p/modify memory layout */ +/* Set up/modify memory layout: see also VHOST_GET_MEM_MAX_NREGIONS below. */ #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) /* Write logging setup. */ @@ -127,6 +127,21 @@ struct vhost_memory { /* Set eventfd to signal an error */ #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. + * Returns: + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail + * 0 - there's no static limit: try and see if it works + * -1 - on failure +...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...ee also VHOST_GET_MEM_MAX_NREGIONS below. */ > > #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > > > /* Write logging setup. */ > > @@ -127,6 +127,21 @@ struct vhost_memory { > > /* Set eventfd to signal an error */ > > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > > + * Returns: > > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail > > + * 0 - there's no static limi...
2015 Jun 24
2
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...ee also VHOST_GET_MEM_MAX_NREGIONS below. */ > > #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > > > /* Write logging setup. */ > > @@ -127,6 +127,21 @@ struct vhost_memory { > > /* Set eventfd to signal an error */ > > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > > + * Returns: > > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail > > + * 0 - there's no static limi...
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...> #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > > > > > > > /* Write logging setup. */ > > > > @@ -127,6 +127,21 @@ struct vhost_memory { > > > > /* Set eventfd to signal an error */ > > > > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > > > > > > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > > > > + * Returns: > > > > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail >...
2015 Jun 24
1
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...> #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > > > > > > > /* Write logging setup. */ > > > > @@ -127,6 +127,21 @@ struct vhost_memory { > > > > /* Set eventfd to signal an error */ > > > > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > > > > > > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > > > > + * Returns: > > > > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail >...
2020 Aug 04
3
[PATCH V5 1/6] vhost: introduce vhost_vring_call
...;>> -??????? swap(ctx, vq->call_ctx); >>> + >>> +??????? spin_lock(&vq->call_ctx.ctx_lock); >>> +??????? swap(ctx, vq->call_ctx.ctx); >>> +??????? spin_unlock(&vq->call_ctx.ctx_lock); >>> ????????? break; >>> ????? case VHOST_SET_VRING_ERR: >>> ????????? if (copy_from_user(&f, argp, sizeof f)) { >>> @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev >>> *dev, struct vhost_virtqueue *vq) >>> ? void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) >>> ? { &gt...
2020 Aug 04
3
[PATCH V5 1/6] vhost: introduce vhost_vring_call
...;>> -??????? swap(ctx, vq->call_ctx); >>> + >>> +??????? spin_lock(&vq->call_ctx.ctx_lock); >>> +??????? swap(ctx, vq->call_ctx.ctx); >>> +??????? spin_unlock(&vq->call_ctx.ctx_lock); >>> ????????? break; >>> ????? case VHOST_SET_VRING_ERR: >>> ????????? if (copy_from_user(&f, argp, sizeof f)) { >>> @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev >>> *dev, struct vhost_virtqueue *vq) >>> ? void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) >>> ? { &gt...
2018 Feb 08
0
[PULL] virtio, vhost: fixes, cleanups, features
...;mst at redhat.com> ---------------------------------------------------------------- Arvind Yadav (1): virtio: virtio_mmio: make of_device_ids const. Eric Biggers (3): vhost: don't hold onto file pointer for VHOST_SET_VRING_CALL vhost: don't hold onto file pointer for VHOST_SET_VRING_ERR vhost: don't hold onto file pointer for VHOST_SET_LOG_FD Markus Elfring (1): vhost/scsi: Improve a size determination in four functions Michael S. Tsirkin (2): virtio/ringtest: fix up need_event math virtio/ringtest: virtio_ring: fix up need_event math Peter Malone (1...
2020 Sep 09
0
[PATCH] vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call
...+1636,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, unsigned int ioctl, void __user *arg > break; > } > > - spin_lock(&vq->call_ctx.ctx_lock); > swap(ctx, vq->call_ctx.ctx); > - spin_unlock(&vq->call_ctx.ctx_lock); > break; > case VHOST_SET_VRING_ERR: > if (copy_from_user(&f, argp, sizeof f)) { > diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h > index 9032d3c2a9f4..486dcf371e06 100644 > --- a/drivers/vhost/vhost.h > +++ b/drivers/vhost/vhost.h > @@ -64,7 +64,6 @@ enum vhost_uaddr_type { > struct vhost_v...
2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...if (r < 0) > + return r; > + hit = true; > + } > + } > + > + /* No reverse mapping, should be a bug */ > + WARN_ON(!hit); Maybe it should but userspace can trigger this easily I think. We need to stop the device not warn in kernel log. Also there's an error fd: VHOST_SET_VRING_ERR, need to wake it up. > + return 0; > +} > + > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > +{ > + struct iovec iov[64]; > + int i, ret; > + > + if (!vq->iotlb) { > + log_write(vq->log_base, vq->log_addr + used_offset, len);...
2018 Dec 12
2
[PATCH net V2 4/4] vhost: log dirty page correctly
...if (r < 0) > + return r; > + hit = true; > + } > + } > + > + /* No reverse mapping, should be a bug */ > + WARN_ON(!hit); Maybe it should but userspace can trigger this easily I think. We need to stop the device not warn in kernel log. Also there's an error fd: VHOST_SET_VRING_ERR, need to wake it up. > + return 0; > +} > + > +static void log_used(struct vhost_virtqueue *vq, u64 used_offset, u64 len) > +{ > + struct iovec iov[64]; > + int i, ret; > + > + if (!vq->iotlb) { > + log_write(vq->log_base, vq->log_addr + used_offset, len);...
2015 Jun 24
0
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...Set up/modify memory layout: see also VHOST_GET_MEM_MAX_NREGIONS below. */ > #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > /* Write logging setup. */ > @@ -127,6 +127,21 @@ struct vhost_memory { > /* Set eventfd to signal an error */ > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > + * Returns: > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail > + * 0 - there's no static limit: try and see if it work...
2020 Aug 04
0
[PATCH V5 1/6] vhost: introduce vhost_vring_call
...d int ioctl, void __user *arg > r = PTR_ERR(ctx); > break; > } > - swap(ctx, vq->call_ctx); > + > + spin_lock(&vq->call_ctx.ctx_lock); > + swap(ctx, vq->call_ctx.ctx); > + spin_unlock(&vq->call_ctx.ctx_lock); > break; > case VHOST_SET_VRING_ERR: > if (copy_from_user(&f, argp, sizeof f)) { > @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > { > /* Signal the Guest tell them we used something...
2020 Jul 17
0
[PATCH V2 1/6] vhost: introduce vhost_call_ctx
...d int ioctl, void __user *arg > r = PTR_ERR(ctx); > break; > } > - swap(ctx, vq->call_ctx); > + > + spin_lock(&vq->call_ctx.ctx_lock); > + swap(ctx, vq->call_ctx.ctx); > + spin_unlock(&vq->call_ctx.ctx_lock); > break; > case VHOST_SET_VRING_ERR: > if (copy_from_user(&f, argp, sizeof f)) { > @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > { > /* Signal the Guest tell them we used something...
2020 Jul 22
0
[PATCH V3 1/6] vhost: introduce vhost_vring_call
...d int ioctl, void __user *arg > r = PTR_ERR(ctx); > break; > } > - swap(ctx, vq->call_ctx); > + > + spin_lock(&vq->call_ctx.ctx_lock); > + swap(ctx, vq->call_ctx.ctx); > + spin_unlock(&vq->call_ctx.ctx_lock); > break; > case VHOST_SET_VRING_ERR: > if (copy_from_user(&f, argp, sizeof f)) { > @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueue *vq) > { > /* Signal the Guest tell them we used something...
2015 Jun 24
0
[PATCH RFC] vhost: add ioctl to query nregions upper limit
...IONS below. */ > > > #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) > > > > > > /* Write logging setup. */ > > > @@ -127,6 +127,21 @@ struct vhost_memory { > > > /* Set eventfd to signal an error */ > > > #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > > > > > > +/* Query upper limit on nregions in VHOST_SET_MEM_TABLE arguments. > > > + * Returns: > > > + * 0 < value <= MAX_INT - gives the upper limit, higher values will fail > > > + * 0 - t...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...dr; > >> +}; > >> + > >> struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { > >> /* Set eventfd to signal an error */ > >> #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > >> > >> +/* IOTLB */ > >> +/* Specify an eventfd file descriptor to signle on IOTLB miss */ > > typo > > Will fix it. > > > > >> +#define VHOST_SET_VRING_IOTLB_CALL _IOW(VHOST_VIRTIO, 0x...
2016 Apr 28
2
[RFC PATCH V2 2/2] vhost: device IOTLB API
...dr; > >> +}; > >> + > >> struct vhost_memory_region { > >> __u64 guest_phys_addr; > >> __u64 memory_size; /* bytes */ > >> @@ -127,6 +153,15 @@ struct vhost_memory { > >> /* Set eventfd to signal an error */ > >> #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) > >> > >> +/* IOTLB */ > >> +/* Specify an eventfd file descriptor to signle on IOTLB miss */ > > typo > > Will fix it. > > > > >> +#define VHOST_SET_VRING_IOTLB_CALL _IOW(VHOST_VIRTIO, 0x...
2020 Aug 04
0
[PATCH V5 1/6] vhost: introduce vhost_vring_call
...tx); > > > > + > > > > +??????? spin_lock(&vq->call_ctx.ctx_lock); > > > > +??????? swap(ctx, vq->call_ctx.ctx); > > > > +??????? spin_unlock(&vq->call_ctx.ctx_lock); > > > > ????????? break; > > > > ????? case VHOST_SET_VRING_ERR: > > > > ????????? if (copy_from_user(&f, argp, sizeof f)) { > > > > @@ -2440,8 +2450,8 @@ static bool vhost_notify(struct vhost_dev > > > > *dev, struct vhost_virtqueue *vq) > > > > ? void vhost_signal(struct vhost_dev *dev, struct vhost_virtqueu...