qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Viktor Prutyanov <viktor@daynix.com>
To: mst@redhat.com, jasowang@redhat.com
Cc: qemu-devel@nongnu.org, yan@daynix.com,
	yuri.benditovich@daynix.com, Viktor Prutyanov <viktor@daynix.com>
Subject: [PATCH v5 2/2] virtio-net: pass Device-TLB enable/disable events to vhost
Date: Mon, 26 Jun 2023 12:12:58 +0300	[thread overview]
Message-ID: <20230626091258.24453-3-viktor@daynix.com> (raw)
In-Reply-To: <20230626091258.24453-1-viktor@daynix.com>

If vhost is enabled for virtio-net, Device-TLB enable/disable events
must be passed to vhost for proper IOMMU unmap flag selection.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Acked-by: Jason Wang <jasowang@redhat.com>
---
 hw/net/virtio-net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 6df6b7329d..30497c00b5 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3951,6 +3951,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
     vdc->vmsd = &vmstate_virtio_net_device;
     vdc->primary_unplug_pending = primary_unplug_pending;
     vdc->get_vhost = virtio_net_get_vhost;
+    vdc->toggle_device_iotlb = vhost_toggle_device_iotlb;
 }
 
 static const TypeInfo virtio_net_info = {
-- 
2.21.0



  parent reply	other threads:[~2023-06-26  9:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26  9:12 [PATCH v5 0/2] vhost: register and change IOMMU flag depending on ATS state Viktor Prutyanov
2023-06-26  9:12 ` [PATCH v5 1/2] vhost: register and change IOMMU flag depending on Device-TLB state Viktor Prutyanov
2023-06-26  9:12 ` Viktor Prutyanov [this message]
2023-07-03  8:25 ` [PATCH v5 0/2] vhost: register and change IOMMU flag depending on ATS state Viktor Prutyanov
2023-07-10 14:31   ` Viktor Prutyanov
2023-07-18 11:15 ` Viktor Prutyanov

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=20230626091258.24453-3-viktor@daynix.com \
    --to=viktor@daynix.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).