Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8873521rwp; Wed, 19 Jul 2023 17:17:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlHAcRS1PnIB00Zq7gPs5FrDfXj25t69/iDaNrXGGh4ySypNe5ilIt6uG80/surDVeWSWchZ X-Received: by 2002:a17:906:530c:b0:992:91ce:4509 with SMTP id h12-20020a170906530c00b0099291ce4509mr3058326ejo.57.1689812261444; Wed, 19 Jul 2023 17:17:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689812261; cv=pass; d=google.com; s=arc-20160816; b=lYIWLRYP46EJD6zDbRSS0XXJG7LZRQoDUqmrOgMCT+sE1d/eQspHJBA7P1DbzRf11p n691ShTs0oA16/OVlyGYrBVy6dCb1fpIVVbqOqDYGLBCOzE7kvSc0KuLyUyCJd4+SJkz KWL+eKBQPKIV129+1a7Nb1nXT32xjfbcS6VbZDoZGiMeccFeX4LZbTvDrGHKPfVZDprX VpNRV9jVhrD9WhM6+hOetBlnJ1cjxr9gWfd59p3GoXXoyL5fgHKn5goQ5k1TAQTZ2gw4 B4e6hq3wRTNEl6lR5L9bAU4nPknbFKDN508PFDPyLAok0YSZmDj+blcPqPf5NVg+uWWh rRPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=Kao42yPwRO82pjByDl/nyiRFwWQxjV8GJVsnt8uj3sg=; fh=zmjXN6HHfVDgNPbdBCvXubY/g0jLj84GkAYddKtw4sc=; b=AR4XwquXmFXg9Po6UUWSkiTmq/WP5T236JaUwErERcWFJ3p2TQBJgvL+ZLyHuYpb+P 15k++6dYo5Ij3is+KNIFPhS/RSzaCkybtHSdVdfmQry3k3f1dW4logxlMii5iwjYy1DE svbS0VdpCqyi7i/LdpCeCqX78MqtyD3rJgPxlgNXYp5iy5fBDC+OqMmxilfA7JdAAbu7 i4yaywP+NR/VazIOG9qArFgbGTcyTETyZewJgDa46nssJPX7EY7W05qh1dwzmrXBurio v85nnEJhnwZafOArlj6PZGbQGxJVc7Q9RMCDepk+zKgSkT+HEVtId+var+u7NIbIaf/B LcUQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Lrc4pLQK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=iM7BGLWp; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a170906445200b009924c43105csi3455687ejp.94.2023.07.19.17.17.16; Wed, 19 Jul 2023 17:17:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Lrc4pLQK; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=iM7BGLWp; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229668AbjGTADx (ORCPT + 99 others); Wed, 19 Jul 2023 20:03:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjGTADw (ORCPT ); Wed, 19 Jul 2023 20:03:52 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65651FD2; Wed, 19 Jul 2023 17:03:50 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36JFOLGD029551; Thu, 20 Jul 2023 00:03:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=Kao42yPwRO82pjByDl/nyiRFwWQxjV8GJVsnt8uj3sg=; b=Lrc4pLQKTLknXDLSzghqRkcODkQITwmhL6/K/5DVNUdKbpa32do8TLm++udPQ+f4U9DW oglpMwZAoJHGoYRBJUoh1dUlGGQUgEVeodhJwslZVG1OKU1ds2BRHX9gFgKiLUOiIZui Hinnv0can+/1zazTYba12e9Jkfvlf0w0hzP2xufkTB01mhH1rLdwxV+VtDlOgTkXm234 VaPxodweWS500+Da0PaH2g3Fnqqpb+WWBHwUqy5w3F3VxwMNQYNBB5LJD/+pqsIxnShl ETO5aTW98/c29c7xk55t5oTqVEE2+X5wc3eygeTDzDJWpovCaOqL9nPX84WXofz2Xfs/ wg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3run88rqhu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jul 2023 00:03:43 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36JLUWYb000877; Thu, 20 Jul 2023 00:03:42 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2176.outbound.protection.outlook.com [104.47.56.176]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ruhw7qs1x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 20 Jul 2023 00:03:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3Ckdc67gasyhmnfVdjKPH3Rz68+ajLCou0HBMa0ugBWE8+PKQm8qk5jmFpOvpeov3v9KC2xW2RrfvY4R5bhng7EQ5UBGb+jfIpZwsxpyLnQrPREeOEu2gTXlBvX6jWkLruqAaQKRkd8DvH/NQsV+3NXEMonVp62q0jK4Rcw17YyU6IZI3VFC/zGDL4gflhgBa7PpsOxV92LCtHa/8Xj3Sr5NRjUjp/nX5UoZnrDcVn/m2PRoEM8EmplG9dzfGcvuKP05bhtYmgvZ8RFB5HKR8U2Bix8Bhrm/eq3/znd9DJ0tqbpTxvsvJC75OHMgKlOq4Yb91IsTBb3vJtPIdIdmQ== 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=Kao42yPwRO82pjByDl/nyiRFwWQxjV8GJVsnt8uj3sg=; b=O7Ybf72Ibh1Yc1WOh3M/ry46+mqG6VShV2jk2xgbULLKb42h4VGuipJPGAjLmy9XoIHbxNl87vEP8qdgLFVdHCeRuKVld4BHE3MCQ2ErBLj0MLnHBWjFF6hPvAN6CAacb2+yk1DuEt7BeLy5asX9q64YT/jfQH5UzwSFc7vioEk/Lx2C1BVN3CoCAaFddZlGXepisqncJ7LMik+JBBcPBxCQrL6eKc+pCrCXV+ucCUfWBzZU+O0kuLdaFRAtPW5S/krguMmwE5yAXaR4hn62Xvg/Lci5SzqmeD2JuW9D+hc+sUlK/9bfaM9k2lVjC+lxSsL+ijX2Vp0hSmsHyP9jjg== 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=Kao42yPwRO82pjByDl/nyiRFwWQxjV8GJVsnt8uj3sg=; b=iM7BGLWpWYE/MSu6bp4gfUAirsvy7dZF6IWPg2PJB+V5UM3j+MjPU1Ia9GbwLwqD2p+K1FIV9xmER79zNcgdV472b8qJ4jTIE1Sm71yRk4KNeaaUuz4AUqfUvhDhCPAXitDW15qo273OoIKEen8VJUVmuuCallbXkjeeWG9tw9s= Received: from MW4PR10MB6535.namprd10.prod.outlook.com (2603:10b6:303:225::12) by DS0PR10MB7903.namprd10.prod.outlook.com (2603:10b6:8:1ab::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Thu, 20 Jul 2023 00:03:40 +0000 Received: from MW4PR10MB6535.namprd10.prod.outlook.com ([fe80::a11b:61fb:cdea:424a]) by MW4PR10MB6535.namprd10.prod.outlook.com ([fe80::a11b:61fb:cdea:424a%5]) with mapi id 15.20.6588.031; Thu, 20 Jul 2023 00:03:39 +0000 Message-ID: Date: Wed, 19 Jul 2023 17:03:36 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] vdpa: reject F_ENABLE_AFTER_DRIVER_OK if backend does not support it Content-Language: en-US To: "Michael S. Tsirkin" Cc: Shannon Nelson , kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Eugenio Perez Martin References: <20230703105022-mutt-send-email-mst@kernel.org> <20230704063646-mutt-send-email-mst@kernel.org> <20230704114159-mutt-send-email-mst@kernel.org> <20230706020603-mutt-send-email-mst@kernel.org> <1fdf73cb-f23e-0c34-f95f-f1bac74332da@oracle.com> <20230719182112-mutt-send-email-mst@kernel.org> From: Si-Wei Liu Organization: Oracle Corporation In-Reply-To: <20230719182112-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1PR05CA0018.namprd05.prod.outlook.com (2603:10b6:806:2d2::18) To MW4PR10MB6535.namprd10.prod.outlook.com (2603:10b6:303:225::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR10MB6535:EE_|DS0PR10MB7903:EE_ X-MS-Office365-Filtering-Correlation-Id: 2755c219-f30c-43e7-b671-08db88b4c5c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r4PnK8M9lEPYzWPoAXKo8DE0JBFUBHdtkQrbS+7QxZWkJz3UKHD8qxyavEhsdNn/0yn7RnqteOycojnWv+5I1mh6bgqtU41KahHxZx5QQdb2cIlYliHdpSlic454GQKAky2T1pATqK8IHJ9H+KM1vQl3VimKG7MAOqcV3s7MEsNWhBYdyLmYAYGw+/THuIHJzIfnQ00wjUHKjRLF5gwQP7UdveC0zBgiCHu2LqOUpkI1skhDyb0CQteTjiyjAjfTGdRQ8qq2oZSIGLeDbX8tSfEW4pYc6LDYcAOAjP0VEFMQqjkm0ZP20o6RpmAs4cBDT41kk22AKrp0DjQVXhgx5JWy72/Qhp6QAQ92Fe5IFCzuUdSMmPLETUa6tcBn6VlkSODIgrp8Uf0VgLYkGDoflB00d3D/b5Q0M4a+JeZgpkgdA1HpOdFk5KRiz2LDpLmoSPFBxK9m6cJemwbF3/KUQIh3w5YicLcwTX1S1c7VTRTIwLExT69AWAEmO2MvEZ1lUvmjG6hAMrdrnz+/Kf22iLzq7YT4i1CYF6sdOQscIa+tsK8p0SWMfrT3BoNDxK1ikwqWmbjYDokIYNByVZFbtUA39q/Htu/LNaCh+zoWD86XfXLv6BubKF/pUi3dUIvpt1FdnKI4bWYNmS8Dd0JNvNPghvJFa+Lzi8KRn9YXKCdxlYXyYJ1zjNLg9pAQCyPK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR10MB6535.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(376002)(346002)(396003)(136003)(366004)(451199021)(54906003)(478600001)(6506007)(53546011)(26005)(186003)(966005)(6486002)(6666004)(6512007)(66899021)(83380400001)(2616005)(36916002)(66574015)(86362001)(5660300002)(38100700002)(8936002)(8676002)(84970400001)(41300700001)(316002)(6916009)(4326008)(2906002)(31686004)(31696002)(36756003)(66556008)(66476007)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?aDRxK3R6djlFOXNrYkp2TW8wOVFZdFc2ZFRDSHR0SVZSa3ZNUGNWam1TTmg0?= =?utf-8?B?N0ZacUhudGduNHlDeWZ0WlJ1SXc4UTg4eHMwcWVoUlR6L2ZFSFpXKzkvRlFG?= =?utf-8?B?NlVqbFlLYU05SnNGTUNHR25QSEp0Z2RIb2ZTREJMUGZZa21CVG5VY2lJcDBu?= =?utf-8?B?MlVuTnJFejVFSjFKYUM5YytRT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MZbyTn2ZQLAjvMZmj47yljzVGxT7JqeAq+6ewSJgQOC/sORZfK9C4VpYOp4zTJtn2 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2755c219-f30c-43e7-b671-08db88b4c5c1 X-MS-Exchange-CrossTenant-AuthSource: MW4PR10MB6535.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2023 00:03:39.8149 (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: aH/B6UP2J9mxuZTcICLgwIpWMkoEa1eaS65A88IFglQUnWRo/wLewLoYsXx75WEhbt23/5zzAiqM7i2mDVPuTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7903 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-19_16,2023-07-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 bulkscore=0 mlxscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307190217 X-Proofpoint-GUID: x0BhONA9AJ8V3S-Tzy2PzdwsRFkzrVCU X-Proofpoint-ORIG-GUID: x0BhONA9AJ8V3S-Tzy2PzdwsRFkzrVCU X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/2023 3:26 PM, Michael S. Tsirkin wrote: > On Wed, Jul 19, 2023 at 03:20:03PM -0700, Si-Wei Liu wrote: >> >> On 7/5/2023 11:07 PM, Michael S. Tsirkin wrote: >>> On Wed, Jul 05, 2023 at 05:07:11PM -0700, Shannon Nelson wrote: >>>> On 7/5/23 11:27 AM, Eugenio Perez Martin wrote: >>>>> On Wed, Jul 5, 2023 at 9:50 AM Jason Wang wrote: >>>>>> On Tue, Jul 4, 2023 at 11:45 PM Michael S. Tsirkin wrote: >>>>>>> On Tue, Jul 04, 2023 at 01:36:11PM +0200, Eugenio Perez Martin wrote: >>>>>>>> On Tue, Jul 4, 2023 at 12:38 PM Michael S. Tsirkin wrote: >>>>>>>>> On Tue, Jul 04, 2023 at 12:25:32PM +0200, Eugenio Perez Martin wrote: >>>>>>>>>> On Mon, Jul 3, 2023 at 4:52 PM Michael S. Tsirkin wrote: >>>>>>>>>>> On Mon, Jul 03, 2023 at 04:22:18PM +0200, Eugenio Pérez wrote: >>>>>>>>>>>> With the current code it is accepted as long as userland send it. >>>>>>>>>>>> >>>>>>>>>>>> Although userland should not set a feature flag that has not been >>>>>>>>>>>> offered to it with VHOST_GET_BACKEND_FEATURES, the current code will not >>>>>>>>>>>> complain for it. >>>>>>>>>>>> >>>>>>>>>>>> Since there is no specific reason for any parent to reject that backend >>>>>>>>>>>> feature bit when it has been proposed, let's control it at vdpa frontend >>>>>>>>>>>> level. Future patches may move this control to the parent driver. >>>>>>>>>>>> >>>>>>>>>>>> Fixes: 967800d2d52e ("vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature") >>>>>>>>>>>> Signed-off-by: Eugenio Pérez >>>>>>>>>>> Please do send v3. And again, I don't want to send "after driver ok" hack >>>>>>>>>>> upstream at all, I merged it in next just to give it some testing. >>>>>>>>>>> We want RING_ACCESS_AFTER_KICK or some such. >>>>>>>>>>> >>>>>>>>>> Current devices do not support that semantic. >>>>>>>>> Which devices specifically access the ring after DRIVER_OK but before >>>>>>>>> a kick? >>>> The PDS vdpa device can deal with a call to .set_vq_ready after DRIVER_OK is >>>> set. And I'm told that our VQ activity should start without a kick. >>>> >>>> Our vdpa device FW doesn't currently have support for VIRTIO_F_RING_RESET, >>>> but I believe it could be added without too much trouble. >>>> >>>> sln >>>> >>> OK it seems clear at least in the current version pds needs >>> VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK. >>> However can we also code up the RING_RESET path as the default? >> What's the rationale of making RING_RESET path the default? Noted this is on >> a performance critical path (for live migration downtime), did we ever get >> consensus from every or most hardware vendors that RING_RESET has lower cost >> in terms of latency overall than ENABLE_AFTER_DRIVER_OK? I think (RING)RESET >> in general falls on the slow path for hardware, while I assume either >> RING_RESET or ENABLE_AFTER_DRIVER_OK doesn't matters much on software backed >> vdpa e.g. vp_vdpa. Maybe should make ENABLE_AFTER_DRIVER_OK as the default? >> >> -Siwei > Coming from the spec RING_RESET has clearer semantics. Spec doesn't have clearer semantics on vdpa specifics - such as how does RING_RESET interoperate with ASID? > As long as we support it it is not critical which one > is the default though. The point is vdpa vendor drivers may implement RING_RESET for a different purpose than live migration. In case they support both I don't see a reason why it has to fallback to a slower path given there's a faster path. May we should leave this to vendor driver to decide, but I am not sure. -Siwei > > >>> Then down the road vendors can choose what to do. >>> >>> >>> >>> >>> >>>>>>>> Previous versions of the QEMU LM series did a spurious kick to start >>>>>>>> traffic at the LM destination [1]. When it was proposed, that spurious >>>>>>>> kick was removed from the series because to check for descriptors >>>>>>>> after driver_ok, even without a kick, was considered work of the >>>>>>>> parent driver. >>>>>>>> >>>>>>>> I'm ok to go back to this spurious kick, but I'm not sure if the hw >>>>>>>> will read the ring before the kick actually. I can ask. >>>>>>>> >>>>>>>> Thanks! >>>>>>>> >>>>>>>> [1] https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg02775.html >>>>>>> Let's find out. We need to check for ENABLE_AFTER_DRIVER_OK too, no? >>>>>> My understanding is [1] assuming ACCESS_AFTER_KICK. This seems >>>>>> sub-optimal than assuming ENABLE_AFTER_DRIVER_OK. >>>>>> >>>>>> But this reminds me one thing, as the thread is going too long, I >>>>>> wonder if we simply assume ENABLE_AFTER_DRIVER_OK if RING_RESET is >>>>>> supported? >>>>>> >>>>> The problem with that is that the device needs to support all >>>>> RING_RESET, like to be able to change vq address etc after DRIVER_OK. >>>>> Not all HW support it. >>>>> >>>>> We just need the subset of having the dataplane freezed until all CVQ >>>>> commands have been consumed. I'm sure current vDPA code already >>>>> supports it in some devices, like MLX and PSD. >>>>> >>>>> Thanks! >>>>> >>>>>> Thanks >>>>>> >>>>>>> >>>>>>>>>> My plan was to convert >>>>>>>>>> it in vp_vdpa if needed, and reuse the current vdpa ops. Sorry if I >>>>>>>>>> was not explicit enough. >>>>>>>>>> >>>>>>>>>> The only solution I can see to that is to trap & emulate in the vdpa >>>>>>>>>> (parent?) driver, as talked in virtio-comment. But that complicates >>>>>>>>>> the architecture: >>>>>>>>>> * Offer VHOST_BACKEND_F_RING_ACCESS_AFTER_KICK >>>>>>>>>> * Store vq enable state separately, at >>>>>>>>>> vdpa->config->set_vq_ready(true), but not transmit that enable to hw >>>>>>>>>> * Store the doorbell state separately, but do not configure it to the >>>>>>>>>> device directly. >>>>>>>>>> >>>>>>>>>> But how to recover if the device cannot configure them at kick time, >>>>>>>>>> for example? >>>>>>>>>> >>>>>>>>>> Maybe we can just fail if the parent driver does not support enabling >>>>>>>>>> the vq after DRIVER_OK? That way no new feature flag is needed. >>>>>>>>>> >>>>>>>>>> Thanks! >>>>>>>>>> >>>>>>>>>>>> --- >>>>>>>>>>>> Sent with Fixes: tag pointing to git.kernel.org/pub/scm/linux/kernel/git/mst >>>>>>>>>>>> commit. Please let me know if I should send a v3 of [1] instead. >>>>>>>>>>>> >>>>>>>>>>>> [1] https://lore.kernel.org/lkml/20230609121244-mutt-send-email-mst@kernel.org/T/ >>>>>>>>>>>> --- >>>>>>>>>>>> drivers/vhost/vdpa.c | 7 +++++-- >>>>>>>>>>>> 1 file changed, 5 insertions(+), 2 deletions(-) >>>>>>>>>>>> >>>>>>>>>>>> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c >>>>>>>>>>>> index e1abf29fed5b..a7e554352351 100644 >>>>>>>>>>>> --- a/drivers/vhost/vdpa.c >>>>>>>>>>>> +++ b/drivers/vhost/vdpa.c >>>>>>>>>>>> @@ -681,18 +681,21 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, >>>>>>>>>>>> { >>>>>>>>>>>> struct vhost_vdpa *v = filep->private_data; >>>>>>>>>>>> struct vhost_dev *d = &v->vdev; >>>>>>>>>>>> + const struct vdpa_config_ops *ops = v->vdpa->config; >>>>>>>>>>>> void __user *argp = (void __user *)arg; >>>>>>>>>>>> u64 __user *featurep = argp; >>>>>>>>>>>> - u64 features; >>>>>>>>>>>> + u64 features, parent_features = 0; >>>>>>>>>>>> long r = 0; >>>>>>>>>>>> >>>>>>>>>>>> if (cmd == VHOST_SET_BACKEND_FEATURES) { >>>>>>>>>>>> if (copy_from_user(&features, featurep, sizeof(features))) >>>>>>>>>>>> return -EFAULT; >>>>>>>>>>>> + if (ops->get_backend_features) >>>>>>>>>>>> + parent_features = ops->get_backend_features(v->vdpa); >>>>>>>>>>>> if (features & ~(VHOST_VDPA_BACKEND_FEATURES | >>>>>>>>>>>> BIT_ULL(VHOST_BACKEND_F_SUSPEND) | >>>>>>>>>>>> BIT_ULL(VHOST_BACKEND_F_RESUME) | >>>>>>>>>>>> - BIT_ULL(VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK))) >>>>>>>>>>>> + parent_features)) >>>>>>>>>>>> return -EOPNOTSUPP; >>>>>>>>>>>> if ((features & BIT_ULL(VHOST_BACKEND_F_SUSPEND)) && >>>>>>>>>>>> !vhost_vdpa_can_suspend(v)) >>>>>>>>>>>> -- >>>>>>>>>>>> 2.39.3 >>> _______________________________________________ >>> Virtualization mailing list >>> Virtualization@lists.linux-foundation.org >>> https://lists.linuxfoundation.org/mailman/listinfo/virtualization