Displaying 20 results from an estimated 21 matches for "vhost_vdpa_backend_featur".
Did you mean:
vhost_vdpa_backend_features
2020 Sep 07
0
[PATCH] vhost-vdpa: fix backend feature ioctls
...ct vhost_vring_state s;
- u64 __user *featurep = argp;
- u64 features;
u32 idx;
long r;
@@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
vq->last_avail_idx = vq_state.avail_index;
break;
- case VHOST_GET_BACKEND_FEATURES:
- features = VHOST_VDPA_BACKEND_FEATURES;
- if (copy_to_user(featurep, &features, sizeof(features)))
- return -EFAULT;
- return 0;
- case VHOST_SET_BACKEND_FEATURES:
- if (copy_from_user(&features, featurep, sizeof(features)))
- return -EFAULT;
- if (features & ~VHOST_VDPA_BACKEND_FEATURES)
- return -EOPNOTSUPP;
-...
2020 Sep 24
0
[RFC PATCH 01/24] vhost-vdpa: fix backend feature ioctls
...ct vhost_vring_state s;
- u64 __user *featurep = argp;
- u64 features;
u32 idx;
long r;
@@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
vq->last_avail_idx = vq_state.avail_index;
break;
- case VHOST_GET_BACKEND_FEATURES:
- features = VHOST_VDPA_BACKEND_FEATURES;
- if (copy_to_user(featurep, &features, sizeof(features)))
- return -EFAULT;
- return 0;
- case VHOST_SET_BACKEND_FEATURES:
- if (copy_from_user(&features, featurep, sizeof(features)))
- return -EFAULT;
- if (features & ~VHOST_VDPA_BACKEND_FEATURES)
- return -EOPNOTSUPP;
-...
2020 Sep 24
1
[RFC PATCH 01/24] vhost-vdpa: fix backend feature ioctls
...rgp;
> - u64 features;
> u32 idx;
> long r;
>
> @@ -381,18 +379,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
>
> vq->last_avail_idx = vq_state.avail_index;
> break;
> - case VHOST_GET_BACKEND_FEATURES:
> - features = VHOST_VDPA_BACKEND_FEATURES;
> - if (copy_to_user(featurep, &features, sizeof(features)))
> - return -EFAULT;
> - return 0;
> - case VHOST_SET_BACKEND_FEATURES:
> - if (copy_from_user(&features, featurep, sizeof(features)))
> - return -EFAULT;
> - if (features & ~VHOST_VDPA_BACKEND_F...
2020 Sep 09
0
[PATCH] vhost: new vhost_vdpa SET/GET_BACKEND_FEATURES handlers
...rivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -344,6 +344,33 @@ static long vhost_vdpa_set_config_call(struct vhost_vdpa
> *v, u32 __user *argp)
> return 0;
> }
>
> +
> +static long vhost_vdpa_get_backend_features(void __user *argp)
> +{
> + u64 features = VHOST_VDPA_BACKEND_FEATURES;
> + u64 __user *featurep = argp;
> + long r;
> +
> + r = copy_to_user(featurep, &features, sizeof(features));
> +
> + return r;
> +}
> +static long vhost_vdpa_set_backend_features(struct vhost_vdpa *v, void
> __user *argp)
> +{
> + u64 __user *featurep = argp...
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all:
This series tries to support batched IOTLB updating vhost-vdpa.
Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it
can only forward one mapping to IOMMU or device through IOMMU API or
dma_map(). Though set_map() is deisgend to have the capability to pass
an rbtree based mapping to vDPA device, it's still be called at least
once for each VHOST_IOTLB_UPDATE or
2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...> 3 files changed, 32 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 453057421f80..8f624bbafee7 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -56,7 +56,9 @@ enum {
> };
>
> enum {
> - VHOST_VDPA_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
> + VHOST_VDPA_BACKEND_FEATURES =
> + (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2) |
> + (1ULL << VHOST_BACKEND_F_IOTLB_BATCH),
> };
>
> /* Currently, only network backend w/o multiqueue is supported. */
> @@ -77,6 +79,...
2020 Jun 28
2
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...> 3 files changed, 32 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 453057421f80..8f624bbafee7 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -56,7 +56,9 @@ enum {
> };
>
> enum {
> - VHOST_VDPA_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
> + VHOST_VDPA_BACKEND_FEATURES =
> + (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2) |
> + (1ULL << VHOST_BACKEND_F_IOTLB_BATCH),
> };
>
> /* Currently, only network backend w/o multiqueue is supported. */
> @@ -77,6 +79,...
2020 Jul 01
5
[PATCH 0/5]
Hi all:
This series tries to support batched IOTLB updating vhost-vdpa.
Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it
can only forward one mapping to IOMMU or device through IOMMU API or
dma_map(). Though set_map() is designed to have the capability to pass
an rbtree based mapping to vDPA device, it's still be called at least
once for each VHOST_IOTLB_UPDATE or
2020 Jun 29
1
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...t; diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> > > index 453057421f80..8f624bbafee7 100644
> > > --- a/drivers/vhost/vdpa.c
> > > +++ b/drivers/vhost/vdpa.c
> > > @@ -56,7 +56,9 @@ enum {
> > > };
> > > enum {
> > > - VHOST_VDPA_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
> > > + VHOST_VDPA_BACKEND_FEATURES =
> > > + (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2) |
> > > + (1ULL << VHOST_BACKEND_F_IOTLB_BATCH),
> > > };
> > > /* Currently, only network backend w/o m...
2020 Jun 18
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...| 2 ++
include/uapi/linux/vhost_types.h | 7 +++++++
3 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 453057421f80..8f624bbafee7 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -56,7 +56,9 @@ enum {
};
enum {
- VHOST_VDPA_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
+ VHOST_VDPA_BACKEND_FEATURES =
+ (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2) |
+ (1ULL << VHOST_BACKEND_F_IOTLB_BATCH),
};
/* Currently, only network backend w/o multiqueue is supported. */
@@ -77,6 +79,7 @@ struct vhost_vdpa {
int virt...
2020 Jun 29
0
[PATCH RFC 4/5] vhost-vdpa: support IOTLB batching hints
...7 deletions(-)
>>
>> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
>> index 453057421f80..8f624bbafee7 100644
>> --- a/drivers/vhost/vdpa.c
>> +++ b/drivers/vhost/vdpa.c
>> @@ -56,7 +56,9 @@ enum {
>> };
>>
>> enum {
>> - VHOST_VDPA_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
>> + VHOST_VDPA_BACKEND_FEATURES =
>> + (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2) |
>> + (1ULL << VHOST_BACKEND_F_IOTLB_BATCH),
>> };
>>
>> /* Currently, only network backend w/o multiqueue is suppo...
2020 Sep 09
0
[PATCH] vhost: new vhost_vdpa SET/GET_BACKEND_FEATURES handlers
...it checkout f2da8fc35b4ef003de7d559a8c7730fedf9926f8
vim +356 drivers/vhost/vdpa.c
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 348 static long vhost_vdpa_get_backend_features(void __user *argp)
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 349 {
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 350 u64 features = VHOST_VDPA_BACKEND_FEATURES;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 351 u64 __user *featurep = argp;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 352 long r;
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 353
f2da8fc35b4ef0 Zhu Lingshan 2020-09-09 354 r = copy_to_user(featurep, &features, sizeof(features));
f2da8fc35b4ef0...
2023 Jul 03
0
[PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it
...g r = 0;
>
> if (cmd == VHOST_SET_BACKEND_FEATURES) {
> if (copy_from_user(&features, featurep, sizeof(features)))
> return -EFAULT;
> + if (ops->get_backend_features)
> + parent_features = ops->get_backend_features(v->vdpa);
> if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
> BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
> BIT_ULL(VHOST_BACKEND_F_RESUME) |
> - BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK)))
> + parent_features))
> return -EOPNOTSUPP;
> if ((features & BIT_ULL(VHOST_BACKEND_F_SUSPEND)) &&
>...
2023 Sep 09
0
[PATCH RFC v2 2/3] vhost-vdpa: introduce descriptor group backend feature
...vhost_vdpa_get_features(struct vhost_vdpa *v, u64 __user *featurep)
{
struct vdpa_device *vdpa = v->vdpa;
@@ -679,6 +687,7 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
if (copy_from_user(&features, featurep, sizeof(features)))
return -EFAULT;
if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
+ BIT_ULL(VHOST_BACKEND_F_DESC_ASID) |
BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
BIT_ULL(VHOST_BACKEND_F_RESUME)))
return -EOPNOTSUPP;
@@ -688,6 +697,12 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
if ((features & BIT_ULL(VHOST_BACKEND_F_RESUME)) &&...
2023 Jul 04
1
[PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it
...atures, featurep, sizeof(features)))
> > > return -EFAULT;
> > > + if (ops->get_backend_features)
> > > + parent_features = ops->get_backend_features(v->vdpa);
> > > if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
> > > BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
> > > BIT_ULL(VHOST_BACKEND_F_RESUME) |
> > > - BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK)))
> > > +...
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All:
This series tries to add the support for control virtqueue in vDPA.
Control virtqueue is used by networking device for accepting various
commands from the driver. It's a must to support multiqueue and other
configurations.
When used by vhost-vDPA bus driver for VM, the control virtqueue
should be shadowed via userspace VMM (Qemu) instead of being assigned
directly to Guest. This is
2020 Sep 24
30
[RFC PATCH 00/24] Control VQ support in vDPA
Hi All:
This series tries to add the support for control virtqueue in vDPA.
Control virtqueue is used by networking device for accepting various
commands from the driver. It's a must to support multiqueue and other
configurations.
When used by vhost-vDPA bus driver for VM, the control virtqueue
should be shadowed via userspace VMM (Qemu) instead of being assigned
directly to Guest. This is
2023 Jul 04
1
[PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it
...; > > > > return -EFAULT;
> > > > > + if (ops->get_backend_features)
> > > > > + parent_features = ops->get_backend_features(v->vdpa);
> > > > > if (features & ~(VHOST_VDPA_BACKEND_FEATURES |
> > > > > BIT_ULL(VHOST_BACKEND_F_SUSPEND) |
> > > > > BIT_ULL(VHOST_BACKEND_F_RESUME) |
> > > > > - BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK)))
> >...
2023 Sep 09
4
[PATCH RFC v2 0/3] vdpa: dedicated descriptor table group
Following patchset introduces dedicated group for descriptor table to
reduce live migration downtime when passthrough VQ is being switched
to shadow VQ. This RFC v2 is sent to incorporate the early feedback
from reviewers on the uAPI and driver API part of changes, the
associated driver patch set consuming ths API will come around
soon along with formal submission of this series.
Some initial
2023 Sep 09
4
[PATCH RFC v2 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost
of iotlb mapping during live migration, it's crucial to
decouple the vhost-vdpa iotlb abstraction from the virtio
device life cycle, i.e. iotlb mappings should be left
intact across virtio device reset [1]. For it to work, the
on-chip IOMMU parent device should implement a separate
.reset_map() operation callback to restore 1:1 DMA