On 1/16/25 12:02 PM, Eugenio Perez Martin wrote:
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote:
Removes the range check portion in vhost_iova_tree_map_alloc.
The previous patch decoupled the IOVA allocator from adding mappings to
the IOVA->HVA tree (now a partial SVQ IOVA->HV
On 1/16/25 2:29 PM, Eugenio Perez Martin wrote:
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote:
Propagates the GPAs (in_xlat_addr/out_xlat_addr) of a VirtQueueElement
to vhost_svq_translate_addr() to translate to IOVAs via GPA->IOVA tree
when descriptors are backed by guest mem
On 1/21/25 12:25 PM, Eugenio Perez Martin wrote:
On Tue, Jan 21, 2025 at 3:53 PM Jonah Palmer wrote:
On 1/16/25 11:44 AM, Eugenio Perez Martin wrote:
On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote:
Decouples the IOVA allocator from the full IOVA->HVA tree to support a
SVQ I
to address this issue found in [2].
[1]
https://lore.kernel.org/qemu-devel/20240410100345.389462-1-epere...@redhat.com
[2]
https://lore.kernel.org/qemu-devel/20240201180924.487579-1-epere...@redhat.com
Jonah Palmer (5):
vhost-vdpa: Decouple the IOVA allocator
vhost-iova-tree: Remove range chec
& host-only memory mappings.
A new API function vhost_iova_tree_insert() is also created for adding
IOVA->HVA mappings into the SVQ IOVA->HVA tree, since the allocator is
no longer doing that.
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-iova-tree.c | 35 ++
ly return an IOVA associated with
the wrong intended GPA.
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-shadow-virtqueue.c | 49 ++
1 file changed, 37 insertions(+), 12 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
The next patches will implement a method to determine if an incomming
address for translation is backed by guest or host-only memory.
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-iova-tree.c | 50 +
hw/virtio/vhost-iova-tree.h | 4 +++
hw/virtio/vhost-vdpa.c
or the IOVA-only mappings, so this check is no longer
needed.
This check was moved to vhost_iova_tree_insert in the previous patch
since that function handles adding IOVA->HVA mappings to the SVQ
IOVA->HVA tree.
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-iova-tree.c | 3 +--
1 fil
to
multiple buffers, not breaking devices using aliased mapping, etc.).
Since the translation is only done once inside the DMA API alongside
virtqueue_pop(), the cost should be minimal.
Signed-off-by: Jonah Palmer
---
hw/display/virtio-gpu.c | 5 ++--
hw/hyperv/vmbus.c |
secs to 2.0949.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
--
v2:
Move the memory listener registration to vhost_vdpa_set_owner function.
In case of hotplug the vdpa device, the memory is already set up, and
leaving memory listener register call in the init function made maps
anymore, please refer to the previous one to know the
series history.
This series is based on [2], it must be applied after it.
[Jonah Palmer]
This series was rebased after [3] was pulled in, as [3] was a prerequisite
fix for this series.
v3:
---
* Rebase
v2:
---
* Move the memory listener
From: Eugenio Pérez
It will be used directly by vhost_vdpa_init.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 60 +-
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
tree is
recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start
if needed, so old behavior is kept.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
net/vhost-vdpa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/vhost-vdpa.c b/net/vhost
From: Eugenio Pérez
Check if the listener has been registered or not, so it needs to be
registered again at start.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7 ++-
include/hw/virtio/vhost-vdpa.h | 6 ++
2 files changed, 12
: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 79224d18d8..939a5a28a1 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -636,6 +636,12 @@ static int
also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.
Suggested-by: Si-Wei Liu
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
include/hw/virtio/vhost-vdpa.h | 16 ++-
net/vhost-vdpa.c
ation to this
vhost_vdpa_init function. When the listener is registered it is added
to an embedded linked list, so setting its members again will cause
memory corruption to the linked list node.
Do the right thing and only set it in the first vdpa device.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Pa
sed.
GPAs are unique in the guest's address space, ensuring unambiguous IOVA
translations. This avoids the issue where different GPAs map to the same
HVA, causing the original HVA->IOVA translation to potentially return an
IOVA associated with the wrong intended GPA.
Signed-off-by: Jonah Pa
;IOVA
trees.
Signed-off-by: Jonah Palmer
Acked-by: Eugenio Pérez
Tested-by: Lei Yang
---
hw/virtio/vhost-iova-tree.c | 26 --
hw/virtio/vhost-iova-tree.h | 3 ++-
hw/virtio/vhost-vdpa.c | 29 +
net/vhost-vdpa.c| 10 +++
gh RAMBlocks when we know the HVA is backed by
guest memory.
* Slight rewording of function names.
RFC v1:
---
* Alternative approach of [1].
* First attempt to address this issue found in [2].
[1]
https://lore.kernel.org/qemu-devel/20240410100345.389462-1-epere...@redhat.com
[2]
https:/
Minor update to some of the documentation / comments in
hw/virtio/vhost-iova-tree.c.
Signed-off-by: Jonah Palmer
Reviewed-by: Eugenio Pérez
Tested-by: Lei Yang
---
hw/virtio/vhost-iova-tree.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw
: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 6b242ca56a..e9826ede2c 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -634,6 +634,12 @@ static int
ation to this
vhost_vdpa_init function. When the listener is registered it is added
to an embedded linked list, so setting its members again will cause
memory corruption to the linked list node.
Do the right thing and only set it in the first vdpa device.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Pa
secs to 2.0949.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
v3:
---
Move memory listener unregistration from vhost_vdpa_reset_status to
vhost_vdpa_reset_device. By unregistering the listener here, we can
guarantee that every reset leaves the device in an expected state.
Also remove
anymore, please refer to the previous one to know the
series history.
This series is based on [2], it must be applied after it.
[Jonah Palmer]
This series was rebased after [3] was pulled in, as [3] was a prerequisite
fix for this series.
v4:
---
* Add memory listener unregistration to
also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.
Suggested-by: Si-Wei Liu
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
include/hw/virtio/vhost-vdpa.h | 16 ++-
net/vhost-vdpa.c
From: Eugenio Pérez
Check if the listener has been registered or not, so it needs to be
registered again at start.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7 ++-
include/hw/virtio/vhost-vdpa.h | 6 ++
2 files changed, 12
From: Eugenio Pérez
It will be used directly by vhost_vdpa_init.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 60 +-
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw
tree is
recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start
if needed, so old behavior is kept.
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
net/vhost-vdpa.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/vhost-vdpa.c b/net/vhost
On 5/15/25 1:36 PM, Si-Wei Liu wrote:
On 5/14/2025 10:42 PM, Michael S. Tsirkin wrote:
On Wed, May 07, 2025 at 02:46:47PM -0400, Jonah Palmer wrote:
From: Eugenio Pérez
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the
On 5/14/25 11:49 AM, Eugenio Perez Martin wrote:
On Wed, May 7, 2025 at 8:47 PM Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the workload is resumed at the
tree is
recreated by vhost_vdpa_net_data_start_first or vhost_vdpa_net_cvq_start
if needed, so old behavior is kept.
Tested-by: Lei Yang
Reviewed-by: Si-Wei Liu
Acked-by: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
net/vhost-vdpa.c | 4 +++-
1 file changed, 3
nt)
- 128G VM: 14.72s -> 5.83s (-8.89s, ~60% improvement)
Tested-by: Lei Yang
Reviewed-by: Si-Wei Liu
Acked-by: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
v4:
Updated performance measurements in the commit log.
v3:
Move memory listener unr
also consolidating the two creation points: the first
data vq in case of SVQ active and CVQ start in case only CVQ uses it.
Tested-by: Lei Yang
Reviewed-by: Si-Wei Liu
Acked-by: Jason Wang
Suggested-by: Si-Wei Liu
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
include/hw/virtio
Acked-by: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 6b242ca56a..e9826ede2c 100644
--- a/hw/virtio/vhost-vdpa.c
y: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
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 450f68f117..de834f2ebd 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio
ries [1]. As the title does not
reflect the changes anymore, please refer to the previous one to know the
series history.
This series is based on [2] and has already been merged.
[Jonah Palmer]
This series was rebased after [3] was pulled in, as [3] was a prerequisite
fix for this series.
From: Eugenio Pérez
Check if the listener has been registered or not, so it needs to be
registered again at start.
Tested-by: Lei Yang
Reviewed-by: Si-Wei Liu
Acked-by: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 7
From: Eugenio Pérez
It will be used directly by vhost_vdpa_init.
Tested-by: Lei Yang
Reviewed-by: Si-Wei Liu
Acked-by: Jason Wang
Signed-off-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/virtio/vhost-vdpa.c | 60 +-
1 file changed, 30
25 at 2:47 AM Jonah Palmer wrote:
Current memory operations like pinning may take a lot of time at the
destination. Currently they are done after the source of the migration is
stopped, and before the workload is resumed at the destination. This is a
period where neigher traffic can flow, nor t
On 6/26/25 8:08 AM, Markus Armbruster wrote:
Jonah Palmer writes:
On 6/2/25 4:29 AM, Markus Armbruster wrote:
Butterfingers... let's try this again.
Markus Armbruster writes:
Si-Wei Liu writes:
On 5/26/2025 2:16 AM, Markus Armbruster wrote:
Si-Wei Liu writes:
On 5/15/2025
On 7/4/25 11:00 AM, Markus Armbruster wrote:
Jonah Palmer writes:
On 6/26/25 8:08 AM, Markus Armbruster wrote:
[...]
Apologies for the delay in getting back to you. I just wanted to be thorough
and answer everything as accurately and clearly as possible.
Before these patches
On 7/8/25 4:17 AM, Markus Armbruster wrote:
Jonah Palmer writes:
On 7/4/25 11:00 AM, Markus Armbruster wrote:
Jonah Palmer writes:
[...]
So, total time increases: early pinning (before main loop) takes more
time than we save pinning (in the main loop). Correct?
Correct. We only
states for the initial sending of the
device state.
After the iterative migration portion is finished and the source is
stopped, we still assert that vhost is also stopped.
Signed-off-by: Jonah Palmer
---
hw/net/virtio-net.c| 23 ++-
include/hw/virtio/virtio.h | 1 +
2
ot;arguments": {
"capabilities": [
{ "capability": "virtio-iterative", "state": true }
]
}
}
Signed-off-by: Jonah Palmer
---
migration/savevm.c | 1 +
qapi/migration.json | 7 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/m
used when registering a virtio-net device's
SaveVMHandlers hooks. This is to create unique IDs in the case of
multiple virtio-net devices.
Signed-off-by: Jonah Palmer
---
hw/net/virtio-net.c | 85 +
1 file changed, 85 insertions(+)
diff --git a/h
could improve upon this by skipping the second
vmstate_save/load_state calls (during the stop-and-copy phase) and
instead only send deltas right before/after the source is stopped.
Signed-off-by: Jonah Palmer
---
hw/net/virtio-net.c| 37 ++
include/hw/
This reordering makes the vmstate_virtio_net available for use by future
virtio-net SaveVMHandlers hooks that will need to be placed before
virtio_net_device_realize.
Signed-off-by: Jonah Palmer
---
hw/net/virtio-net.c | 90 ++---
1 file changed, 45
load_state
call "warming up" pages in memory such that, when it's called a second
time during the stop-and-copy phase, allocation and page-fault latencies
are reduced.
---
Comments, suggestions, etc. are welcome here.
Jonah Palmer (6):
migration: Add virtio-ite
On 7/23/25 1:51 AM, Jason Wang wrote:
On Tue, Jul 22, 2025 at 8:41 PM Jonah Palmer wrote:
This series is an RFC initial implementation of iterative live
migration for virtio-net devices.
The main motivation behind implementing iterative migration for
virtio-net devices is to start on
onizes 'steps' and index
increments.
We also add a defensive sanity check against malicious or invalid
descriptor counts to avoid a potential infinite loop and DoS.
Fixes: b44135daa372 ("virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER
support")
Reported-b
On 7/23/25 2:51 AM, Michael S. Tsirkin wrote:
On Tue, Jul 22, 2025 at 12:41:25PM +, Jonah Palmer wrote:
Lays out the initial groundwork for iteratively migrating the state of a
virtio-net device, starting with its vmstate (via vmstate_save_state &
vmstate_load_state).
The original
On 7/28/25 11:30 AM, Eugenio Perez Martin wrote:
On Tue, Jul 22, 2025 at 2:41 PM Jonah Palmer wrote:
Iterative live migration for virtio-net sends an initial
VMStateDescription while the source is still active. Because data
continues to flow for virtio-net, the guest's avail
On 7/28/25 3:35 AM, Jason Wang wrote:
On Mon, Jul 28, 2025 at 3:09 PM Jason Wang wrote:
On Fri, Jul 25, 2025 at 5:33 PM Michael S. Tsirkin wrote:
On Thu, Jul 24, 2025 at 05:59:20PM -0400, Jonah Palmer wrote:
On 7/23/25 1:51 AM, Jason Wang wrote:
On Tue, Jul 22, 2025 at 8:41 PM Jonah
On 7/25/25 5:31 AM, Michael S. Tsirkin wrote:
On Thu, Jul 24, 2025 at 10:45:34AM -0400, Jonah Palmer wrote:
On 7/23/25 2:51 AM, Michael S. Tsirkin wrote:
On Tue, Jul 22, 2025 at 12:41:25PM +, Jonah Palmer wrote:
Lays out the initial groundwork for iteratively migrating the state of a
05:59:20PM -0400, Jonah Palmer wrote:
On 7/23/25 1:51 AM, Jason Wang wrote:
On Tue, Jul 22, 2025 at 8:41 PM Jonah Palmer wrote:
This series is an RFC initial implementation of iterative live
migration for virtio-net devices.
The main motivation behind implementing iterative migration for
not support it.
Acked-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/block/vhost-user-blk.c| 1 +
hw/net/vhost_net.c | 2 ++
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c| 1 +
hw/virtio/vhost-user-fs.c| 1 +
hw/virtio/vhost-user-vsock.c | 1 +
net
not support it.
Tested-by: Lei Yang
Acked-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/block/vhost-user-blk.c| 1 +
hw/net/vhost_net.c | 2 ++
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c| 1 +
hw/virtio/vhost-user-fs.c| 1 +
hw/virtio/vhost-user
not support it.
Tested-by: Lei Yang
Acked-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/block/vhost-user-blk.c| 1 +
hw/net/vhost_net.c | 2 ++
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c| 1 +
hw/virtio/vhost-user-fs.c| 1 +
hw/virtio/vhost-user
not support it.
Acked-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/block/vhost-user-blk.c| 1 +
hw/net/vhost_net.c | 2 ++
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c| 1 +
hw/virtio/vhost-user-fs.c| 1 +
hw/virtio/vhost-user-vsock.c | 1 +
net
not support it.
Acked-by: Eugenio Pérez
Signed-off-by: Jonah Palmer
---
hw/block/vhost-user-blk.c| 1 +
hw/net/vhost_net.c | 2 ++
hw/scsi/vhost-scsi.c | 1 +
hw/scsi/vhost-user-scsi.c| 1 +
hw/virtio/vhost-user-fs.c| 1 +
hw/virtio/vhost-user-vsock.c | 1 +
net
ent during the iterative live migration process.
Signed-off-by: Jonah Palmer
---
hw/net/virtio-net.c| 13 +
hw/virtio/virtio.c | 32
include/hw/virtio/virtio.h | 6 ++
3 files changed, 43 insertions(+), 8 deletions(-)
diff --gi
301 - 362 of 362 matches
Mail list logo