From patchwork Wed Mar 30 06:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Si-Wei Liu X-Patchwork-Id: 12795519 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 351DAC433F5 for ; Wed, 30 Mar 2022 06:38:09 +0000 (UTC) Received: from localhost ([::1]:57742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZRy4-00026b-45 for qemu-devel@archiver.kernel.org; Wed, 30 Mar 2022 02:38:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZRtm-0007bU-Ed for qemu-devel@nongnu.org; Wed, 30 Mar 2022 02:33:42 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:64394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZRti-0005NE-Hg for qemu-devel@nongnu.org; Wed, 30 Mar 2022 02:33:42 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22U2x7ox016620; Wed, 30 Mar 2022 06:33:32 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=tHM+ropir4SsYKKhIbLfgd2+WXf8InHqNa+H9lIlUUI=; b=gDP0l8evvRJTRJr9gLmRzIRqOPDL3Bp8P5/OoMk5KVtRVObkgeXZpwQPkKb7Njx4foS1 hRCRZPA7Z7LyFbLEIeJKQF2K9Cy7R+44Rvzg/6WIdok5d8qIUvBct5y9oC5a3femuk1u auL0F0Kk60OBWgiLFaO/RqwFUCJOP+/pOd3VtctaPggnkIT/Xfb6Nll5IiXhWQn8cbd8 pwkXazXeifqW3O9uM+BIZ4reltOI6fEyJL694CpOdrh+uggQ5KegPIGjI6HPiRD8tNqq 0szTYUZ78g96SPLDfdEUL3GixQS8vadwMTFCCkS+e9xdGUgzXfuMazEk07pJ/q10aNSW NQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3f1uctrp2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Mar 2022 06:33:31 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 22U6IC5G013067; Wed, 30 Mar 2022 06:33:30 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2102.outbound.protection.outlook.com [104.47.55.102]) by userp3020.oracle.com with ESMTP id 3f1v9fk5ts-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Mar 2022 06:33:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eebu9nOW8sCs2VAydVSQ8BabSWsqwz3Zlpy1I7r3RCLKrP4WtRV318qsAlTLMfWFyA26FoF8eqJZi6tvIdAiGjdh7Q+IA4mfOS5qP5d6O2nFGILEboHcbj/xYSO6z76RcTLYyOoXwhUDdD8SJRa3W66jwPKGojJc8CMFKm9jYP1w9zrdgAT0jVIdvhZzQYwA/Lb8oJv32ptlaU25EIek9tabGgqIO/j4lJDc4Mg7k11WzeF9v5QxC9Ceagy9He+YnaHdMy1V6435pM0WIK3FkyRTEa0no8aw8xfwGxTouFRqeQBY9nA8atet8S5LT6AG7lF1QZ8Ku6VMipcxginO5w== 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=tHM+ropir4SsYKKhIbLfgd2+WXf8InHqNa+H9lIlUUI=; b=JjEMYmwM9TFK0EFCBh5VRuzqTRPAq8tcVFRVvK07LptrZLkWcY8M35z4qT3ERfVa1F4gqy3i29gnzJcGGGKHQG2Gkq2gC+j49k6yXtkbhgu0GokyrVy109G2m0AhXaX51w+9WEeCXxfuz36fScuLFqniYoo0jl0WZFBJW8v++S3qkNSy93UOtN2DYGInf2zgYABNJFobZdunpQG44GjxM6KPNWvHr++OKMu7wW6SoQMBEzVlLfWqJnca7uV9d00EQ71CEP1cDGVPA5rwMJFe5jYjsLgEefiTIPV9bVKZe88tkspL5oRD1mbdb4Ihjk80rZKC7HWWu2qauhkmnw5SjA== 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=tHM+ropir4SsYKKhIbLfgd2+WXf8InHqNa+H9lIlUUI=; b=pm05OixDWPRGmhQ05to80vvb7Hp2NICZgFuHhn78oc5rtV+QmBevzRfwvkzaAo6RyGN2gu5Xx3u9QruA1wZOoOoaiy4JY14j+ONXD6vhuzz0JFConn2To5jv14pDKlsmk6kySnnIQNNK6zICYmW/FWutU+iRdm8LnJ6l4WEFyhA= Received: from BYAPR10MB3287.namprd10.prod.outlook.com (2603:10b6:a03:15c::11) by BY5PR10MB4067.namprd10.prod.outlook.com (2603:10b6:a03:1b4::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.17; Wed, 30 Mar 2022 06:33:28 +0000 Received: from BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::e478:4b5e:50a8:7f96]) by BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::e478:4b5e:50a8:7f96%6]) with mapi id 15.20.5102.023; Wed, 30 Mar 2022 06:33:28 +0000 From: Si-Wei Liu To: qemu-devel@nongnu.org Subject: [PATCH 0/7] vhost-vdpa multiqueue fixes Date: Tue, 29 Mar 2022 23:33:10 -0700 Message-Id: <1648621997-22416-1-git-send-email-si-wei.liu@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-ClientProxiedBy: DM6PR11CA0006.namprd11.prod.outlook.com (2603:10b6:5:190::19) 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: 216e77ac-f8cc-454a-2ec8-08da12173341 X-MS-TrafficTypeDiagnostic: BY5PR10MB4067: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: rfv+B2q5sh7WCggqk0dVY/0EmK4K34pfACNT0cGKvJkneTVXl7QIsdqqkVHR6i1YWfsxo9/O90y3mGWjJTWDrWPtYoltpGw4cOakMuT/XNpjYm+mZr3SGqaKoBo1l+Rnk+EiZGvnWOZCzBQG56mHmnvSqy2Hb1DWX2hNrXrRy+JomIpxxyhqxq/2LLsrydvM45uTQ0VJlbt5QWkoEQ6TUgN9fbcjAYQH5KuwOLFOSlhUWCuw8/ez/PVeKGhBhihhKlyI4ZgdiNlk6ekMXLp2n8MMdlEvt0Kc2fWzjJYyt/rVyPOc+iMPHU2Gu8/UEZZOoMHhzy7ObUx9Ipog4oWKZFnCX+JYZlWShCc+TctKYhma6hsDzpNij87Q22lmXc7C+s3ADgpmqTRdyZof34ZSzRjhApm970Tu0I9rTPioyMjjR2RfpacjE0+2EX0HrdmLikABopogjMCbeE1WEb1GORITmTV61VFc04rmhCGD/DBvqG4SEOLPZ8DHYLhI9JnffcBPHAyNIsEgg8uCVx8O+1KscSVJI5A3mDLg3tfnfBM8HdedwVn/djVGfdrESEEbuNhYqCEpX8czCujaUJ8/hciqZPU/FCSD9CsQbRiC/iR3ixqhrsENREHWWbK+7j6BFlftI0THLx01e1FmRdon3dOfzUmZXnJJdEVDNm+O7tS2WUGGN5DJDWlpUzScwKCyml3wrljwx5FCCwHpGHsOZPqLJc6LGYdcHec+7UJ9t+4WUKE+3fm749Qt8m6R7ycdP5Bfb8+MsiUffXG9JBCOxdhhJYNt7FIoAlQQk8hLLiuHsiTx/JsCVW72chgJIjbLlnpNEy8lWz8S3O26ff2Qkw== 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)(508600001)(6486002)(316002)(86362001)(966005)(36756003)(26005)(107886003)(6916009)(52116002)(186003)(66574015)(2906002)(2616005)(8936002)(6512007)(6506007)(6666004)(5660300002)(83380400001)(8676002)(4326008)(38350700002)(38100700002)(66476007)(66556008)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HbEr0xBEg8sl/yTpPX0wWI4XNB3c?= =?utf-8?q?u3Cd/D5uMSqzVA+PfhFxPXddWj299lggPhrFicEntjE/5EFZ/7DgutjiqPSLB5PfU?= =?utf-8?q?evc7eS00qxeYXLHEfEmBOElxZV7uqJXa7niOzqF8ZC9rn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FMEtJp9muosV?= =?utf-8?q?epAyWDEOR4RCcLwXB3S1+OGa9rcZVx82mShTYUcF1lBe6TPUB0yapXAglXurx5DSu?= =?utf-8?q?0TsgUwikI5ZVKQE8VbEsvP88SQzLqrqOGN5HU0eeirzi4UnJj1CNk6T6lLO7frw22?= =?utf-8?q?kSZCF1KDVxE+UE6t0ytYGmILNuA9MvByqcrB3nQckMKE73NeBV8PZlx0Zp1ZPGwhF?= =?utf-8?q?j/nF/mjYZ0mEnmWpwbfTG5/iwEmzFzOj5JbhlelsnZYO4yXRqbQSjbQBk/TYHEwlL?= =?utf-8?q?PP9/CD4jhEGwNnQlqivZh/+sa54Od7KYXvNX0Ntfb9pR4oMOfHPkYOyHaLoCo7bvh?= =?utf-8?q?RaqrvSNbOUI6Rp+8BRX1DgD9eeHju7ERVGfAX/vlxqC2x78LLJHO0zklEPFZz7P3h?= =?utf-8?q?RXXJhLie4CSHLj7PrWoroTsUErm8H28rYf3v/RBU8rNqtVr61VLqTHPKZ99Xh8cEf?= =?utf-8?q?esNmUi6mADvBaoVk+Re59WkHhg3HYdCMi2FvI0XchaU/LfdsDQ7mdl430N1IkxLmD?= =?utf-8?q?G5Rwr4HfoU2/rrgPqv/nG1UzIU9p2WXRMdmiW9NcX2wokyTTZC3UBwqESmFfgFfTC?= =?utf-8?q?aWi0OVbSdI4n0AUO/VUvF/mUCdlDufZ3oJxHHete31QTGEVvG5UmhyZZ41h7kKYOB?= =?utf-8?q?O5yW6UDqGIcuiXlTKShQXN4hTpKb74uQ=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 216e77ac-f8cc-454a-2ec8-08da12173341 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2022 06:33:28.1210 (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: w5uSSoI6AKyTcQVPHTPTUDjyDnqOl2h+gmT+viIV9ODP+bNeq+ckfrCjMR01RoSobN8tVleuogK5CoJkjG22Mw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4067 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10301 signatures=695566 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203300030 X-Proofpoint-ORIG-GUID: wCeniJFCy7_302-9QOD52hVP1LAHa_52 X-Proofpoint-GUID: wCeniJFCy7_302-9QOD52hVP1LAHa_52 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=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-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: si-wei.liu@oracle.com, eperezma@redhat.com, jasowang@redhat.com, eli@mellanox.com, mst@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 is the formal submission for RFC patch in: https://lore.kernel.org/qemu-devel/c3e931ee-1a1b-9c2f-2f59-cb4395c230f9@oracle.com/ Patch #2 and #3 were taken from a previous patchset posted on qemu-devel: https://lore.kernel.org/qemu-devel/20211117192851.65529-1-eperezma@redhat.com/ albeit abandoned, two patches in that set turn out to be useful for patch #4, which is to fix a QEMU crash due to race condition. Patch #5 through #7 are obviously small bug fixes. Please find the description of each in the commit log. Thanks, -Siwei --- Eugenio PĂ©rez (2): virtio-net: Fix indentation virtio-net: Only enable userland vq if using tap backend Si-Wei Liu (5): virtio-net: align ctrl_vq index for non-mq guest for vhost_vdpa virtio: don't read pending event on host notifier if disabled 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 | 2 +- hw/virtio/virtio-bus.c | 3 ++- hw/virtio/virtio.c | 21 +++++++++++++-------- include/hw/virtio/virtio.h | 2 ++ net/vhost-vdpa.c | 4 +++- 7 files changed, 45 insertions(+), 16 deletions(-)