From patchwork Sat May 7 02:28: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: 12841819 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 2C9D7C433FE for ; Sat, 7 May 2022 02:30:47 +0000 (UTC) Received: from localhost ([::1]:41252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnADW-0007W7-3f for qemu-devel@archiver.kernel.org; Fri, 06 May 2022 22:30:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnABT-0004st-9S for qemu-devel@nongnu.org; Fri, 06 May 2022 22:28:39 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:10142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnABR-0002Sw-4d for qemu-devel@nongnu.org; Fri, 06 May 2022 22:28:38 -0400 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2471hpwT024581; Sat, 7 May 2022 02:28:31 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=ON5MeHet1FQvtMPhi5WnhVxxPzCtFwDPQfL450SDfZ8=; b=y9CwfdbD+tFEIBEB3yItnCp0Zworn4v/qkaT7jXshXiS5+LAv2sIV/BTQ+xv3CJCZIRc 7U9kRaAOrQBdPrmGzpKRzU9kYLBvpW6nyBXzFmOYPR+/rd0Gh1P94Uo7EmW9rSFGO+Q7 TI6gdRcRc2d3Z1pFannyn5BAuOi1GWU2w5eFzy2aYXFC0c+sIwPOi7AWNW87Uf0ZFl/0 2fORBXiOFepFqjxjnLcfCttrIyH2Oi9d18BRO2bvDnO+/9TNjVchAVwhjN5npOyKinyM b4pwEM8u3Zg1qBhNvS39IKBlK8TKDF7q7I0JpN04d/I5al2EfYjYr81y9h3J1JmUXlBd qQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fwfc0g0xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 07 May 2022 02:28:31 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 2472B11N033723; Sat, 7 May 2022 02:28:30 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2044.outbound.protection.outlook.com [104.47.51.44]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3fwf6y8vjm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 07 May 2022 02:28:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQuvITICiSGCpCYUgTAQPMoIA8ySNd6sJIbRsBewPCmRsXBZgmAV8cpMDwD6jLriilzhurEGsy3o0XIQs/ccBAIrkL9DvdL8DquVNSiRSFxsLxk0DA7t2ZqLTxbFws9UBYyrmqkAEf6nEbqTMqc2kK9AP6GXS1jbAz8boTv85a3cAQNlDjHulPijFkj3JkJ3hDtwHlX6helUzp0Voq8lRBooVQuqsT7Fwoqw3RuLaDj/R4iAPIkS3lBPNYmB3z9/q+4bu86YYM6hgoZaGQVZnGK6sMfu48WdrSrbgUTNDSsQluK2/a1JNXd7W2M+XVvn5KdmZ+ZC/xUPo7RhBTfTfA== 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=ON5MeHet1FQvtMPhi5WnhVxxPzCtFwDPQfL450SDfZ8=; b=cQWOga068KxYBQs/VdQC1QjilzlvhRRq1g+sEyCqwqYr6wiLTWB5WwdCi2VQfd7qk9yKZucMFniDC8Roxo4LO0OYu4H9RzmtY+Y+4axB2bg4I5wEw2CLIZd8qFpYTr93K8EXGmjX7ptei7gSLX6MCfUQSSPkSe/7oRTL1mFeB97ckG1o1ia0PW6UTIakz4hYdi26hf+tb/JaYguM7VS/oITqeAR8GAQ2KwNGHr0yxzrTaQ5wkJUCh4E7EfHKnF7l/8lB+O2g8GPSpSTMEZAp5FMsy/wmOwnZqWh3xDIjncdzuo+KDc3pO6m749Ksa1MY9GhJ83HIlvMnqRsWzZQ0gQ== 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=ON5MeHet1FQvtMPhi5WnhVxxPzCtFwDPQfL450SDfZ8=; b=uKVTa47h54Rsh/5McY81HR11lBSwPsa6AMeFdrzAzXqKQxVCZmq/2SNCSkXvGwRi+X7P1OqvGDMJ9QWLchVqX3ZoeX/6+MGLXEpQDIg/D/jlkYe7GsNvG1I59BEuWaIaXELzXjtCuIT1k8Fmp+VhgN/6K32tmuMS9VdkDDYSA6E= Received: from BYAPR10MB3287.namprd10.prod.outlook.com (2603:10b6:a03:15c::11) by DM5PR10MB1370.namprd10.prod.outlook.com (2603:10b6:3:f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.24; Sat, 7 May 2022 02:28:28 +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.5227.021; Sat, 7 May 2022 02:28:28 +0000 From: Si-Wei Liu To: qemu-devel@nongnu.org Cc: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com, sgarzare@redhat.com, eli@mellanox.com, si-wei.liu@oracle.com Subject: [PATCH v4 0/7] vhost-vdpa multiqueue fixes Date: Fri, 6 May 2022 19:28:11 -0700 Message-Id: <1651890498-24478-1-git-send-email-si-wei.liu@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-ClientProxiedBy: DM6PR03CA0041.namprd03.prod.outlook.com (2603:10b6:5:100::18) 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: 9e64753f-4d86-4a52-6a44-08da2fd1450a X-MS-TrafficTypeDiagnostic: DM5PR10MB1370: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: Swlm3TPamnYf7h2k4TMLjUVzFqlGbis9ncUB5dTY3wzKVztpHwWB1NzkgYB//1cO2l1tdMb9n/O38wUx1NRve33TQ6z8RVfzRKRWUI04mvV27+N5yNHuz5Xnwx1/yv3dAXgjFSZc8v6VJdatr8wbQiearR6BQPmEbp73kBx808RSm2Xao/9xtWFqVIh+S9BrAYMmCId6QJqvrenX+oOX4rr/f4E97SJFY0OmRGeV9yq/4NvsmnAY7dqzZcUAuNPlNGunNKb9YQC2rnz3keP39/v7SsNKi7Hpiq76u1tiJhaytXXcrcqBHVH4tuRynj+FqMPd6PzKgM1IkgwUE6O47FHz+037pyqYXZ7WO3vxvnuGlF2EHGmBtP2DCAmwN4dbLrLU6ILxnuJuEGRSbBqDjnsJGgRufOfaQs2LHi2WoV5wCf1oe3MkD8zSQwkDCw81g7AjO8XjuKSjZvGhoYW1Ftk8My6issNl2S42GfxiANU1txjgCh1z6ONqj9mgNlNEMRzaOaoKI5JOn7b9/lBQw7rl0lppov6n9RC0XARwgSM9s0o2j8dUbF/RhzDZf+FFiRKn6GcIK/DQO0jxThzTepcjVoVlK3yGjNT6IycJVlQXBABOfKKIwIdYLwVTmGDJsOtsrOIEkUyItEOUWEqOVtx2RWCNJxP1jhKITNWq7mbro0gKp75KfGIwH0DK8s4wkaAFGXO0O5itkWtiwNu1KW4ayuxN2fqfIz/9PLuNdRiArYUqVEEPTUOzgfwIFWy7rkdo1VFN9M070mB2LK1fv4sF6PGBchATIej3CapZAQ0eoveP7l8f3r1SmxRID/mXIlGdbSwrt7Vj4ZUgpnVQJw== 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)(83380400001)(52116002)(6666004)(966005)(508600001)(5660300002)(6506007)(6486002)(8936002)(186003)(86362001)(38100700002)(38350700002)(2616005)(316002)(8676002)(6916009)(66476007)(4326008)(66556008)(2906002)(66946007)(26005)(6512007)(107886003)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-Chunk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= =?utf-8?q?l1j/WJzvJDdBij2ENj48MrjZNpchjTHTnLqjMoC4m8+iMtlNFc3nnGrUpLmf76tBo?= =?utf-8?q?WRT1bpDqbismet9qlpt5ElGkL+TGLeFuHTkFKtMfwdYglIVeSxIBnNLGdcPAwyV31?= =?utf-8?q?b607B/63MJjBAIfeA5KH9ELcLUKuhPSEcgzmqI7GVn0cpX5fRXeCXlTK+YaM+WAGB?= =?utf-8?q?ePK/YzmYdzbl8b5zLnJpy4jN7jeE9i3igoTZP08HY+4rTKWF8fX8p4Pl3ooG+EI0C?= =?utf-8?q?6BfJNCqZ8pcQXjDlppllfab+n4pXf8TzHunAKMqgi9+EpkhNFzE7wOdmKSIHqWWUR?= =?utf-8?q?Oyow4id24qoKc7aHg4bDI9EnAVabH4swEv23H270aeFIlD61VnI0jBgYUzHA2KLs4?= =?utf-8?q?piIeLz6PRaIawnDxMLYLH+t0YGTC+aGlrmAFsUJWju0TngKS46fiylW80N2NUNvgG?= =?utf-8?q?BoFX1yiV6Y0RJ8HhhLpGTIblHrRC2N3BOjac0bSb0ITabW4WT4omKgy9LPOp7lRmB?= =?utf-8?q?2clbNDETACFerp0D17XprFXr5494Ha4yQich1NfMFEnCz/hkdmJqLdA0EqZoX0cx0?= =?utf-8?q?2Aa2diBOSkDr/EIlespHm5nvhqLSm5sQ2LFnmFAqJNAmq5dMbFrGJMjCBRAkuN44Y?= =?utf-8?q?bpAgdDqY7WO6IwFrXIwTuhR6QZpvkKvIX7tbt6h076/usYnyN9730NIizYvbgCx0H?= =?utf-8?q?V2DiQdwO2EqxJrYxEXiLPBDER59bjEZmBTlLr95dy1ceh+9++DDqSca0DU5AWajQc?= =?utf-8?q?DEnp5zxZISNjZvvIbMuL83v3EYVjg9yJJWnoxokVgT0J2ehnH64sMFS8tetUdpA4B?= =?utf-8?q?Ddy/KB2JZqxidXjoA2EYdovdAkZxrBdw=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e64753f-4d86-4a52-6a44-08da2fd1450a X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2022 02:28:28.1202 (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: 9sxtidCNgz7OEED1xS7krUHwECJHgGFhSRjhU6srceGdbV52+r2Hik11Gi3d07kIZ2GAK7ffuPoMJASX4/bpfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR10MB1370 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-05-06_07:2022-05-05, 2022-05-06 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205070012 X-Proofpoint-ORIG-GUID: gGNFKkQolb3FW6fj5lP52xolcRnJ_1tw X-Proofpoint-GUID: gGNFKkQolb3FW6fj5lP52xolcRnJ_1tw Received-SPF: pass client-ip=205.220.165.32; envelope-from=si-wei.liu@oracle.com; helo=mx0a-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: , 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 as in: https://lore.kernel.org/qemu-devel/c3e931ee-1a1b-9c2f-2f59-cb4395c230f9@oracle.com/ Patch #3 through #6 are obviously small bug fixes. Please find the description of each in the commit log. Patch #7 is a workaround fix for the QEMU segfault described in: https://lore.kernel.org/qemu-devel/4f2acb7a-d436-9d97-80b1-3308c1b396b5@oracle.com/ Thanks, -Siwei --- v4: - split off the vhost_vdpa_set_backend_cap patch v3: - switch to LOG_GUEST_ERROR for guest trigger-able error - add temporary band-aid fix for QEMU crash due to recursive call 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 (7): 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 vhost-vdpa: change name and polarity for vhost_vdpa_one_time_request() virtio-net: don't handle mq request in userspace handler for vhost-vdpa hw/net/vhost_net.c | 4 +++- hw/net/virtio-net.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++--- hw/virtio/vhost-vdpa.c | 23 +++++++++++++++-------- net/vhost-vdpa.c | 4 +++- 4 files changed, 67 insertions(+), 13 deletions(-)