Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-07-09 Thread Jonah Palmer
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

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-07-07 Thread Jonah Palmer
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

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-07-02 Thread Jonah Palmer
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

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-06-06 Thread Jonah Palmer
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

[PATCH v5 2/7] vdpa: reorder vhost_vdpa_set_backend_cap

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 4/7] vdpa: add listener_registered

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 0/7] Move memory listener register to vhost_vdpa_init

2025-05-22 Thread Jonah Palmer
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.

[PATCH v5 3/7] vdpa: set backend capabilities at vhost_vdpa_init

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 5/7] vdpa: reorder listener assignment

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 6/7] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 7/7] vdpa: move memory listener register to vhost_vdpa_init

2025-05-22 Thread Jonah Palmer
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

[PATCH v5 1/7] vdpa: check for iova tree initialized at net_client_start

2025-05-22 Thread Jonah Palmer
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

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-20 Thread Jonah Palmer
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

Re: [PATCH v4 7/7] vdpa: move memory listener register to vhost_vdpa_init

2025-05-20 Thread Jonah Palmer
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

[PATCH v4 1/7] vdpa: check for iova tree initialized at net_client_start

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 7/7] vdpa: move memory listener register to vhost_vdpa_init

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 4/7] vdpa: add listener_registered

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 2/7] vdpa: reorder vhost_vdpa_set_backend_cap

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 6/7] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 5/7] vdpa: reorder listener assignment

2025-05-07 Thread Jonah Palmer
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

[PATCH v4 3/7] vdpa: set backend capabilities at vhost_vdpa_init

2025-05-07 Thread Jonah Palmer
: 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

[PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-05-07 Thread Jonah Palmer
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

[PATCH v3 6/7] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2025-03-15 Thread Jonah Palmer
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

[PATCH v3 5/7] vdpa: reorder listener assignment

2025-03-14 Thread Jonah Palmer
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

[PATCH v3 7/7] vdpa: move memory listener register to vhost_vdpa_init

2025-03-14 Thread Jonah Palmer
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

[PATCH v3 4/7] vdpa: add listener_registered

2025-03-14 Thread Jonah Palmer
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

[PATCH v3 3/7] vdpa: set backend capabilities at vhost_vdpa_init

2025-03-14 Thread Jonah Palmer
: 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

[PATCH v3 1/7] vdpa: check for iova tree initialized at net_client_start

2025-03-14 Thread Jonah Palmer
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

[PATCH v3 2/7] vdpa: reorder vhost_vdpa_set_backend_cap

2025-03-14 Thread Jonah Palmer
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

[PATCH v3 0/7] Move memory listener register to vhost_vdpa_init

2025-03-14 Thread Jonah Palmer
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

[PATCH v2 1/3] vhost-iova-tree: Implement an IOVA-only tree

2025-02-17 Thread Jonah Palmer
;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 +++

[PATCH v2 2/3] vhost-iova-tree, svq: Implement GPA->IOVA & partial IOVA->HVA trees

2025-02-17 Thread Jonah Palmer
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

[PATCH v2 0/3] Handling aliased guest memory maps in vhost-vDPA SVQs

2025-02-17 Thread Jonah Palmer
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:/

[PATCH v2 3/3] vhost-iova-tree: Update documentation

2025-02-17 Thread Jonah Palmer
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

[PATCH 3/4] svq: Support translations via GPAs in vhost_svq_translate_addr

2025-02-05 Thread Jonah Palmer
he issue where different GPAs map to the same HVA, causing the HVA->IOVA translation to potentially return an IOVA associated with the wrong intended GPA. For descriptors backed by host-only memory, the existing partial SVQ IOVA->HVA tree is used. Signed-off-by: Jonah Palmer --- hw/virti

[PATCH 1/4] vhost-iova-tree: Implement an IOVA-only tree

2025-02-05 Thread Jonah Palmer
;IOVA trees. Signed-off-by: Jonah Palmer --- 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 -- 4 files changed, 51 insertions(+), 17 delet

[PATCH 2/4] vhost-iova-tree: Implement GPA->IOVA & partial IOVA->HVA trees

2025-02-05 Thread Jonah Palmer
, this method will be improved by utilizing the in_addr and out_addr members of a VirtQueueElement to determine if an incoming address for translation is backed by guest or host-only memory. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c| 67 ++ hw/vir

[PATCH 4/4] vhost-iova-tree: Update documentation

2025-02-05 Thread Jonah Palmer
Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-iova-tree.c b/hw/virtio/vhost-iova-tree.c index 9d2d6a7af2..fa4147b773 100644 --- a/hw/virtio/vhost-iova-tree.c +++ b/hw/virtio

[PATCH 0/4] Handling aliased guest memory maps in vhost-vDPA SVQs

2025-02-05 Thread Jonah Palmer
l.org/qemu-devel/20240410100345.389462-1-epere...@redhat.com [2] https://lore.kernel.org/qemu-devel/20240201180924.487579-1-epere...@redhat.com Jonah Palmer (4): vhost-iova-tree: Implement an IOVA-only tree vhost-iova-tree: Implement GPA->IOVA & partial IOVA->HVA trees svq:

Re: [RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-22 Thread Jonah Palmer
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

Re: [RFC v3 5/5] svq: Support translations via GPAs in vhost_svq_translate_addr

2025-01-21 Thread Jonah Palmer
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

Re: [RFC v3 3/5] vhost-vdpa: Implement the GPA->IOVA tree

2025-01-21 Thread Jonah Palmer
On 1/16/25 2:00 PM, Eugenio Perez Martin wrote: On Fri, Jan 10, 2025 at 6:09 PM Jonah Palmer wrote: Implements the GPA->IOVA tree for handling mapping and unmapping for guest memory. This, alongside the SVQ IOVA->HVA tree & IOVA-only tree implemented in the previous patches, al

Re: [RFC v3 2/5] vhost-iova-tree: Remove range check for IOVA allocator

2025-01-21 Thread Jonah Palmer
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

Re: [RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-21 Thread Jonah Palmer
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 IOVA->HVA tree for host-only memory mappings. The IOVA allocator still allocates an IOVA range but instea

[RFC v3 4/5] virtio: add in_xlat_addr & out_xlat_addr VirtQueueElement members

2025-01-10 Thread Jonah Palmer
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 |

[RFC v3 2/5] vhost-iova-tree: Remove range check for IOVA allocator

2025-01-10 Thread Jonah Palmer
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

[RFC v3 3/5] vhost-vdpa: Implement the GPA->IOVA tree

2025-01-10 Thread Jonah Palmer
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

[RFC v3 5/5] svq: Support translations via GPAs in vhost_svq_translate_addr

2025-01-10 Thread Jonah Palmer
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

[RFC v3 1/5] vhost-vdpa: Decouple the IOVA allocator

2025-01-10 Thread Jonah Palmer
& 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 ++

[RFC v3 0/5] Handling aliased guest memory maps in vhost-vDPA SVQs

2025-01-10 Thread Jonah Palmer
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

Re: [PATCH v2 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
On 12/23/24 11:33 AM, Eugenio Perez Martin wrote: On Fri, Dec 20, 2024 at 10:02 PM Michael Tokarev wrote: 12.09.2024 19:54, Eugenio Pérez wrote: Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, al

[PATCH v3 0/2] Move net backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
Commit a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") effectively delayed the backend cleanup, allowing the frontend or the guest to access it resources as long as the frontend NIC is still visible to the guest. However it does not clean up the resou

[PATCH v3 2/2] net: move backend cleanup to NIC cleanup

2025-01-06 Thread Jonah Palmer
s finished. Move the cleanup from qemu_cleanup to the NIC deletion and to net_cleanup. Fixes: a0d7215e33 ("vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present") Reported-by: Lei Yang Signed-off-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- n

[PATCH v3 1/2] net: parameterize the removing client from nc list

2025-01-06 Thread Jonah Palmer
From: Eugenio Pérez This change is used in later commits so we can avoid the removal of the netclient if it is delayed. No functional change intended. Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez --- net/net.c | 13 - 1 file changed, 8 insertions(+),

Re: [PATCH] qmp: update vhost-user protocol feature maps

2025-01-06 Thread Jonah Palmer
On 12/22/24 4:13 AM, Michael Tokarev wrote: 16.12.2024 20:30, Jonah Palmer wrote: ... Signed-off-by: Jonah Palmer Should this be a Reviewed-by instead? Thanks, /mjt Oof, yes, it should've been. My apologies, I was on vacation and only saw this just now.

Re: [PATCH] qmp: update vhost-user protocol feature maps

2024-12-16 Thread Jonah Palmer
"VHOST_USER_PROTOCOL_F_DEVICE_STATE: Backend device state transfer " + "supported"), { -1, "" } }; Signed-off-by: Jonah Palmer --- Jonah

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-08 Thread Jonah Palmer
On 10/8/24 2:51 AM, Eugenio Perez Martin wrote: On Tue, Oct 8, 2024 at 2:14 AM Si-Wei Liu wrote: On 10/7/2024 6:51 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-07 Thread Jonah Palmer
On 10/7/24 9:51 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 8:48 PM Jonah Palmer wrote: On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: Implements the IOVA->GPA tree for handling mapping, unmapping, and translations

Re: [RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
On 10/4/24 11:17 AM, Eugenio Perez Martin wrote: On Fri, Oct 4, 2024 at 2:45 PM Jonah Palmer wrote: Implements the IOVA->GPA tree for handling mapping, unmapping, and translations for guest memory regions. When the guest has overlapping memory regions, an HVA to IOVA translation

[RFC v2 0/2] Handling aliased guest memory maps in vhost-vDPA SVQs

2024-10-04 Thread Jonah Palmer
C 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://lore.kernel.org/qemu-devel/20240201180924.487579-1-epere...@redhat.com Jonah Palmer (2): vhost

[RFC v2 2/2] vhost-svq: Translate guest-backed memory with IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
by guest memory can lead to multiple different GPAs. In other words, we may translate to an incorrect IOVA if we search the IOVA->HVA tree using an HVA that's backed by guest memory. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-shadow-virtqueue.c | 61 -- 1

[RFC v2 1/2] vhost-vdpa: Implement IOVA->GPA tree

2024-10-04 Thread Jonah Palmer
tained (overlapping) in another HVA range in the IOVA->HVA tree. By creating an IOVA->GPA tree, we can use GPAs to translate and find the correct IOVA for guest memory regions. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 78 +++-- hw/virtio/vhost

Re: [RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-30 Thread Jonah Palmer
On 8/29/24 12:55 PM, Eugenio Perez Martin wrote: On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: Implements a GPA->IOVA and IOVA->SVQ HVA tree for handling mapping, unmapping, and translations for guest and host-only memory, respectively. By splitting up a full IOVA->

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-30 Thread Jonah Palmer
On 8/30/24 4:05 AM, Eugenio Perez Martin wrote: On Fri, Aug 30, 2024 at 6:20 AM Si-Wei Liu wrote: On 8/29/2024 9:53 AM, Eugenio Perez Martin wrote: On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: Decouples the IOVA allocator from the IOVA->HVA tree and instead adds the alloca

[RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-21 Thread Jonah Palmer
nction vhost_iova_tree_insert() is also created to add a IOVA->HVA mapping into the IOVA->HVA tree. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c | 38 - hw/virtio/vhost-iova-tree.h | 1 + hw/virtio/vhost-vdpa

[RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-21 Thread Jonah Palmer
eding to iterate over some (if not all) RAMBlock structures and then searching either the GPA->IOVA tree or the IOVA->SVQ HVA tree. Optimizations to improve performance in this area should be revisited at some point. Signed-off-by: Jonah Palmer --- hw/virtio/vhost-iova-tree.c| 53 +

[RFC 0/2] Handling aliased guest memory maps in vhost-vDPA SVQs

2024-08-21 Thread Jonah Palmer
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 (2): vhost-vdpa: Decouple the IOVA allocator vhost-vdpa: Implement GPA->IOVA & IOVA->S

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-31 Thread Jonah Palmer
On 7/31/24 5:56 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 2:32 PM Jonah Palmer wrote: On 7/30/24 7:00 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin wrote: On Wed, Jul 24, 2024

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-30 Thread Jonah Palmer
On 7/30/24 7:00 AM, Eugenio Perez Martin wrote: On Tue, Jul 30, 2024 at 10:48 AM Jason Wang wrote: On Mon, Jul 29, 2024 at 6:05 PM Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 2:20 PM, Eugenio Perez Martin wrote: On Mon, Jul 29, 2024 at 7:50 PM Jonah Palmer wrote: On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-29 Thread Jonah Palmer
On 7/29/24 6:04 AM, Eugenio Perez Martin wrote: On Wed, Jul 24, 2024 at 7:00 PM Jonah Palmer wrote: On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM

Re: [RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-07-24 Thread Jonah Palmer
On 5/13/24 11:56 PM, Jason Wang wrote: On Mon, May 13, 2024 at 5:58 PM Eugenio Perez Martin wrote: On Mon, May 13, 2024 at 10:28 AM Jason Wang wrote: On Mon, May 13, 2024 at 2:28 PM Eugenio Perez Martin wrote: On Sat, May 11, 2024 at 6:07 AM Jason Wang wrote: On Fri, May 10, 2024 a

[PATCH v4 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
to the descriptor ring last so the guest doesn't see any invalid descriptors. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Palmer --- Several fixes here for the split VQ case: - Ensure all previous write operations to buffers are completed before updating the us

[PATCH v4 1/6] virtio: Add bool to VirtQueueElement

2024-07-10 Thread Jonah Palmer
eviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 7512afbc84..fdc827f82e 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -

[PATCH v4 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-07-10 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1

[PATCH v4 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- last_avail_idx can grow well beyond vring.num, so for this reason we need t

[PATCH v4 5/6] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-07-10 Thread Jonah Palmer via
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

[PATCH v4 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
virtqueue_ordered_fill. Add test results to CV. v2: Make 'in_order_filled' more descriptive. Change 'j' to more descriptive var name in virtqueue_split_pop. Use more definitive search conditional in virtqueue_ordered_fill. Avoid code duplicat

[PATCH v4 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-07-10 Thread Jonah Palmer
elems array. By marking the element as filled, it will indicate that this element has been processed and is ready to be flushed, so long as the element is in-order. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 44 +++- 1

Re: [PATCH v3 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-06-24 Thread Jonah Palmer
On 6/20/24 2:40 PM, Eugenio Perez Martin wrote: On Thu, Jun 20, 2024 at 7:56 PM Jonah Palmer wrote: The goal of these patches is to add support to a variety of virtio and vhost devices for the VIRTIO_F_IN_ORDER transport feature. This feature indicates that all buffers are used by the

[PATCH v3 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-06-20 Thread Jonah Palmer
elems array. By marking the element as filled, it will indicate that this element has been processed and is ready to be flushed, so long as the element is in-order. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 44 +++- 1

[PATCH v3 5/6] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-06-20 Thread Jonah Palmer via
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

[PATCH v3 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-06-20 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 4 +++- 1

[PATCH v3 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-06-20 Thread Jonah Palmer
27; to more descriptive var name in virtqueue_split_pop. Use more definitive search conditional in virtqueue_ordered_fill. Avoid code duplication in virtqueue_ordered_flush. v1: Move series from RFC to PATCH for submission. Jonah Palmer (6): virtio: Add bool to VirtQueueElement virtio: virtqueue_pop -

[PATCH v3 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-06-20 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Reviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 13 + 1 file changed, 13 insertions(+) diff

[PATCH v3 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-06-20 Thread Jonah Palmer
to the descriptor ring last so the guest doesn't see any invalid descriptors. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git

[PATCH v3 1/6] virtio: Add bool to VirtQueueElement

2024-06-20 Thread Jonah Palmer
eviewed-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 7d5ffdc145..88e70c1ae1 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -

Re: [PATCH v2 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-05-23 Thread Jonah Palmer
On 5/23/24 6:47 AM, Eugenio Perez Martin wrote: On Thu, May 23, 2024 at 12:30 PM Jonah Palmer wrote: On 5/22/24 12:07 PM, Eugenio Perez Martin wrote: On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation. The goal

Re: [PATCH v2 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-05-23 Thread Jonah Palmer
On 5/22/24 12:07 PM, Eugenio Perez Martin wrote: On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation. The goal of the virtqueue_ordered_fill operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to search

Re: [PATCH v2 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-05-23 Thread Jonah Palmer
On 5/22/24 11:45 AM, Eugenio Perez Martin wrote: On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and virtqueue_packed_pop. VirtQueueElements popped from the available/descritpor ring are added to the VirtQueue's used_

Re: [PATCH v2 1/6] virtio: Add bool to VirtQueueElement

2024-05-23 Thread Jonah Palmer
On 5/22/24 11:44 AM, Eugenio Perez Martin wrote: On Mon, May 20, 2024 at 3:01 PM Jonah Palmer wrote: Add the boolean 'in_order_filled' member to the VirtQueueElement structure. The use of this boolean will signify whether the element has been processed and is ready to be flushe

[PATCH v2 5/6] vhost, vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits

2024-05-20 Thread Jonah Palmer via
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

[PATCH v2 2/6] virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support

2024-05-20 Thread Jonah Palmer
ively. This will allow us to keep track of the current order, what elements have been written, as well as an element's essential data after being processed. Tested-by: Lei Yang Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 17 - 1 file changed, 16 insertions(+), 1 deletio

[PATCH v2 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-05-20 Thread Jonah Palmer
to the descriptor ring last so the guest doesn't see any invalid descriptors. If any elements were written, the used_idx is updated. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 66 +- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git

[PATCH v2 0/6] virtio,vhost: Add VIRTIO_F_IN_ORDER support

2024-05-20 Thread Jonah Palmer
rtqueue_ordered_flush). --- v2: Make 'in_order_filled' more descriptive. Change 'j' to more descriptive var name in virtqueue_split_pop. Use more definitive search conditional in virtqueue_ordered_fill. Avoid code duplication in virtqueue_ordered_flush. v1: Move s

[PATCH v2 6/6] virtio: Add VIRTIO_F_IN_ORDER property definition

2024-05-20 Thread Jonah Palmer
Extend the virtio device property definitions to include the VIRTIO_F_IN_ORDER feature. The default state of this feature is disabled, allowing it to be explicitly enabled where it's supported. Tested-by: Lei Yang Acked-by: Eugenio Pérez Signed-off-by: Jonah Palmer --- include/hw/v

[PATCH v2 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-05-20 Thread Jonah Palmer
elems array. By marking the element as filled, it will indicate that this element has been processed and is ready to be flushed, so long as the element is in-order. Signed-off-by: Jonah Palmer --- hw/virtio/virtio.c | 36 +++- 1 file changed, 35 insertions(+), 1 del

[PATCH v2 1/6] virtio: Add bool to VirtQueueElement

2024-05-20 Thread Jonah Palmer
ed-by: Lei Yang Signed-off-by: Jonah Palmer --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 7d5ffdc145..88e70c1ae1 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -

Re: [PATCH 4/6] virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support

2024-05-10 Thread Jonah Palmer
On 5/10/24 3:48 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:06 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for virtqueue_flush operations. The goal of the virtqueue_flush operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to

Re: [PATCH 3/6] virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support

2024-05-10 Thread Jonah Palmer
On 5/9/24 10:08 AM, Eugenio Perez Martin wrote: On Mon, May 6, 2024 at 5:05 PM Jonah Palmer wrote: Add VIRTIO_F_IN_ORDER feature support for virtqueue_fill operations. The goal of the virtqueue_fill operation when the VIRTIO_F_IN_ORDER feature has been negotiated is to search for this now

  1   2   3   4   >