Fixes: 6d0b222666 ("vdpa: Adapt vhost_vdpa_get_vring_base to SVQ")
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 9e5fe15d03..1f229ff4cb 100644
--- a
It's done for both in and out descriptors so it's better placed here.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vh
It always returns IOVA_OK so nobody uses it.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 4 +---
util/iova-tree.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index c938fb0793..16bbfdf5f8
model so (MAC) state can be migrated too.
[1] https://lkml.kernel.org/kvm/20220224212314.1326-1-gda...@xilinx.com/
Eugenio Pérez (22):
vdpa: Add missing tracing to batch mapping functions
vdpa: Fix bad index calculus at vhost_vdpa_get_vring_base
util: Return void on iova_tree_remove
vhost
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 9 -
net/vhost-vdpa.c | 48
2 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
From: Philippe Mathieu-Daudé
Per
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538
The old API took the size of the memory to duplicate as a guint,
whereas most memory functions take memory sizes as a gsize. This
made it easy to accidentally pass a gsize t
These functions were not traced properly.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 2 ++
hw/virtio/trace-events | 2 ++
2 files changed, 4 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 8adf7c0b92..9e5fe15d03 100644
--- a/hw/virtio/vhost
These functions were not traced properly.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 2 ++
hw/virtio/trace-events | 2 ++
2 files changed, 4 insertions(+)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 8adf7c0b92..9e5fe15d03 100644
--- a/hw/virtio/vhost
Fixing that literal checkpatch.pl because it will complain when we modify the
file
Signed-off-by: Eugenio Pérez
---
hw/net/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 1067e72b39..e4748a7e6c 100644
--- a/hw
We can configure ASID per group, but we still use asid 0 for every vdpa
device. Multiple asid support for cvq will be introduced in next
patches.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 3 +++
hw/virtio/vhost-vdpa.c | 47 --
net
This isolates shadow cvq in its own group.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 8 ++-
net/vhost-vdpa.c | 179 +++
2 files changed, 171 insertions(+), 16 deletions(-)
diff --git a/qapi/net.json b/qapi/net.json
index 6a5460ce56
Signed-off-by: Eugenio Pérez
---
include/standard-headers/linux/vhost_types.h | 11 -
linux-headers/linux/vhost.h | 25
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/include/standard-headers/linux/vhost_types.h
b/include/standard
It allows to inject custom code on device success start, right before
release lock.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 4
2 files changed, 6 insertions(+)
diff --git a/include/net/net.h b/include/net/net.h
index 523136c7ac..2fc3002ab4 100644
It always returns IOVA_OK so nobody uses it.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 4 +---
util/iova-tree.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index c938fb0793..16bbfdf5f8
This will send CVQ commands in the destination machine, seting up
everything o there is no guest-visible change.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 63
1 file changed, 63 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost
device model will be updated with the new
one.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 70 +---
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 290aa01e13..585d2f60f8 100644
--- a/net
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 change
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 | 5 +
hw/virtio/vhost-shadow-virtqueue.c
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 b31c4507f5..1e85833897 100644
Only the first one of them were properly enqueued back.
Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding")
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/vi
Fixing that literal checkpatch.pl because it will complain when we modify the
file
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 1067e72b39..da05516a99 100644
--- a/hw/net
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 21 +++--
hw/virtio/vhost-shadow-virtqueue.c | 8 +++-
hw/virtio/vhost-vdpa.c | 20 +++-
3 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow
Just a simple wrapper so we can find DMAMap entries based on iova
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 2 ++
hw/virtio/vhost-iova-tree.c | 14 ++
2 files changed, 16 insertions(+)
diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h
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| 82 --
2
It always returns IOVA_OK so nobody uses it.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 4 +---
util/iova-tree.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index c938fb0793..16bbfdf5f8
-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 16 +++-
include/hw/virtio/vhost-vdpa.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 9 -
hw/virtio/vhost-vdpa.c | 3 ++-
4 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/hw/virtio
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index c5ed7a3779..9eeac8fa8e 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1016,7 +1016,7 @@ static
This allows SVQ to add metadata to the different queue elements
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 8 --
hw/virtio/vhost-shadow-virtqueue.c | 42 --
2 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/hw/virtio
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 9 -
net/vhost-vdpa.c | 48
2 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
It's done for both in and out descriptors so it's better placed here.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vh
Only the first one of them were properly enqueued back.
Fixes: 100890f7ca ("vhost: Shadow virtqueue buffers forwarding")
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/vi
g cvq asid != data vqs asid.
* Update device model so (MAC) state can be migrated too.
[1] https://lkml.kernel.org/kvm/20220224212314.1326-1-gda...@xilinx.com/
Eugenio Pérez (20):
vhost: Fix bad return of descriptors
util: Return void on iova_tree_remove
vdpa: Add x-svq to NetdevVhostVDPAOp
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 21 +++--
hw/virtio/vhost-shadow-virtqueue.c | 8 +++-
hw/virtio/vhost-vdpa.c | 20 +++-
3 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow
Just a simple wrapper so we can find DMAMap entries based on iova
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 2 ++
hw/virtio/vhost-iova-tree.c | 14 ++
2 files changed, 16 insertions(+)
diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h
device model will be updated with the new
one.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 70 +---
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 290aa01e13..585d2f60f8 100644
--- a/net
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| 82 --
2
It's done for both in and out descriptors so it's better placed here.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vh
This isolates shadow cvq in its own group.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 8 ++-
net/vhost-vdpa.c | 179 +++
2 files changed, 171 insertions(+), 16 deletions(-)
diff --git a/qapi/net.json b/qapi/net.json
index 6a5460ce56
an be migrated too.
[1] https://lkml.kernel.org/kvm/20220224212314.1326-1-gda...@xilinx.com/
Eugenio Pérez (19):
util: Return void on iova_tree_remove
vdpa: Add x-svq to NetdevVhostVDPAOptions
vhost: move descriptor translation to vhost_svq_vring_write_descs
vdpa: Fix index calcul
Signed-off-by: Eugenio Pérez
---
include/standard-headers/linux/vhost_types.h | 11 -
linux-headers/linux/vhost.h | 25
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/include/standard-headers/linux/vhost_types.h
b/include/standard
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 | 5 +
hw/virtio/vhost-shadow-virtqueue.c
This will send CVQ commands in the destination machine, seting up
everything o there is no guest-visible change.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 63
1 file changed, 63 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost
It allows to inject custom code on device success start, right before
release lock.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 4
2 files changed, 6 insertions(+)
diff --git a/include/net/net.h b/include/net/net.h
index 523136c7ac..2fc3002ab4 100644
-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 16 +++-
include/hw/virtio/vhost-vdpa.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 9 -
hw/virtio/vhost-vdpa.c | 3 ++-
4 files changed, 27 insertions(+), 3 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.h | 8 --
hw/virtio/vhost-shadow-virtqueue.c | 42 --
2 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/hw/virtio
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 b31c4507f5..1e85833897 100644
Fixing that literal checkpatch.pl because it will complain when we modify the
file
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 1067e72b39..da05516a99 100644
--- a/hw/net
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 change
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index c5ed7a3779..9eeac8fa8e 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1016,7 +1016,7 @@ static
It always returns IOVA_OK so nobody uses it.
Signed-off-by: Eugenio Pérez
---
include/qemu/iova-tree.h | 4 +---
util/iova-tree.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index c938fb0793..16bbfdf5f8
We can configure ASID per group, but we still use asid 0 for every vdpa
device. Multiple asid support for cvq will be introduced in next
patches.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 3 +++
hw/virtio/vhost-vdpa.c | 47 --
net
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 9 -
net/vhost-vdpa.c | 48
2 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
This isolates shadow cvq in its own group.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 8 ++-
net/vhost-vdpa.c | 179 +++
2 files changed, 171 insertions(+), 16 deletions(-)
diff --git a/qapi/net.json b/qapi/net.json
index 6a5460ce56
We can configure ASID per group, but we still use asid 0 for every vdpa
device. Multiple asid support for cvq will be introduced in next
patches.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 3 +++
hw/virtio/vhost-vdpa.c | 47 --
net
Just a simple wrapper so we can find DMAMap entries based on iova
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-iova-tree.h | 2 ++
hw/virtio/vhost-iova-tree.c | 14 ++
2 files changed, 16 insertions(+)
diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h
Signed-off-by: Eugenio Pérez
---
include/standard-headers/linux/vhost_types.h | 11 -
linux-headers/linux/vhost.h | 25
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/include/standard-headers/linux/vhost_types.h
b/include/standard
It allows to inject custom code on device success start, right before
release lock.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 4
2 files changed, 6 insertions(+)
diff --git a/include/net/net.h b/include/net/net.h
index 523136c7ac..2fc3002ab4 100644
-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 16 +++-
include/hw/virtio/vhost-vdpa.h | 2 ++
hw/virtio/vhost-shadow-virtqueue.c | 9 -
hw/virtio/vhost-vdpa.c | 3 ++-
4 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/hw/virtio
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 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 | 5 +
hw/virtio/vhost-shadow-virtqueue.c
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 change
This will send CVQ commands in the destination machine, seting up
everything o there is no guest-visible change.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 63
1 file changed, 63 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost
This allows SVQ to add metadata to the different queue elements
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 8 --
hw/virtio/vhost-shadow-virtqueue.c | 42 --
2 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/hw/virtio
device model will be updated with the new
one.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 70 +---
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 290aa01e13..585d2f60f8 100644
--- a/net
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index c5ed7a3779..9eeac8fa8e 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -1016,7 +1016,7 @@ static
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| 82 --
2
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.h | 21 +++--
hw/virtio/vhost-shadow-virtqueue.c | 8 +++-
hw/virtio/vhost-vdpa.c | 20 +++-
3 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow
ments are welcomed on every aspect of the patch.
Changes from rfc v1:
* Rebase to latest master
* Configure ASID instead of assuming cvq asid != data vqs asid
* Update device model so (MAC) state can be migrated too.
[1] https://lkml.kernel.org/kvm/20220224212314.1326-1-gda...@xilinx.com/
Eu
Fixing that literal checkpatch.pl because it will complain when we modify the
file
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 2087516253..cb505939b2 100644
--- a/hw/net
It's done for both in and out descriptors so it's better placed here.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 26 +++---
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vh
Finally offering the possibility to enable SVQ from the command line.
Signed-off-by: Eugenio Pérez
---
qapi/net.json| 9 -
net/vhost-vdpa.c | 48
2 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/qapi/net.json b/qapi
addresses.
Signed-off-by: Eugenio Pérez
Reviewed-by: Peter Xu
---
include/qemu/iova-tree.h | 18 ++
util/iova-tree.c | 136 +++
2 files changed, 154 insertions(+)
diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h
index 8249edd764..
27;s
emulated virtio 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/v
still 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/in
This function does the reverse operation of iova_tree_find: To look for
a mapping that match a translated address so we can do the reverse.
This have linear complexity instead of logarithmic, but it supports
overlapping HVA. Future developments could reduce it.
Signed-off-by: Eugenio Pérez
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
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
ree so it 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 | 110
h
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 ec38189492..93dbe1043c 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio
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
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 | 48
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-virtqu
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
.
Signed-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..8
his commit 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
e 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 VIRTIO_F_
This function does the reverse operation of iova_tree_find: To look for
a mapping that match a translated address so we can do the reverse.
This have linear complexity instead of logarithmic, but it supports
overlapping HVA. Future developments could reduce it.
Signed-off-by: Eugenio Pérez
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
still 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/in
addresses.
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..
ree so it 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 | 110
h
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
27;s
emulated virtio 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/v
.
Signed-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..8
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
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-virtqu
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
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
his commit 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
901 - 1000 of 1186 matches
Mail list logo