From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02656454E9 for ; Tue, 25 Jun 2024 02:01:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F253542788; Tue, 25 Jun 2024 02:01:34 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id AD03D42788 for ; Tue, 25 Jun 2024 02:01:33 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-424a2ad06f1so311655e9.1 for ; Mon, 24 Jun 2024 17:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273693; x=1719878493; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8+kRshVf+hY/uB7HOAh/7blU92UvZ6yaSf60eJL/Ubs=; b=cr9x2AdcWf+Lj4mmMku7vQ6MlIoue1hU9djmF1cSUX/PUhXbeb8tq71Lvn8s/OCCz2 xenrcmYVJVme5TNZ8+bc76H8XHhuuGvAdExJUIhnJU3JyyN+KP4ZBpHnJz+zJRWUVQCW Oe5Ir5WIipyrMphAJsjWJ5C/bTY/6ORgymg6Hr5b2Igcp5wiWWMcWc4nLsQ3YwVlQl4E j5/O2Wo6Z8hxV79+ChHhu2o/zVl/QOkTNzwbjECSD4CyLsliH37EmvrfZL5b8+b+raFj P0OdAWkDt/cSZUzvMiNdz0u1ByMXY112S0qvjvAtuqo+OR5r/81k3OnEPp7zYsh/i8E/ qcpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273693; x=1719878493; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8+kRshVf+hY/uB7HOAh/7blU92UvZ6yaSf60eJL/Ubs=; b=GOM7AYxtT1DrI92BjRwHzUhx7i6hBSbutMx4ASaThelgMn8dy9uemNYTmVEYPL6lAc TzqpkraR2PjvR4hWcuKUuODeqvxrhR49/8xpBq6qdNtEL4JTuJ8gNUf0RFT00/mn0xR6 Wkh/wIHf1I8TRKTNjuoEhaVH9Vbs12otCPDIJrkvfN8UELhlz7gRUZrUYm1yAxoEKzPQ FmQ1fgqcpaaGX1YP4UOiY20zh3fD8OU/wmjbn3m96gAHsv4/huEkyP1hUXK+Y+aB4SXJ o+cueexnygD/g5g5B13f6U510G52Cq9GV53sMYVBrF1+m/yctdpry6Tfd/ugdBgNXsN0 9uog== X-Forwarded-Encrypted: i=1; AJvYcCXD1dSYgYee+DuCOMdGOu6s1vKB5a0SGsEusofd++N/TjYEr1l8S9eJA55XhPdEQOkDLNKKwMIHMQLwFImTq8A= X-Gm-Message-State: AOJu0YzDs+Svh9CHeMqsGxuFZKCtrbSD/afjCPBKDVKP3x3urfuHXqAr d5i5l3hy9MnyjKWyq928/07gfrb4X4XMRVuxV6seqLWDa3XBljEV X-Google-Smtp-Source: AGHT+IHn4bIHdievDfgFCGWeS2bfcORqRuxCCJDPpZpPea+XgIX8islyF/JC0sDk/3DQd0V3yuBZwA== X-Received: by 2002:a05:600c:1c02:b0:424:8dba:4a3b with SMTP id 5b1f17b1804b1-4248dba4ccemr36965065e9.5.1719273693154; Mon, 24 Jun 2024 17:01:33 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4248191116fsm156279865e9.37.2024.06.24.17.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:32 -0700 (PDT) From: luca.boccassi@gmail.com To: Haoqian He Cc: Maxime Coquelin , dpdk stable Subject: patch 'vhost: cleanup resubmit info before inflight setup' has been queued to stable release 22.11.6 Date: Tue, 25 Jun 2024 00:58:31 +0100 Message-Id: <20240624235907.885628-45-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/aff6953d46a68165eddc631154cb687e7f646cac Thanks. Luca Boccassi --- >From aff6953d46a68165eddc631154cb687e7f646cac Mon Sep 17 00:00:00 2001 From: Haoqian He Date: Fri, 26 Apr 2024 07:09:46 -0400 Subject: [PATCH] vhost: cleanup resubmit info before inflight setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ] This patch fixes a potential VM hang bug when the VM reboots after vhost live recovery due to missing cleanup virtqueue resubmit info. Specifically, if inflight IO that should be resubmitted during the latest vhost reconnection has not been submitted yet while VM rebooting, so GET_VRING_BASE would not wait for the inflight IO, at this time the resubmit info has been. When the VM restarts, SET_VRING_KICK will resubmit the inflight IO (If resubmit info is not null, function set_vring_kick will return without updating resubmit info). It’s an error, any stale inflight IO should not be resubmitted after the VM restart. The solution is to clean up virtqueue resubmit info when function set_inflight_fd before function set_vring_kick. Fixes: ad0a4ae491fe ("vhost: checkout resubmit inflight information") Signed-off-by: Haoqian He Reviewed-by: Maxime Coquelin --- .mailmap | 1 + lib/vhost/vhost_user.c | 1 + 2 files changed, 2 insertions(+) diff --git a/.mailmap b/.mailmap index 1c0d974460..2724a689fd 100644 --- a/.mailmap +++ b/.mailmap @@ -473,6 +473,7 @@ Hanoch Haim Hanumanth Pothula Hao Chen Hao Wu +Haoqian He Hari Kumar Vemula Harini Ramakrishnan Hariprasad Govindharajan diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c index 66ab68fa56..8d7d04059c 100644 --- a/lib/vhost/vhost_user.c +++ b/lib/vhost/vhost_user.c @@ -1745,6 +1745,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, if (!vq) continue; + cleanup_vq_inflight(dev, vq); if (vq_is_packed(dev)) { vq->inflight_packed = addr; vq->inflight_packed->desc_num = queue_size; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:16.241753554 +0100 +++ 0045-vhost-cleanup-resubmit-info-before-inflight-setup.patch 2024-06-25 00:22:13.173185404 +0100 @@ -1 +1 @@ -From e4a01eea66326c58593906e189b376605a0ec606 Mon Sep 17 00:00:00 2001 +From aff6953d46a68165eddc631154cb687e7f646cac Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e4a01eea66326c58593906e189b376605a0ec606 ] + @@ -27 +28,0 @@ -Cc: stable@dpdk.org @@ -37 +38 @@ -index ed63605a15..ff20619bfb 100644 +index 1c0d974460..2724a689fd 100644 @@ -40 +41 @@ -@@ -495,6 +495,7 @@ Hanoch Haim +@@ -473,6 +473,7 @@ Hanoch Haim @@ -42 +43 @@ - Hao Chen + Hao Chen @@ -49 +50 @@ -index 414192500e..7c54afc5fb 100644 +index 66ab68fa56..8d7d04059c 100644 @@ -52 +53 @@ -@@ -1871,6 +1871,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev, +@@ -1745,6 +1745,7 @@ vhost_user_set_inflight_fd(struct virtio_net **pdev,