Nothing actually reads the return value, but an error in cleaning some
entries could cause device stop to abort, making a restart impossible.
Better ignore explicitely the return value.
Reported-by: Lei Yang
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Signed-off-b
If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Reported-by: Lei Yang
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
Reduce code duplication.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 07d00f5284..45d6e86b45 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio
like memory mapping / unmapping.
First two patches are already in the list at [1]. Last one is not a fix by
itself but a straightforward merge of the same code.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-08/msg00773.html
Eugenio Pérez (7):
vdpa: Skip the maps not in the iova tree
device needs to expose certains features.
Expose _F_LOG only if all of these are met.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 4c6947feb8..73c27cd315 100644
This is needed for qemu to know it can suspend the device to retrieve
its status and enable SVQ with it, so all the process is transparent to
the guest.
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
Add _F_SUSPEND and suspend ioctl.
TODO: This is still not merged in Linux upstream, so it may change.
---
include/standard-headers/linux/vhost_types.h | 3 +++
linux-headers/linux/vhost.h | 3 +++
2 files changed, 6 insertions(+)
diff --git
to net/vhost-vdpa one.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost.h | 2 ++
hw/virtio/vhost.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index a346f23d13..ccd6cc5549 100644
--- a/include/hw/virtio
This way device's vhost_vdpa can make the choice about exposing or not
the _F_LOG feature.
At the moment is always false.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 +
hw/virtio/vhost-vdpa.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git
The series reuses it to check for SUSPEND feature bit.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 11241ebac4..85b10799bd 100644
--- a/net/vhost-vdpa.c
+++ b/net
.
Comments are welcome.
[1] https://lkml.org/lkml/2022/8/10/732
[2] https://lists.nongnu.org/archive/html/qemu-devel/2022-08/msg01047.html
Eugenio Pérez (8):
[NOTMERGE] Update linux headers
vdpa: Extract get_backend_features from vhost_vdpa_get_as_num
vhost: expose memory listener priority
ost vdpa device,
enabling the shadow virtqueue unconditionally.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 85b10799bd..a035c89c34 100644
--- a/net/vhost-vdpa.c
+++ b/
This enable net/vdpa to restart the full device when a migration is
started or stopped.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 87
1 file changed, 87 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index a035c89c34
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 14 --
net/vhost-vdpa.c | 2 --
3 files changed
As this series will reuse them to restore the device state at the end of
a migration (or a device start), let's allocate only once at the device
start so we don't duplicate their map and unmap.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 123
Next patches will add a new info callback to restore NIC status through
CVQ. Since only the CVQ vhost device is needed, create it with a new
NetClientInfo.
Signed-off-by: Eugenio Pérez
---
v5: Create a new NetClientInfo instead of reusing the dataplane one.
---
net/vhost-vdpa.c | 12
This is used by the backend to perform actions before the device is
started.
In particular, vdpa net use it to map CVQ buffers to the device, so it
can send control commands using them.
Signed-off-by: Eugenio Pérez
---
v8: Rename NetClientInfo prepare callback to start, so it aligns
Since we're going to allow SVQ to add elements without the guest's
knowledge and without its own VirtQueueElement, it's easier to check if
an element is a valid head checking a different thing than the
VirtQueueElement.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
---
v8:
* Delete unneeded copy from device's in buffer.
v6:
* Map and unmap command buffers at the start and end of device usage.
v5:
* Rename s/start/load/
* Use
So we can reuse it to inject state messages.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
--
v7:
* Remove double free error
v6:
* Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack)
v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead
-by: Eugenio Pérez
Acked-by: Jason Wang
---
v6: Change less from the previous function
---
hw/virtio/vhost-shadow-virtqueue.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index 1b49bf54f2..f863b08627
It allows per-net client operations right after device's successful
start. In particular, to load the device status.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
---
v5: Rename start / load, naming it more specifically
As discussed in previous series [1], this memory barrier is useless with
the atomic read of used idx at vhost_svq_more_used. Deleting it.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-shadow
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
Acked-by: Jason Wang
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1
Used by the backend to perform actions after the device is stopped.
In particular, vdpa net use it to unmap CVQ buffers to the device,
cleaning the actions performend in prepare().
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 3 +++
2 files changed, 5
mode
v1 from RFC:
- Do not reorder DRIVER_OK & enable patches.
- Delete leftovers
Eugenio Pérez (12):
vhost: stop transfer elem ownership in vhost_handle_guest_kick
vhost: use SVQ element ndescs instead of opaque data for desc
validation
vhost: Delete useless read memory barrier
v
Isolate control virtqueue in its own group, allowing to intercept control
commands but letting dataplane run totally passthrough to the guest.
Signed-off-by: Eugenio Pérez
---
v4:
* Squash vhost_vdpa_cvq_group_is_independent.
* Rebased on last CVQ start series, that allocated CVQ cmd bufs
-off-by: Eugenio Pérez
---
v4: Add comment specifying behavior if device does not support _F_ASID
v3: Deleted unneeded space
---
include/hw/virtio/vhost-vdpa.h | 8 +---
hw/virtio/vhost-vdpa.c | 25 +++--
net/vhost-vdpa.c | 6 +++---
hw/virtio/trace
SVQ may run or not in a device depending on runtime conditions (for
example, if the device can move CVQ to its own group or not).
Allocate the resources unconditionally, and decide later if to use them
or not.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 33
Main reason is for new vhost_vdpa address space ioctls to be available.
Update kernel headers until
9de1f9c8ca51 ("Merge tag 'irq-core-2022-08-01' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip").
Signed-off-by: Eugenio Pérez
---
include/standard-headers/asm-x86/bootpa
with different conditions, making it possible
to go from "not isolated group" to "isolated".
Saving the cmdline parameter in an extra field so we never disable CVQ
SVQ in case the device was started with cmdline.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 4
1 file c
This function used to trust in v->shadow_vqs != NULL to know if it must
start svq or not.
This is not going to be valid anymore, as qemu is going to allocate svq
unconditionally (but it will only start them conditionally).
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 4 ++--
rg/archive/html/qemu-devel/2022-08/msg00349.html
Eugenio Pérez (6):
linux-headers: Update kernel headers
vdpa: Use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop
vdpa: Allocate SVQ unconditionally
vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap
vdpa: Stor
As discussed in previous series [1], this memory barrier is useless with
the atomic read of used idx at vhost_svq_more_used. Deleting it.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 3 ---
1
So we can reuse it to inject state messages.
Signed-off-by: Eugenio Pérez
--
v7:
* Remove double free error
v6:
* Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack)
v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead of iovec dev_buffers
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 14 --
net/vhost-vdpa.c | 2 --
3 files changed, 17 deletions
Used by the backend to perform actions after the device is stopped.
In particular, vdpa net use it to unmap CVQ buffers to the device,
cleaning the actions performend in prepare().
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 3 +++
2 files changed, 5
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
---
v6:
* Map and unmap command buffers at the start and end of device usage.
v5:
* Rename s/start/load/
* Use independent NetClientInfo to only add load callback on cvq
It allows per-net client operations right after device's successful
start. In particular, to load the device status.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
---
v5: Rename start / load, naming it more specifically
.
v3:
- Route vhost-vdpa start code through NetClientInfo callback.
- Delete extra vhost_net_stop_one() call.
v2:
- Fix SIGSEGV dereferencing SVQ when not in svq mode
v1 from RFC:
- Do not reorder DRIVER_OK & enable patches.
- Delete leftovers
Eugenio Pérez (12):
vhost: stop transfer
Next patches will add a new info callback to restore NIC status through
CVQ. Since only the CVQ vhost device is needed, create it with a new
NetClientInfo.
Signed-off-by: Eugenio Pérez
---
v5: Create a new NetClientInfo instead of reusing the dataplane one.
---
net/vhost-vdpa.c | 12
This is used by the backend to perform actions before the device is
started.
In particular, vdpa net use it to map CVQ buffers to the device, so it
can send control commands using them.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 7 +++
2 files changed
As this series will reuse them to restore the device state at the end of
a migration (or a device start), let's allocate only once at the device
start so we don't duplicate their map and unmap.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 123
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
---
v6:
* Map and unmap command buffers at the start and end of device usage.
v5:
* Rename s/start/load/
* Use independent NetClientInfo to only add load callback on cvq
-by: Eugenio Pérez
---
v6: Change less from the previous function
---
hw/virtio/vhost-shadow-virtqueue.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index 1b49bf54f2..f863b08627 100644
--- a/hw/virtio
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1 file changed, 4
So we can reuse it to inject state messages.
Signed-off-by: Eugenio Pérez
--
v6:
* Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack)
v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead of iovec dev_buffers for these functions.
---
net/vhost
Since we're going to allow SVQ to add elements without the guest's
knowledge and without its own VirtQueueElement, it's easier to check if
an element is a valid head checking a different thing than the
VirtQueueElement.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 3
Next patches will add a new info callback to restore NIC status through
CVQ. Since only the CVQ vhost device is needed, create it with a new
NetClientInfo.
Signed-off-by: Eugenio Pérez
---
v5: Create a new NetClientInfo instead of reusing the dataplane one.
---
net/vhost-vdpa.c | 12
It allows per-net client operations right after device's successful
start. In particular, to load the device status.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
---
v5: Rename start / load, naming it more specifically
-by: Eugenio Pérez
---
v6: Change less from the previous function
---
hw/virtio/vhost-shadow-virtqueue.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index 1b49bf54f2..f863b08627 100644
--- a/hw/virtio
As this series will reuse them to restore the device state at the end of
a migration (or a device start), let's allocate only once at the device
start so we don't duplicate their map and unmap.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 123
Used by the backend to perform actions after the device is stopped.
In particular, vdpa net use it to unmap CVQ buffers to the device,
cleaning the actions performend in prepare().
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 3 +++
2 files changed, 5
As discussed in previous series [1], this memory barrier is useless with
the atomic read of used idx at vhost_svq_more_used. Deleting it.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02616.html
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 3 ---
1
Since we're going to allow SVQ to add elements without the guest's
knowledge and without its own VirtQueueElement, it's easier to check if
an element is a valid head checking a different thing than the
VirtQueueElement.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 3
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1 file changed, 4
This is used by the backend to perform actions before the device is
started.
In particular, vdpa net use it to map CVQ buffers to the device, so it
can send control commands using them.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 7 +++
2 files changed
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 14 --
net/vhost-vdpa.c | 2 --
3 files changed, 17 deletions
through NetClientInfo callback.
- Delete extra vhost_net_stop_one() call.
v2:
- Fix SIGSEGV dereferencing SVQ when not in svq mode
v1 from RFC:
- Do not reorder DRIVER_OK & enable patches.
- Delete leftovers
Eugenio Pérez (12):
vhost: stop transfer elem ownership in vhost_handle_guest_
If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Reported-by: Lei Yang
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-v
If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.
v2: Do not dereference failed maps
Eugenio Pérez (2):
vdpa: Skip the maps not in the iova tree
vdpa: do not save failed dma maps in SVQ iova tree
Next patch will skip the registering of dma maps that the vdpa device
rejects in the iova tree. We need to consider that here or we cause a
SIGSEGV accessing result.
Reported-by: Lei Yang
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 4
1 file changed, 4 insertions(+)
diff
-off-by: Eugenio Pérez
---
v3: Deleted unneeded space
---
include/hw/virtio/vhost-vdpa.h | 8 +---
hw/virtio/vhost-vdpa.c | 25 +++--
net/vhost-vdpa.c | 6 +++---
hw/virtio/trace-events | 4 ++--
4 files changed, 25 insertions(+), 18
Main reason is for new vhost_vdpa address space ioctls to be available.
Update kernel headers until
9de1f9c8ca51 ("Merge tag 'irq-core-2022-08-01' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip").
Signed-off-by: Eugenio Pérez
---
include/standard-headers/asm-x86/bootpa
This function used to trust in v->shadow_vqs != NULL to know if it must
start svq or not.
This is not going to be valid anymore, as qemu is going to allocate svq
unconditionally (but it will only start them conditionally).
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 4 ++--
SVQ may run or not in a device depending on runtime conditions (for
example, if the device can move CVQ to its own group or not).
Allocate the resources unconditionally, and decide later if to use them
or not.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 33
with different conditions, making it possible
to go from "not isolated group" to "isolated".
Saving the cmdline parameter in an extra field so we never disable CVQ
SVQ in case the device was started with cmdline.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 4
1 file c
ot support CVQ
- Add BIT_ULL missed checking device's backend feature for _F_ASID.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-08/msg00349.html
Eugenio Pérez (7):
linux-headers: Update kernel headers
vdpa: Use v->shadow_vqs_enabled in vhost_vdpa_svqs_start & stop
v
This is used by the backend to perform actions before the device is
started.
In particular, vdpa will use it to isolate CVQ in its own ASID if
possible, and start SVQ unconditionally only in CVQ.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 4
2 files
Isolate control virtqueue in its own group, allowing to intercept control
commands but letting dataplane run totally passthrough to the guest.
Signed-off-by: Eugenio Pérez
---
v3:
* Make asid related queries print a warning instead of returning an
error and stop the start of qemu.
---
hw
So its generic enough to accept any out sg buffer and we can inject
NIC state messages.
Signed-off-by: Eugenio Pérez
---
v5: Accept out sg instead of dev_buffers[]
---
net/vhost-vdpa.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost
So we can reuse it to inject state messages.
Signed-off-by: Eugenio Pérez
--
v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead of iovec dev_buffers for these functions.
---
net/vhost-vdpa.c | 73
1 file changed, 49
Next patches will add a new info callback to restore NIC status through
CVQ. Since only the CVQ vhost device is needed, create it with a new
NetClientInfo.
Signed-off-by: Eugenio Pérez
---
v5: Create a new NetClientInfo instead of reusing the dataplane one.
---
net/vhost-vdpa.c | 12
-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index e6eebd0e8d..fdb550c31b 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 14 --
net/vhost-vdpa.c | 2 --
3 files changed, 17 deletions
It allows per-net client operations right after device's successful
start. In particular, to load the device status.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
---
v5: Rename start / load, naming it more specifically
Since we're going to allow SVQ to add elements without the guest's
knowledge and without its own VirtQueueElement, it's easier to check if
an element is a valid head checking a different thing than the
VirtQueueElement.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 3
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
---
v5:
* Rename s/start/load/
* Use independent NetClientInfo to only add load callback on cvq.
---
net/vhost-vdpa.c | 50
There is no need to get them by parameter, since they're contained in
VhostVDPAState. The only useful information was the written length in
out.
Simplify the function removing those.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 17 ++---
1 file changed, 6 insertions(+), 11
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1 file changed, 4
DRIVER_OK & enable patches.
- Delete leftovers
Eugenio Pérez (10):
vhost: stop transfer elem ownership in vhost_handle_guest_kick
vhost: use SVQ element ndescs instead of opaque data for desc
validation
vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush
vdpa: Get buffers
If a map fails for whatever reason, it must not be saved in the tree.
Otherwise, qemu will try to unmap it in cleanup, leaving to more errors.
Fixes: 34e3c94eda ("vdpa: Add custom IOTLB translations to SVQ")
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 20 +
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 6abad276a6..303447a68e 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -566,7 +566,7 @@ int net_init_vhost_vdpa(const Netd
Few steps allocate new resources, and all of the allocated can be
checked to avoid trying to free an invalid one.
This series includes an already posted patch [1], because it must be applied
on top of that.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-08/msg00089.html
Eugenio Pérez
Few steps allocate new resources, and all of the allocated can be
checked to avoid trying to free an invalid one.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 303447a68e
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 6abad276a6..303447a68e 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -566,7 +566,7 @@ int net_init_vhost_vdpa(const Netd
-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 8 +---
hw/virtio/vhost-vdpa.c | 26 --
net/vhost-vdpa.c | 6 +++---
hw/virtio/trace-events | 4 ++--
4 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/include/hw
SVQ may run or not in a device depending on runtime conditions (for
example, if the device can move CVQ to its own group or not).
Allocate the resources unconditionally, and decide later if to use them
or not.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 33
Isolate control virtqueue in its own group, allowing to intercept control
commands but letting dataplane run totally passthrough to the guest.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 3 +-
net/vhost-vdpa.c | 158 +++--
2 files
This is used by the backend to perform actions before the device is
started.
In particular, vdpa will use it to isolate CVQ in its own ASID if
possible, and start SVQ unconditionally only in CVQ.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 4
2 files
Main reason is for new vhost_vdpa address space ioctls to be available.
Signed-off-by: Eugenio Pérez
---
include/standard-headers/asm-x86/bootparam.h | 1 +
include/standard-headers/drm/drm_fourcc.h| 69
include/standard-headers/linux/ethtool.h | 1 +
include
with different conditions, making it possible
to go from "not isolated group" to "isolated".
Saving the cmdline parameter in an extra field so we never disable CVQ
SVQ in case the device was started with cmdline.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 4
1 file c
series [1], handle vhost_net backend through
NetClientInfo callbacks instead of directly.
- Fix not freeing SVQ properly when device does not support CVQ
- Add BIT_ULL missed checking device's backend feature for _F_ASID.
[1] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg04009.htm
This function used to trust in v->shadow_vqs != NULL to know if it must
start svq or not.
This is not going to be valid anymore, as qemu is going to allocate svq
unconditionally (but it will only start them conditionally).
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-vdpa.c | 4 ++--
We can restore the device state in the destination via CVQ now. Remove
the migration blocker.
Signed-off-by: Eugenio Pérez
---
include/hw/virtio/vhost-vdpa.h | 1 -
hw/virtio/vhost-vdpa.c | 14 --
net/vhost-vdpa.c | 2 --
3 files changed, 17 deletions
It allows per-net client operations right after device's successful
start.
Vhost-vdpa net will use it to add the CVQ buffers to restore the device
status.
Signed-off-by: Eugenio Pérez
---
include/net/net.h | 2 ++
hw/net/vhost_net.c | 7 +++
2 files changed, 9 insertions(+)
diff --git
This is needed so the destination vdpa device see the same state a the
guest set in the source.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 61
1 file changed, 61 insertions(+)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index
So we can reuse to inject state messages.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 74 ++--
1 file changed, 47 insertions(+), 27 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 6abad276a6..1b82ac2e07 100644
--- a/net
It was easier to allow vhost_svq_add to handle the memory. Now that we
will allow qemu to add elements to a SVQ without the guest's knowledge,
it's better to handle it in the caller.
Signed-off-by: Eugenio Pérez
---
hw/virtio/vhost-shadow-virtqueue.c | 10 --
1 file changed, 4
So its generic enough to accept any out sg buffer and we can inject
NIC state messages.
Signed-off-by: Eugenio Pérez
---
net/vhost-vdpa.c | 29 +++--
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 1b82ac2e07
501 - 600 of 1363 matches
Mail list logo