{"id":2219530,"url":"http://patchwork.ozlabs.org/api/patches/2219530/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260403093411.1431802-1-vsementsov@yandex-team.ru/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260403093411.1431802-1-vsementsov@yandex-team.ru>","list_archive_url":null,"date":"2026-04-03T09:34:11","name":"vhost-user: fix wrong index for postcopy_client_bases","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"fe7488247993b7cee32e6fbdfa1812edbefd7d4c","submitter":{"id":84116,"url":"http://patchwork.ozlabs.org/api/people/84116/?format=json","name":"Vladimir Sementsov-Ogievskiy","email":"vsementsov@yandex-team.ru"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260403093411.1431802-1-vsementsov@yandex-team.ru/mbox/","series":[{"id":498609,"url":"http://patchwork.ozlabs.org/api/series/498609/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=498609","date":"2026-04-03T09:34:11","name":"vhost-user: fix wrong index for postcopy_client_bases","version":1,"mbox":"http://patchwork.ozlabs.org/series/498609/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2219530/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219530/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=yandex-team.ru header.i=@yandex-team.ru\n header.a=rsa-sha256 header.s=default header.b=kDqWZDiO;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)","mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net;\n dkim=pass header.i=@yandex-team.ru"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fnD8d6QwGz1yCt\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 20:34:57 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w8av4-00005R-2w; Fri, 03 Apr 2026 05:34:26 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1w8av1-0008WI-Aw\n for qemu-devel@nongnu.org; Fri, 03 Apr 2026 05:34:23 -0400","from forwardcorp1a.mail.yandex.net ([178.154.239.72])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vsementsov@yandex-team.ru>)\n id 1w8auz-00011H-ED\n for qemu-devel@nongnu.org; Fri, 03 Apr 2026 05:34:23 -0400","from mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net\n (mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net\n [IPv6:2a02:6b8:c2d:3530:0:640:eca4:0])\n by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id 1162FC015D;\n Fri, 03 Apr 2026 12:34:14 +0300 (MSK)","from vsementsov-lin (unknown [2a02:6bf:8080:d4c::1:2b])\n by mail-nwsmtp-smtp-corp-main-83.vla.yp-c.yandex.net (smtpcorp/Yandex) with\n ESMTPSA id CYZqeY0LOuQ0-7Xt7BEZM; Fri, 03 Apr 2026 12:34:13 +0300"],"X-Yandex-Fwd":"1","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru;\n s=default; t=1775208853;\n bh=MNFYlq9kyki7CZl3zzwt4Cq7WuPKpPHoIexmCx95eis=;\n h=Message-ID:Date:Cc:Subject:To:From;\n b=kDqWZDiOWBH6w8vABLf+Ar0LLWbMReoW2q1ulKFJygZXCalwPERWU1JPayppUfALB\n upNJ7mh3QpH8ww2COrOIGrnw6FBc00lAAT6CTtG2ZCJ+R8OPufFXnhJPLDT6PRJl1F\n tV1Mi96gpsWDKhU9xiI8KChSlodI69voSx350LWo=","From":"Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>","To":"mst@redhat.com","Cc":"sgarzare@redhat.com, raphael.norwitz@nutanix.com,\n swapnil.ingle@nutanix.com, peter.turschm@nutanix.com, cui@nutanix.com,\n marcandre.lureau@redhat.com, vsementsov@yandex-team.ru,\n qemu-devel@nongnu.org","Subject":"[PATCH] vhost-user: fix wrong index for postcopy_client_bases","Date":"Fri,  3 Apr 2026 12:34:11 +0300","Message-ID":"<20260403093411.1431802-1-vsementsov@yandex-team.ru>","X-Mailer":"git-send-email 2.52.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=178.154.239.72;\n envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1a.mail.yandex.net","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"u->postcopy_client_bases[i] corresponds to dev->mem->regions[i], not\nto u->shadow_regions[i]. So we should use j-index, following indexation\nof dev->mem->regions.\n\nFixes: f1aeb14b0809e313c7424 \"Transmit vhost-user memory regions individually\"\nSigned-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>\n---\n\nHi all!\n\nHonestly, I don't follow the logic of vhost-user postcopy, but I can't\nbelieve, that the same array should be used in different indexing\nsemantics.\n\n hw/virtio/vhost-user.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c\nindex a8907cca74e..91de08a5128 100644\n--- a/hw/virtio/vhost-user.c\n+++ b/hw/virtio/vhost-user.c\n@@ -602,7 +602,7 @@ static void scrub_shadow_regions(struct vhost_dev *dev,\n                     if (fd > 0) {\n                         u->region_rb_offset[j] = offset;\n                         u->region_rb[j] = mr->ram_block;\n-                        shadow_pcb[j] = u->postcopy_client_bases[i];\n+                        shadow_pcb[j] = u->postcopy_client_bases[j];\n                     } else {\n                         u->region_rb_offset[j] = 0;\n                         u->region_rb[j] = NULL;\n","prefixes":[]}