diff mbox series

[v14,2/4] vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del()

Message ID 20230320161959.650841-3-lulu@redhat.com
State New
Headers show
Series vhost-vdpa: add support for vIOMMU | expand

Commit Message

Cindy Lu March 20, 2023, 4:19 p.m. UTC
In trace_vhost_vdpa_listener_region_del, the value for llend
should change to int128_get64(int128_sub(llend, int128_one()))

Signed-off-by: Cindy Lu <lulu@redhat.com>
---
 hw/virtio/vhost-vdpa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jason Wang March 21, 2023, 2:32 a.m. UTC | #1
On Tue, Mar 21, 2023 at 12:20 AM Cindy Lu <lulu@redhat.com> wrote:
>
> In trace_vhost_vdpa_listener_region_del, the value for llend
> should change to int128_get64(int128_sub(llend, int128_one()))
>
> Signed-off-by: Cindy Lu <lulu@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

Thanks

> ---
>  hw/virtio/vhost-vdpa.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
> index bc6bad23d5..92c2413c76 100644
> --- a/hw/virtio/vhost-vdpa.c
> +++ b/hw/virtio/vhost-vdpa.c
> @@ -288,7 +288,8 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener,
>      iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
>      llend = vhost_vdpa_section_end(section);
>
> -    trace_vhost_vdpa_listener_region_del(v, iova, int128_get64(llend));
> +    trace_vhost_vdpa_listener_region_del(v, iova,
> +        int128_get64(int128_sub(llend, int128_one())));
>
>      if (int128_ge(int128_make64(iova), llend)) {
>          return;
> --
> 2.34.3
>
diff mbox series

Patch

diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index bc6bad23d5..92c2413c76 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -288,7 +288,8 @@  static void vhost_vdpa_listener_region_del(MemoryListener *listener,
     iova = TARGET_PAGE_ALIGN(section->offset_within_address_space);
     llend = vhost_vdpa_section_end(section);
 
-    trace_vhost_vdpa_listener_region_del(v, iova, int128_get64(llend));
+    trace_vhost_vdpa_listener_region_del(v, iova,
+        int128_get64(int128_sub(llend, int128_one())));
 
     if (int128_ge(int128_make64(iova), llend)) {
         return;