All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eli Cohen <elic@nvidia.com>
To: <mst@redhat.com>, <jasowang@redhat.com>, <sgarzare@redhat.com>,
	<virtualization@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>
Cc: <elic@nvidia.com>
Subject: [PATCH v1] vdpa/vdpa_sim: Use the negotiated features when calling  vringh_init_iotlb
Date: Tue, 20 Jul 2021 08:25:33 +0300	[thread overview]
Message-ID: <20210720052533.415991-1-elic@nvidia.com> (raw)

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

Fixes: 2c53d0f64c06f ("vdpasim: vDPA device simulator")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
v0 --> v1:
Update "Fixes" line

 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


             reply	other threads:[~2021-07-20  5:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20  5:25 Eli Cohen [this message]
2021-07-20  6:57 ` [PATCH v1] vdpa/vdpa_sim: Use the negotiated features when calling vringh_init_iotlb Stefano Garzarella
2021-07-20  6:57   ` Stefano Garzarella
2021-07-20  7:14   ` Eli Cohen
2021-07-20  8:13     ` Stefano Garzarella
2021-07-20  8:13       ` Stefano Garzarella
2021-08-10 15:55       ` Michael S. Tsirkin
2021-08-10 15:55         ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210720052533.415991-1-elic@nvidia.com \
    --to=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.