All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb
@ 2021-07-19 13:44 Eli Cohen
  2021-07-20  3:13   ` Jason Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Cohen @ 2021-07-19 13:44 UTC (permalink / raw)
  To: mst, jasowang, sgarzare, virtualization, linux-kernel; +Cc: elic

When calling vringh_init_iotlb(), use the negotiated features which
might be different than the supported features.

Fixes: 011c35bac5ef ("vdpa_sim: add supported_features field in vdpasim_dev_attr)
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
 drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 14e024de5cbf..89a474c7a096 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -66,7 +66,7 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
 {
 	struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
 
-	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
+	vringh_init_iotlb(&vq->vring, vdpasim->features,
 			  VDPASIM_QUEUE_MAX, false,
 			  (struct vring_desc *)(uintptr_t)vq->desc_addr,
 			  (struct vring_avail *)
@@ -86,7 +86,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim,
 	vq->device_addr = 0;
 	vq->cb = NULL;
 	vq->private = NULL;
-	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
+	vringh_init_iotlb(&vq->vring, vdpasim->features,
 			  VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL);
 
 	vq->vring.notify = NULL;
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb
  2021-07-19 13:44 [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb Eli Cohen
@ 2021-07-20  3:13   ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2021-07-20  3:13 UTC (permalink / raw)
  To: Eli Cohen, mst, sgarzare, virtualization, linux-kernel


在 2021/7/19 下午9:44, Eli Cohen 写道:
> When calling vringh_init_iotlb(), use the negotiated features which
> might be different than the supported features.
>
> Fixes: 011c35bac5ef ("vdpa_sim: add supported_features field in vdpasim_dev_attr)


As Stefano said.

It should be 2c53d0f64c06f ("vdpasim: vDPA device simulator")

Other than this

Acked-by: Jason Wang <jasowang@redhat.com>


> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
>   drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 14e024de5cbf..89a474c7a096 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -66,7 +66,7 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
>   {
>   	struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
>   
> -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> +	vringh_init_iotlb(&vq->vring, vdpasim->features,
>   			  VDPASIM_QUEUE_MAX, false,
>   			  (struct vring_desc *)(uintptr_t)vq->desc_addr,
>   			  (struct vring_avail *)
> @@ -86,7 +86,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim,
>   	vq->device_addr = 0;
>   	vq->cb = NULL;
>   	vq->private = NULL;
> -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> +	vringh_init_iotlb(&vq->vring, vdpasim->features,
>   			  VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL);
>   
>   	vq->vring.notify = NULL;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb
@ 2021-07-20  3:13   ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2021-07-20  3:13 UTC (permalink / raw)
  To: Eli Cohen, mst, sgarzare, virtualization, linux-kernel


在 2021/7/19 下午9:44, Eli Cohen 写道:
> When calling vringh_init_iotlb(), use the negotiated features which
> might be different than the supported features.
>
> Fixes: 011c35bac5ef ("vdpa_sim: add supported_features field in vdpasim_dev_attr)


As Stefano said.

It should be 2c53d0f64c06f ("vdpasim: vDPA device simulator")

Other than this

Acked-by: Jason Wang <jasowang@redhat.com>


> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
>   drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 14e024de5cbf..89a474c7a096 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -66,7 +66,7 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
>   {
>   	struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
>   
> -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> +	vringh_init_iotlb(&vq->vring, vdpasim->features,
>   			  VDPASIM_QUEUE_MAX, false,
>   			  (struct vring_desc *)(uintptr_t)vq->desc_addr,
>   			  (struct vring_avail *)
> @@ -86,7 +86,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim,
>   	vq->device_addr = 0;
>   	vq->cb = NULL;
>   	vq->private = NULL;
> -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> +	vringh_init_iotlb(&vq->vring, vdpasim->features,
>   			  VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL);
>   
>   	vq->vring.notify = NULL;

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb
  2021-07-20  3:13   ` Jason Wang
  (?)
@ 2021-07-20  5:16   ` Eli Cohen
  -1 siblings, 0 replies; 4+ messages in thread
From: Eli Cohen @ 2021-07-20  5:16 UTC (permalink / raw)
  To: Jason Wang; +Cc: mst, sgarzare, virtualization, linux-kernel

On Tue, Jul 20, 2021 at 11:13:00AM +0800, Jason Wang wrote:
> 
> 在 2021/7/19 下午9:44, Eli Cohen 写道:
> > When calling vringh_init_iotlb(), use the negotiated features which
> > might be different than the supported features.
> > 
> > Fixes: 011c35bac5ef ("vdpa_sim: add supported_features field in vdpasim_dev_attr)
> 
> 
> As Stefano said.
> 
> It should be 2c53d0f64c06f ("vdpasim: vDPA device simulator")

Makes sense. Though I haven't got Stefano's message.
I will post another one.

> 
> Other than this
> 
> Acked-by: Jason Wang <jasowang@redhat.com>
> 
> 
> > Signed-off-by: Eli Cohen <elic@nvidia.com>
> > ---
> >   drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> > index 14e024de5cbf..89a474c7a096 100644
> > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> > @@ -66,7 +66,7 @@ static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
> >   {
> >   	struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
> > -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> > +	vringh_init_iotlb(&vq->vring, vdpasim->features,
> >   			  VDPASIM_QUEUE_MAX, false,
> >   			  (struct vring_desc *)(uintptr_t)vq->desc_addr,
> >   			  (struct vring_avail *)
> > @@ -86,7 +86,7 @@ static void vdpasim_vq_reset(struct vdpasim *vdpasim,
> >   	vq->device_addr = 0;
> >   	vq->cb = NULL;
> >   	vq->private = NULL;
> > -	vringh_init_iotlb(&vq->vring, vdpasim->dev_attr.supported_features,
> > +	vringh_init_iotlb(&vq->vring, vdpasim->features,
> >   			  VDPASIM_QUEUE_MAX, false, NULL, NULL, NULL);
> >   	vq->vring.notify = NULL;
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-20  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 13:44 [PATCH] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb Eli Cohen
2021-07-20  3:13 ` Jason Wang
2021-07-20  3:13   ` Jason Wang
2021-07-20  5:16   ` Eli Cohen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.