allocated. Future changes might skip that, but
this series is already long enough.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 +
hw/virtio/vhost-vdpa.c | 39 ++
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/include
can search efficiently in both directions,
and it will signal overlap if iova or the translated address is present
in any tree.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 27 +++
hw/virtio/vhost-iova-tree.c | 155
hw/virtio/m
Setting the log address would make the device start reporting invalid
dirty memory because the SVQ vrings are located in qemu's memory.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 8 +++-
net/vhost-vdpa.c | 48
2 files changed, 47 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
.
Signed-off-by: Eugenio Pérez
Reviewed-by: Peter Xu
---
include/qemu/iova-tree.h | 18 ++
util/iova-tree.c | 135 +++
2 files changed, 153 insertions(+)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..d066400f09
have
problems with these retransmissions.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 8630d624f6..69a4bfd0d4 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio
Use translations added in VhostIOVATree in SVQ.
Only introduce usage here, not allocation and deallocation. As with
previous patches, we use the dead code paths of shadow_vqs_enabled to
avoid commiting too many changes at once. These are impossible to take
at the moment.
Signed-off-by: Eugenio
devices, it may cause unexpected SVQ queue full. This
patch also solves it by checking for this condition at both guest's
kicks and device's calls. The code may be more elegant in the future if
SVQ code runs in its own iocontext.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
First half of the buffers forwarding part, preparing vhost-vdpa
callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so
this is effectively dead code at the moment, but it helps to reduce
patch size.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 48
or event idx.
Future changes can add support to offer more features to the guest,
since the use of VirtQueue gives this for free. This is left out at the
moment for simplicity.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 44
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 38 ++
hw/virtio/vhost-vdpa.c
gned-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 9 +
hw/virtio/vhost-shadow-virtqueue.c | 29 +
2 files changed, 38 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index 9e12f77201..82cea1
only exposes basic SVQ allocation and free. Next patches of
the series add functionality like notifications and buffers forwarding.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 28 ++
hw/virtio/vhost-shadow-virtqueue.c | 62 ++
hw
At this mode no buffer forwarding will be performed in SVQ mode: Qemu
will just forward the guest's kicks to the device.
Host memory notifiers regions are left out for simplicity, and they will
not be addressed in this series.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
, all of the changes are
contained in vhost code.
* Delete superfluous code.
* An intermediate RFC was sent with only the notifications forwarding
changes. It can be seen in
https://patchew.org/QEMU/20210129205415.876290-1-epere...@redhat.com/
v1 link:
https://lists.gnu.org/archive/html/qemu-d
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 5 -
net/vhost-vdpa.c | 48
2 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
Setting the log address would make the device start reporting invalid
dirty memory because the SVQ vrings are located in qemu's memory.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
have
problems with these retransmissions.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index a386a83eb1..151622fb34 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio
Use translations added in VhostIOVATree in SVQ.
Only introduce usage here, not allocation and deallocation. As with
previous patches, we use the dead code paths of shadow_vqs_enabled to
avoid commiting too many changes at once. These are impossible to take
at the moment.
Signed-off-by: Eugenio
devices, it may cause unexpected SVQ queue full. This
patch also solves it by checking for this condition at both guest's
kicks and device's calls. The code may be more elegant in the future if
SVQ code runs in its own iocontext.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
First half of the buffers forwarding part, preparing vhost-vdpa
callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so
this is effectively dead code at the moment, but it helps to reduce
patch size.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 48
can search efficiently in both directions,
and it will signal overlap if iova or the translated address is present
in any tree.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 27 +++
hw/virtio/vhost-iova-tree.c | 155
hw/virtio/m
gned-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 9 +
hw/virtio/vhost-shadow-virtqueue.c | 29 +
2 files changed, 38 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index 9e12f77201..82cea1
.
Signed-off-by: Eugenio Pérez
Reviewed-by: Peter Xu
---
include/qemu/iova-tree.h | 18 ++
util/iova-tree.c | 135 +++
2 files changed, 153 insertions(+)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..d066400f09
allocated. Future changes might skip that, but
this series is already long enough.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 +
hw/virtio/vhost-vdpa.c | 39 ++
2 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/include
nt with only the notifications forwarding
changes. It can be seen in
https://patchew.org/QEMU/20210129205415.876290-1-epere...@redhat.com/
v1 link:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05372.html
Eugenio Pérez (14):
vhost: Add VhostShadowVirtqueue
vhost: Add Shadow
or event idx.
Future changes can add support to offer more features to the guest,
since the use of VirtQueue gives this for free. This is left out at the
moment for simplicity.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 44
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 38 ++
hw/virtio/vhost-vdpa.c
At this mode no buffer forwarding will be performed in SVQ mode: Qemu
will just forward the guest's kicks to the device.
Host memory notifiers regions are left out for simplicity, and they will
not be addressed in this series.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
only exposes basic SVQ allocation and free. Next patches of
the series add functionality like notifications and buffers forwarding.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 28 ++
hw/virtio/vhost-shadow-virtqueue.c | 62 ++
hw
allocated. Future changes might skip that, but
this series is already long enough.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 +
hw/virtio/vhost-vdpa.c | 16
2 files changed, 17 insertions(+)
diff --git a/include/hw/virtio/vhost-vdpa.h b/include
Setting the log address would make the device start reporting invalid
dirty memory because the SVQ vrings are located in qemu's memory.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
can search efficiently in both directions,
and it will signal overlap if iova or the translated address is present
in any tree.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 27 +++
hw/virtio/vhost-iova-tree.c | 155
hw/virtio/m
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 5 -
net/vhost-vdpa.c | 48
2 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
.
Signed-off-by: Eugenio Pérez
Reviewed-by: Peter Xu
---
include/qemu/iova-tree.h | 18 ++
util/iova-tree.c | 133 +++
2 files changed, 151 insertions(+)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..a623136cd8
This is needed to achieve migration, so the destination can restore its
index.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 56f9f125cd..accc4024c2 100644
devices, it may cause unexpected SVQ queue full. This
patch also solves it by checking for this condition at both guest's
kicks and device's calls. The code may be more elegant in the future if
SVQ code runs in its own iocontext.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
Use translations added in VhostIOVATree in SVQ.
Only introduce usage here, not allocation and deallocation. As with
previous patches, we use the dead code paths of shadow_vqs_enabled to
avoid commiting too many changes at once. These are impossible to take
at the moment.
Signed-off-by: Eugenio
First half of the buffers forwarding part, preparing vhost-vdpa
callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so
this is effectively dead code at the moment, but it helps to reduce
patch size.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 84
gned-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 9 +
hw/virtio/vhost-shadow-virtqueue.c | 29 +
2 files changed, 38 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index 84747655ad..3bbea7
or event idx.
Future changes can add support to offer more features to the guest,
since the use of VirtQueue gives this for free. This is left out at the
moment for simplicity.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 39
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 34 ++
hw/virtio/vhost-vdpa.c
At this mode no buffer forwarding will be performed in SVQ mode: Qemu
will just forward the guest's kicks to the device.
Host memory notifiers regions are left out for simplicity, and they will
not be addressed in this series.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
only exposes basic SVQ allocation and free. Next patches of
the series add functionality like notifications and buffers forwarding.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 28 ++
hw/virtio/vhost-shadow-virtqueue.c | 62 ++
hw
was sent with only the notifications forwarding
changes. It can be seen in
https://patchew.org/QEMU/20210129205415.876290-1-epere...@redhat.com/
v1 link:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05372.html
Eugenio Pérez (20):
virtio: Add VIRTIO_F_QUEUE_STATE
lready, so let's use the full tx size.
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 49cd13314a..b1769bfee0 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/vi
.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 17 +
util/iova-tree.c | 132 +++
2 files changed, 149 insertions(+)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..eb6b6175a3 100644
--- a/include/qemu
Please review this new minimal version. It is way shorter, but this
comes with a cost:
* Iteration does not stop at the end of range (but an out of range
allocation never happens)
* Iteration must start from iova == 0 instead of first valid entry in
the hole.
These should not be a big deal
, it will be transfered with the rest of properties in
the emulated virtio-net device model.
A new CVQ command will be reproduced at destination so that NIC is aware
of the changed MAC.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 110 ++-
1 file changed
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4 +++-
hw/virtio/vhost-shadow-virtqueue.c | 4
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index 767b0a82ba..8f2377bbc4 100644
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 13 -
hw/virtio/vhost-shadow-virtqueue.c | 12 +++-
hw/virtio/vhost-vdpa.c | 20 +++-
3 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost-shadow
So SVQ can allocate elements using it
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/virtio.h | 1 +
hw/virtio/virtio.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index f095637058..6f4cccfd42 100644
This allows external vhost-net devices to modify the state of the
VirtIO device model once vhost-vdpa device has acknowledge the control
commands.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/virtio-net.h | 3 ++
hw/net/virtio-net.c| 83 --
2
Trivial patch extracted from [1] series. It helps to simplify the memory
management of the function when adding exit paths following the qemu
guidelines.
Thanks!
[1]
https://patchwork.kernel.org/project/qemu-devel/patch/20220121202733.404989-30-epere...@redhat.com/
Eugenio Pérez (1):
vdpa
some details like error control is still not 100%
tested. Comments are welcomed on every aspect of the patch.
[1]
https://lore.kernel.org/qemu-devel/20220121202733.404989-1-epere...@redhat.com/
[2] https://lkml.org/lkml/2020/9/23/1243
Eugenio Pérez (9):
virtio-net: Expose ctrl virtqueue logic
Simplifying memory management.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 4125d13118..4befba5cc7 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -264,7 +264,8 @@ int
-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 10 +-
include/hw/virtio/vhost-vdpa.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 15 ++-
hw/virtio/vhost-vdpa.c | 4 ++--
4 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/hw/virtio
This allows SVQ to add metadata to the different queue elements
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 52 ++
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow
This allows qemu to inject packets to the device without guest's notice.
This will be use to inject net CVQ messages to restore status in the destination
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 +
hw/virtio/vhost-shadow-virtqueue.c | 142
To know the device features is also needed for CVQ SVQ. Extract from
vhost_vdpa_get_max_queue_pairs so we can reuse it.
Report errno in case of failure getting them while we're at it.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 30 --
1 file changed, 20
Simplifying memory management.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 4125d13118..4befba5cc7 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -264,7 +264,8 @@ int
This is needed to achieve migration, so destination can restore its
index.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 276a559649..887857c177 100644
--- a/hw/virtio
.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 17
util/iova-tree.c | 86 +++-
2 files changed, 102 insertions(+), 1 deletion(-)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..33f9b2e13f 100644
allocated. Future changes might skip that, but
this series is already long enough.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 20
1 file changed, 20 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index fb0a338baa..75090d65e8 100644
This way SVQ queues can be migrated.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 8
2 files changed, 9 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index
This reports the guest's visible SVQ effective length, not the device's
one.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 5 +
2 files changed, 6 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 5 -
net/vhost-vdpa.c | 27 ---
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/qapi/net.json b/qapi/net.json
index 7fab2e7cd8
This combines the previous two feature functions, forwarding the guest
ones to the device and setting the transport ones that the SVQ supports
with the device.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 3 +++
hw/virtio/vhost-shadow-virtqueue.c | 31
SVQ need to allocate iova entries, traversing the list looking for
holes.
GLib offers methods to both transverse the list and look for entries
upper than a key since version 2.68. However qemu may need to compile
with earlier versions, so we replicate both methods here.
Signed-off-by: Eugenio
Since it's a device property, it can be done in net/. This helps SVQ to
allocate the rings in vdpa device initialization, rather than delay
that.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 15 ---
net/vhost-vdpa.c | 32
2 files
to acknowledge them is fatal
for SVQ.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 24
2 files changed, 25 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow
devices, it may cause unexpected SVQ queue full. This
patch also solves it by checking for this condition at both guest's
kicks and device's calls. The code may be more elegant in the future if
SVQ code runs in its own iocontext.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h
can search efficiently both directions,
and it will signal overlap if iova or the translated address is
present in any tree.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 27 +++
hw/virtio/vhost-iova-tree.c | 157
hw/virtio/meson.build
Doing that way allows vhost backend to know what address to return.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 7b03efccec..64b955ba0c 100644
--- a/hw/virtio/vhost.c
This allows the vhost-vdpa device to set SVQ -> guest notifier to SVQ.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 16
2 files changed, 17 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b
So we can store private data not accessible from outside.
In this case, we will add intrusive linked list members so we can
transverse it for allocation.
Signed-off-by: Eugenio Pérez
---
util/iova-tree.c | 37 ++---
1 file changed, 26 insertions(+), 11 deletions
gned-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 33 ++
2 files changed, 37 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index af8f8264c0..3521e8
Setting the log address would make the device start reporting invalid
dirty memory because the SVQ vrings are located in qemu's memory.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
At this moment no buffer forwarding will be performed in SVQ mode: Qemu
just forward the guest's kicks to the device. This commit also set up
SVQs in the vhost device.
Host memory notifiers regions are left out for simplicity, and they will
not be addressed in this series.
Signed-off-by: Eugenio
Doing so would cause the device to export writes to SVQ addresses, which
are not part of the guest's IOVA.
Like the previous patch, this is currently not possible since SVQ does
not run if the device exports VHOST_VRING_F_LOG. But it's needed to
enable migration with SVQ.
Signed-off-by: Eugenio
This function allows the vhost-vdpa backend to override kick_fd.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 1 +
hw/virtio/vhost-shadow-virtqueue.c | 45 ++
2 files changed, 46 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
idx.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 44 ++
hw/virtio/vhost-vdpa.c | 21 ++
3 files changed, 67 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b
This allows vhost-vdpa device to retrieve device -> svq call eventfd.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 12
2 files changed, 14 insertions(+)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b
This will make qemu aware of the device used buffers, allowing it to
write the guest memory with its contents if needed.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 15 +++
hw/virtio/vhost-vdpa.c | 11 +++
2 files changed, 26 insertions
Use translations added in VhostIOVATree in SVQ.
Only introduce usage here, not allocation and deallocation. As with
previous patches, we use the dead code paths of shadow_vqs_enabled to
avoid commiting too many changes at once. These are impossible to take
at the moment.
Signed-off-by: Eugenio
change intended.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 164 -
1 file changed, 82 insertions(+), 82 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 04ea43704f..6c10a7f05f 100644
--- a/hw/virtio/vhost-vdpa.c
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 18de14f0fb..029f98feee 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
First half of the buffers forwarding part, preparing vhost-vdpa
callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so
this is effectively dead code at the moment, but it helps to reduce
patch size.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 +-
hw
.
* An intermediate RFC was sent with only the notifications forwarding
changes. It can be seen in
https://patchew.org/QEMU/20210129205415.876290-1-epere...@redhat.com/
v1 link:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05372.html
Eugenio Pérez (20):
virtio: Add
Is needed so vhost-vdpa knows the device's kick event fd.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 4
hw/virtio/vhost-shadow-virtqueue.c | 10 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw
-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 27 ++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.h
b/hw/virtio/vhost-shadow-virtqueue.h
index a56ecfc09d
only exposes basic SVQ allocation and free. Next patches of
the series add functionality like notifications and buffers forwarding.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 21 ++
hw/virtio/vhost-shadow-virtqueue.c | 64 ++
hw/virtio
vhost-vdpa: introduce vhost-vdpa net client")
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 8
1 file changed, 8 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 2e3c22a8c7..25dd6dd975 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -170,9 +170,17
The message has never been true in the case of non tap networking, so
only tell that userland networking will be used if possible.
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net
version of vp_vdpa to fail negotiation.
v2:
* Replace dummy receive_{iov,raw} with receive callback.
* Delete fix indentation commit, we don't touch that code anymore.
Eugenio Pérez (2):
vdpa: Add dummy receive callback
virtio-net: Fix log message
hw/net/virtio-net.c | 11 ++-
net
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index f2014d5ea0..004acf858f 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3501,7 +3501,7 @@ static void
vhost-vdpa: introduce vhost-vdpa net client")
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 16
1 file changed, 16 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 2e3c22a8c7..4c75b78304 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -170
The message has never been true in the case of non tap networking, so
only tell that userland networking will be used if possible.
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net
version of vp_vdpa to fail negotiation.
This is another bersion of the patch proposed in [1], but the subject
didn't match the patch anymore.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg03719.html
Eugenio Pérez (3):
virtio-net: Fix indentation
vdpa: Add dummy receive
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index f2014d5ea0..004acf858f 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -3501,7 +3501,7 @@ static void
1001 - 1100 of 1363 matches
Mail list logo