From nobody Mon Nov 25 04:36:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1718285410; cv=none; d=zohomail.com; s=zohoarc; b=mfoWqV/7IpsmuE6WFstxj24wJFYnOp+lrjALbna41ueWz74GO0OOFQYpv879Wco3qJBWZ8v5SHuBdvv2/wVkRBfgm15pDCyWeV+fFE4bPcRnPHyFM4Bsy6fyhYzFOSSYsgsMmsTRe/WBuyvri0WemDbwv39Nkt55T0HB/Z/Mraw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718285410; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P49yGcNT0MCnPT2bpjKgFMHgiI0ZB1XEpIXUNLmlRo0=; b=dIUTM6YWPLIXt2tyFSoKpp5HbfRnrRg+exuTZCJpsmrLFbuE9xH9U5niwU78Yt+NDR1+U6wVvTyOqdg0B/Pxn4RK3FL3D2T9OlTUBLhiPnoGlXZiDLCHjkTWsFsTlD0xoFqL+SVyqgG3ep6dHRxoohVVp846GttY/2HaXjIDLpE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718285410129898.6240297392744; Thu, 13 Jun 2024 06:30:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHkVy-0004cj-Tu; Thu, 13 Jun 2024 09:29:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sHeJj-0001MT-Qz for qemu-devel@nongnu.org; Thu, 13 Jun 2024 02:52:15 -0400 Received: from va-1-16.ptr.blmpb.com ([209.127.230.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHeJd-0003J3-27 for qemu-devel@nongnu.org; Thu, 13 Jun 2024 02:52:15 -0400 Received: from localhost.localdomain ([117.133.51.44]) by smtp.feishu.cn with ESMTPS; Thu, 13 Jun 2024 14:51:54 +0800 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=dayudpu-com.20200927.dkim.feishu.cn; t=1718261515; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=P49yGcNT0MCnPT2bpjKgFMHgiI0ZB1XEpIXUNLmlRo0=; b=3F8VHDEsHUUK/fV+nZdQ+2BmicJpqwh8G4T9JkeQ7r5l15rr3aK0t0EAjA3inn0i0u7vej 5PqGhsWU2lcdUXxXb3w3Ieik+W2Mv44P8asWngQZ4G4mY8tACm0TThfSHssMshhHYCi/HO oEvzFh0cE02xV80aRLzbW31YXjjxJw+pqo5oakHKk20GTAuY95fkPdfMVSjDmB1l9Zxt5U 7+6nWjOH7wxOw9tFJMY5m+MNE3lBPfLxhpMUzZbPmMwa24O/3aR9Ug+AQ/A8pSwRAhvX1w 8OChI2pycxRuRFX/YI6zrbeTrDHLaHJdgHwG0qrtzpHfWjVVinnfT/TGsfCWMw== Content-Transfer-Encoding: quoted-printable Message-Id: <20240613065150.3100-1-xiangwencheng@dayudpu.com> X-Mailer: git-send-email 2.30.0 X-Original-From: xiangwencheng@dayudpu.com To: From: =?utf-8?q?=E9=A1=B9=E6=96=87=E6=88=90?= Subject: [PATCH] vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests X-Lms-Return-Path: Cc: , "BillXiang" Date: Thu, 13 Jun 2024 14:51:50 +0800 Mime-Version: 1.0 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=209.127.230.16; envelope-from=xiangwencheng@dayudpu.com; helo=va-1-16.ptr.blmpb.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 13 Jun 2024 09:29:14 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @dayudpu-com.20200927.dkim.feishu.cn) X-ZM-MESSAGEID: 1718285411861100003 Content-Type: text/plain; charset="utf-8" From: BillXiang The VHOST_USER_SET_LOG_BASE requests should be categorized into non-vring specific messages, and should be sent only once. If send more than once, dpdk will munmap old log_addr which may has been us= ed and cause segmentation fault. Signed-off-by: BillXiang --- hw/virtio/vhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index cdf9af4a4b..41e34edd49 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -371,6 +371,7 @@ static bool vhost_user_per_device_request(VhostUserRequ= est request) case VHOST_USER_RESET_DEVICE: case VHOST_USER_ADD_MEM_REG: case VHOST_USER_REM_MEM_REG: + case VHOST_USER_SET_LOG_BASE: return true; default: return false; --=20 2.30.0