From patchwork Wed Apr 27 08:30:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Si-Wei Liu X-Patchwork-Id: 12828462 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4377AC433EF for ; Wed, 27 Apr 2022 08:37:15 +0000 (UTC) Received: from localhost ([::1]:38236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njdAf-0007wk-U1 for qemu-devel@archiver.kernel.org; Wed, 27 Apr 2022 04:37:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njd4V-0005HY-TM for qemu-devel@nongnu.org; Wed, 27 Apr 2022 04:30:52 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:52614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njd4P-0005va-Ti for qemu-devel@nongnu.org; Wed, 27 Apr 2022 04:30:47 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23R6q87m003700; Wed, 27 Apr 2022 08:30:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=3ubIVVPx4iMn9LafeJhO9Z/dhWys9TxEAB1Efhtxr7U=; b=QJ8ceLQimhsG3sLma8wOmzZDJq6n9avCZfpcEHBy5/QpYAJlqOyAJRznVdAfxgbmVIeK E1glnreLdsyaY2zDpFaVqmJqGk9xepFB4h7oiCDuG3TUxOoCH9HT2Xabnl7Ds6hlaIbD ZhysHXeWU6cwDPV65+A9kOaMCYD6I1Jz90qlGDsUW75BpmGkVq7VFAnZqROHPEuvGShR eDVL46TA1nYnnCU9CsxQ9VQ0ridDYYORv2ZJZ1f0lxebvOPNalI5pu2bdwElbtMdiiVv ePwKKGnm/fxpI5iZZaO6HPkquy0luoORGCBWr/8iG4PP6S86BJggd+2Gxl+CQWi70RVF Ug== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fmbb4r1ar-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Apr 2022 08:30:42 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23R8UfW9030459; Wed, 27 Apr 2022 08:30:41 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2048.outbound.protection.outlook.com [104.47.56.48]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fp5ykf12n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Apr 2022 08:30:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cNSC7dCsRT1jtQ+iLH2xHJXiiQXNQXzHiBEgAAX+aC0COzpwKyKrC2e0ja0H98SP4mKekK/DK4Lv8y7PRW70gXxurGi+GUekpMVpqcskhJ1NC807ytHeUHFNCUEuKCaxSW2opyhzJJMOAatuk52ay9qPb26wQDqBtjvgtgFRqjSRKM+F+UDiCl4LbatNz3pkjgIJXP74SrLl5bT9wXSYtu7FclsbghnXmkZCYFIqK8gvxX+iXyPFDy+Y6Qch5fT4yG9V7n9VOQaLWhc2dH1Knsx8hmuVg26CoE+YUAKkodsS+Cf9swKUDi2S8WxS72JoFfq+ySqtYASomn0XgZ6liA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3ubIVVPx4iMn9LafeJhO9Z/dhWys9TxEAB1Efhtxr7U=; b=IjwGQSY92WTofvXrGY/ymARQmef24lIQ8kCyixpryRWL5Angr+O09CpTQjaTBAgz5lpOALMOfgr5NlFHYYE945dcx63o3ysMkS1z4zsYEyyilhmptZVrd9QSVVTnFkw19ttQQOU2yDMbFQWNDDxFJEvR1DgmvpSb74lbFp/IcM3GN2a2tYVvV+1sNbsWudKukpCLQphC07J0xsqdlto6WAWWwCWCR4Wm+GHhc50F4XKlbrMXFd5z/jfDxoB9Stia9XCI6S2TYK1zGOEtNYpHwV8VvCdJD8UNhhM5SHwwVPf/AEtZ/XVBGl1tVHy664tbylCTlSDcBOhzcyJ2hglWOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3ubIVVPx4iMn9LafeJhO9Z/dhWys9TxEAB1Efhtxr7U=; b=AXfgMuY/U2Z0dWM/zyWcvDccqDmsDNJ1RBHkLavgPPePmmSNTQY8nXbjzL+lG18PPYDLkG4e+IqKfWzLuglyfPuS/p9MAVYjptwj8V0DrVKU/H0uAqPhxobRJebEwl3MB5zPysNymutXkwim3RWmgBIFmtqCms58zBvY/qi0iW4= Received: from BYAPR10MB3287.namprd10.prod.outlook.com (2603:10b6:a03:15c::11) by CY4PR10MB2007.namprd10.prod.outlook.com (2603:10b6:903:123::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Wed, 27 Apr 2022 08:30:33 +0000 Received: from BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::c89:e3f5:ea4a:8d30]) by BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::c89:e3f5:ea4a:8d30%2]) with mapi id 15.20.5206.013; Wed, 27 Apr 2022 08:30:33 +0000 From: Si-Wei Liu To: qemu-devel@nongnu.org Subject: [PATCH v2 0/5] vhost-vdpa multiqueue fixes Date: Wed, 27 Apr 2022 01:30:11 -0700 Message-Id: <1651048216-3365-1-git-send-email-si-wei.liu@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-ClientProxiedBy: BY5PR20CA0030.namprd20.prod.outlook.com (2603:10b6:a03:1f4::43) To BYAPR10MB3287.namprd10.prod.outlook.com (2603:10b6:a03:15c::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1abbe08c-4b8e-40d8-8a60-08da282831eb X-MS-TrafficTypeDiagnostic: CY4PR10MB2007:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 91H/SYxp3th6oUlAZbAXCAyBN64s6/q2fdMQVsxQfXrZP8Pqwj/TK4u/77m8BeqoHYNC/FSD3yFIVEImMYCVwklXQhWPck6itoOa/8fiTYxELVxqAZ1msYhwpfMi7HsPvoaf9xHqZ3F5sTGOGGoqZ2l96tieCanhAQS0U9OE7i7183X8NZcbaNOFvKPI/EDYhEfkNsEFTjxunNa+Mxpb3kEBKWJLnail048KO87vXF8OvUy0+4bGZAgjHbR1/gHOUPME4Bo8E3Sv2oXyvEO47zzr6TzwJgEvhvpmpcHqePigG8frKRSF8SgEHC1APppO8LDU9kuLbG0vTOuKHAy7I8faTUlRZJO7HsfjuMaqWbWnX8iPp9bBA/Oel7bLIZFw/68zf1r3jc95Hm0/lNfTszd/MI4S+eBbCgGOHcA87uPBXzXvhA+mkKIqIuAvx6k3YWMUY2KfVB7NxwzAxqhf7tKLKOFN5XW/eXBiUpLrEQxPt7T+1wNu2tKxUirLmO4D4k3pTcmUrMjua6LYEUO903ohAj1sXPB0mEg0Bx4ba0MORXNi2r364aIb+cUomHFQNXQQkhP6IVsKMjn8sg3MEv+kzU00SeevhUFApKPeeNKpzlsOuDTP3uUgLLT2Vsd4YvDVINltqWPdM6rvGgxeFUvf6AF3AgjV8xJ3Vi5dKSorl9V+zIWPifgx8kSFQP2jAtj6MQyrofMwaCFEfbF67UMWztEyAMtTlNOKBnRO6TrUkXu8UYqvnX9vM3VNVbERke7FNeGeDkm0zIAPha0SpQGX5a0Kg+F0S/usOYeHK41rjCuaXryKH8YTEidBtWstUmvvvHMWS2VqPSyi9ceP/Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR10MB3287.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38350700002)(966005)(36756003)(2906002)(316002)(508600001)(38100700002)(107886003)(4326008)(6666004)(6506007)(6512007)(52116002)(6486002)(83380400001)(8676002)(186003)(66476007)(66946007)(66556008)(6916009)(86362001)(5660300002)(8936002)(26005)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?IXu3m1q1tTyQFKBq4tVFYhM23foQ?= =?ut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-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2022 08:30:32.9544 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Bc55BEDa6+LRLVQ2jE9av/eRfC9oDEp1B512FJHPN8gRY1c7uLkrdAKP1rCsFjI7iWZ/3qmxzv5oQP9DClE6UQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR10MB2007 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-04-27_02:2022-04-26, 2022-04-27 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204270056 X-Proofpoint-ORIG-GUID: aWr6mq0xynJIuBobfoBJmUSaMhAmEILv X-Proofpoint-GUID: aWr6mq0xynJIuBobfoBJmUSaMhAmEILv Received-SPF: pass client-ip=205.220.177.32; envelope-from=si-wei.liu@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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-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: , Cc: mst@redhat.com, jasowang@redhat.com, eperezma@redhat.com, eli@mellanox.com, si-wei.liu@oracle.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Hi, This patch series attempt to fix a few issues in vhost-vdpa multiqueue functionality. Patch #1 and #2 are the formal submission for RFC patch in: https://lore.kernel.org/qemu-devel/c3e931ee-1a1b-9c2f-2f59-cb4395c230f9@oracle.com/ Patch #3 through #5 are obviously small bug fixes. Please find the description of each in the commit log. The patches #2 to #4 for v1 are taken off from the series. These patches will be posted separately later on after rework. https://lore.kernel.org/qemu-devel/CACGkMEuecMSCWdr0P9f=U-8wYAw3M05mmeRo+y6Zmt2TxCUNBg@mail.gmail.com/ Thanks, -Siwei --- v2: - split off vhost_dev notifier patch from "align ctrl_vq index for non-mq guest for vhost_vdpa" - change assert to error message - rename vhost_vdpa_one_time_request to vhost_vdpa_first_dev for clarity Si-Wei Liu (5): virtio-net: setup vhost_dev and notifiers for cvq only when feature is negotiated virtio-net: align ctrl_vq index for non-mq guest for vhost_vdpa vhost-vdpa: fix improper cleanup in net_init_vhost_vdpa vhost-net: fix improper cleanup in vhost_net_start vhost-vdpa: backend feature should set only once hw/net/vhost_net.c | 4 +++- hw/net/virtio-net.c | 25 ++++++++++++++++++++++--- hw/virtio/vhost-vdpa.c | 23 +++++++++++++++-------- net/vhost-vdpa.c | 4 +++- 4 files changed, 43 insertions(+), 13 deletions(-)