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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 D9886C25B0E for ; Tue, 16 Aug 2022 22:48:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2DBBD40590; Tue, 16 Aug 2022 22:48:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2DBBD40590 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2022-7-12 header.b=S3PjT50V; dkim=fail reason="signature verification failed" (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=NZ0NCixY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6cuexBJbWkdo; Tue, 16 Aug 2022 22:48:50 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 26E444015D; Tue, 16 Aug 2022 22:48:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 26E444015D Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id ED7D9C0032; Tue, 16 Aug 2022 22:48:49 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id C3CE1C002D for ; Tue, 16 Aug 2022 22:48:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AA3F381403 for ; Tue, 16 Aug 2022 22:48:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AA3F381403 Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.a=rsa-sha256 header.s=corp-2022-7-12 header.b=S3PjT50V; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-oracle-onmicrosoft-com header.b=NZ0NCixY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vqQ2hsRKMBmU for ; Tue, 16 Aug 2022 22:48:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 86DE5813F3 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by smtp1.osuosl.org (Postfix) with ESMTPS id 86DE5813F3 for ; Tue, 16 Aug 2022 22:48:45 +0000 (UTC) Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27GL8fBF024768; Tue, 16 Aug 2022 22:48:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=content-type : message-id : date : subject : to : cc : references : from : in-reply-to : mime-version; s=corp-2022-7-12; bh=aOMDFJDdQ29L6KKeim80D9ev/UbsBqlvk0vehgssKJ4=; b=S3PjT50Vm6ugkwPUIt0pQhB7bi4P8QtiSCgoKlWwW33T4HN5wkoEgCIiR+ZGeTraA2+T hMM5EqGauZzyjaHjGQITvwKvviGkmgTOvf4Sl5VRwfQ+YQVV0Bs/y93unaBdDdYfazkD bFgYpG+0RAvRuhbcszZvYkjQkgkt7WVmdwJ7G8SYG9FZFxIAt2gF9WmqvMHbK2co42wa nDPS+FgadiPM8mUsEodknErhM/W7svIG/uKbkBQlj/Nk78eCqKV1Is4AaWsxkIVqHaqz 1Fqi9L6/+si6tvmqmeVXrbFOFxGTaw/cuLm1JC5Wm4jyvdeTWzRq5RnmjuraG8E0A5Nl JQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3hx2r2fhca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Aug 2022 22:48:41 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 27GK4Akh021324; Tue, 16 Aug 2022 22:48:40 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3hx2d8ybtc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Aug 2022 22:48:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aiziB5AQhTtxekPZ+K2wipE5LDWef2uG2ls3Fcx2NZktqgH/QVJdO9SsXZ8sZbQB+rzcZ3unI+aXz2aVlc3OpiHnM5a2n0ZjB277RGxmGMpl8NWkBrEtLeu1/W7W/JQlFaH8rmyWLRK0yFwJTx7cNIM1Rnp+OQ9g7H3H/DS5HZjWYFycH4j+9p/p57ITk9X8bLQ023UNRGkOrykAfeQOeeNCM2NtY9xz+4jjgaGIJtxWB3BYvUn1M9OXgD+kytXXEKnVkUKVa/D+1PYUViIDmcul4z+M4gdJ+TntOjCczxppTZ3W7PXjNdmtkVXslPLfy0l3SO/qBSQn63t8EYu2cQ== 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=aOMDFJDdQ29L6KKeim80D9ev/UbsBqlvk0vehgssKJ4=; b=NDt+EpVNNHsrNMzkIPl518eo5A5zPgOYpAt7Qc/9Erj0rWsNQIob036Bw6XZ+rT3kZGIxPN4rL7EX0jTUBwKKEbOTrx7NC9pAvVJ8rxbOXH8jgUfENxiaYMGt/PbPyTvjQ6E3U5ICdgtZcLiRBF6thcB/ZIp09fQyW2x67K0Cj3FjwoA+CnU7mhiNcLHMa7yOBdQL+7kffKo37EqWtEjK7gMDzezmwTslt9icG2gGqfPSIa8FMPpnGK0ABILAPutgxDmJKNXfxl8/niuOK+bGWAosQO/NPMyvm83pzzeIaPaJJhWSFApZ8Ogr/Mu65tzp6QEIAMbEldE6Swq5I3bBQ== 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=aOMDFJDdQ29L6KKeim80D9ev/UbsBqlvk0vehgssKJ4=; b=NZ0NCixYRscv9kV/f3Dq0qJhMz04xVo4clyQW43EaukPAdQ0zzLNfeAecGi8ik4zECjbBF79SJsjjNWS4keHzfGTVUiC49bsvikE+0et9onvx8vrinSmpwVQdlcrWzfwZF5Xvxmc1dyTn4adrDJm8NV1pIoqbJC0kj0BkoZyvRI= Received: from BYAPR10MB3287.namprd10.prod.outlook.com (2603:10b6:a03:15c::11) by CY4PR10MB1368.namprd10.prod.outlook.com (2603:10b6:903:22::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.16; Tue, 16 Aug 2022 22:48:37 +0000 Received: from BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::dcf7:95c3:9991:e649]) by BYAPR10MB3287.namprd10.prod.outlook.com ([fe80::dcf7:95c3:9991:e649%7]) with mapi id 15.20.5525.010; Tue, 16 Aug 2022 22:48:37 +0000 Message-ID: <2cbec85b-58f6-626f-df4a-cb1bb418fec1@oracle.com> Date: Tue, 16 Aug 2022 15:48:32 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH V5 4/6] vDPA: !FEATURES_OK should not block querying device config space Content-Language: en-US To: "Zhu, Lingshan" , mst@redhat.com References: <20220812104500.163625-1-lingshan.zhu@intel.com> <20220812104500.163625-5-lingshan.zhu@intel.com> From: Si-Wei Liu Organization: Oracle Corporation In-Reply-To: X-ClientProxiedBy: DM6PR13CA0006.namprd13.prod.outlook.com (2603:10b6:5:bc::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: fb789edf-6e09-42cd-69b8-08da7fd9749f X-MS-TrafficTypeDiagnostic: CY4PR10MB1368:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: weTfciWznIAC5PHxo/rCe3Jwxu3Gr3PsbyhvtYMgt2DQgdk2IAEi/ZcPiANS7ySNheHa0n+pjnE2dA2RBiqBbeEvR0Ry1VDzZk7KmRsNtlBEnjjdTX18ZRlrU4ao3+FrUnzjbcSioztl5PggoJBGzJ4LuwJM1Tde6u8h37czIh/4OuoM95w332yROaZsFqOeEvuSLaiI8tX8qzIt0n5TGBAZNhXBZ7fjtTrPbHc48E0tjuO9QtEgYr1Vfr+ftHGXXN4wMjH1udtVqenOx01N+vr/JUqqfpeBsKIchfyfTIbEw6vmJckeddCeQ+HhTy0q28c7pYQK/rln3Ir+EAn2A0Huc/k3ZzQJUdEdxyWgI1FI77d3DETVwBC9/zF4k5t3Qkc/+n91dumgGK85e+W0Fraq8ACH9iHAt/O44nVr6a8CfXq4Ga7NWAa5HGJE1C0EJhWt7KnFvyRapVgIAnao1/RJjRPzeOLOEh423CJeg8U8AL9nMq47p33IWu/dhFvd161fXvHUvNxkyHyz9tlc55ZMh1yJ5/c07tVJzVAd9AwGTYTME8ERt118A1XGfFY0/lCI1YXAKxPrwS6piAC8th9zT1J21bLIa2pVSyZMHAOgfLS6MOUUG7LZ7UmYRV3gj2+6nggWtm7yeruf3PS7RbKaFV8DIOXXO/ksFAqgF8rMA3d693Q/bIId7Ez4knLuQeH+N3mU2jLsSjPt2+hy+1jLgCKdvD3KldiJCkYX9/tQEk3Ky2BkEwT8I1MqkXsSINqL/hetJRAPMKRj0dysbDHtUd92WtTNDCbRLKsy5o7HSYENDyzZg19m+PW9j1BYle6/sM56Nhk/TDPNEABaqA== 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:(13230016)(366004)(136003)(396003)(376002)(346002)(39860400002)(36756003)(38100700002)(4326008)(66946007)(66556008)(316002)(66476007)(8676002)(186003)(31696002)(86362001)(2616005)(5660300002)(53546011)(6506007)(2906002)(8936002)(30864003)(36916002)(41300700001)(6486002)(83380400001)(33964004)(478600001)(6666004)(6512007)(26005)(31686004)(43740500002)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cklUVGNoT0Z3cmZha1VFWkc2Rm4yVkpPSkhwSEFt?= =?utf-8?B?UnpyWm9ISkxkNzhZTmJSYTZzQTM1cGN6eXdMbmNPYTU3RlR2VWpXbGFTUXNY?= =?utf-8?B?eWlrckE2d0JKK0cvVW9JcWF3azkwT1FWTTg5Y3RkWHdaUThXV0dWenpNV25y?= =?utf-8?B?ZHg3NEp3d2xiSzZpUFZEVENxQ3JBZnpRMHlneVdnZHhzNVlDblozd29OZzFE?= =?utf-8?B?ekhkYVdXeFcrYWI1cEUzZzhQU3ZaODM0T1RPRFRGNjloUXlxYzFyWVYzY3p4?= =?utf-8?Q?P+4WNqIH69g6Nx6w4v2i1DlLOwonwsmPJYasZXI6d0UeoT?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb789edf-6e09-42cd-69b8-08da7fd9749f X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2022 22:48:36.9612 (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: PWaIZQJOaGFLs471F7EExAggblffsB4hPK2tNnNrfQU+3X5bmah80UmgJvvSrIrWOaSQWkdBWFES/ItGlUkykA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR10MB1368 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-16_08,2022-08-16_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208160082 X-Proofpoint-GUID: Nz3KrBZ5YPAg_9TZv_HpeymVF8oE6rdU X-Proofpoint-ORIG-GUID: Nz3KrBZ5YPAg_9TZv_HpeymVF8oE6rdU Cc: kvm@vger.kernel.org, netdev@vger.kernel.org, virtualization@lists.linux-foundation.org, xieyongji@bytedance.com, gautam.dawar@amd.com X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7583481477852579635==" Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" --===============7583481477852579635== Content-Type: multipart/alternative; boundary="------------0i8BQP9fsrY0bWRxxJuYEMA8" Content-Language: en-US --------------0i8BQP9fsrY0bWRxxJuYEMA8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/16/2022 1:29 AM, Zhu, Lingshan wrote: > > > On 8/16/2022 3:41 PM, Si-Wei Liu wrote: >> Hi Michael, >> >> I just noticed this patch got pulled to linux-next prematurely >> without getting consensus on code review, am not sure why. Hope it >> was just an oversight. >> >> Unfortunately this introduced functionality regression to at least >> two cases so far as I see: >> >> 1. (bogus) VDPA_ATTR_DEV_NEGOTIATED_FEATURES are inadvertently >> exposed and displayed in "vdpa dev config show" before feature >> negotiation is done. Noted the corresponding features name shown in >> vdpa tool is called "negotiated_features" rather than >> "driver_features". I see in no way the intended change of the patch >> should break this user level expectation regardless of any spec >> requirement. Do you agree on this point? > I will post a patch for iptour2, doing: > 1) if iprout2 does not get driver_features from the kernel, then don't > show negotiated features in the command output This won't work as the vdpa userspace tool won't know *when* features are negotiated. There's no guarantee in the kernel to assume 0 will be returned from vendor driver during negotiation. On the other hand, with the supposed change, userspace can't tell if there's really none of features negotiated, or the feature negotiation is over. Before the change the userspace either gets all the attributes when feature negotiation is over, or it gets nothing when it's ongoing, so there was a distinction.This expectation of what "negotiated_features" represents is established from day one, I see no reason the intended kernel change to show other attributes should break userspace behavior and user's expectation. > 2) process and decoding the device features. >> >> 2. There was also another implicit assumption that is broken by this >> patch. There could be a vdpa tool query of config via >> vdpa_dev_net_config_fill()->vdpa_get_config_unlocked() that races >> with the first vdpa_set_features() call from VMM e.g. QEMU. Since the >> S_FEATURES_OK blocking condition is removed, if the vdpa tool query >> occurs earlier than the first set_driver_features() call from VMM, >> the following code will treat the guest as legacy and then trigger an >> erroneous vdpa_set_features_unlocked(... , 0) call to the vdpa driver: >> >>  374         /* >>  375          * Config accesses aren't supposed to trigger before >> features are set. >>  376          * If it does happen we assume a legacy guest. >>  377          */ >>  378         if (!vdev->features_valid) >>  379                 vdpa_set_features_unlocked(vdev, 0); >>  380         ops->get_config(vdev, offset, buf, len); >> >> Depending on vendor driver's implementation, L380 may either return >> invalid config data (or invalid endianness if on BE) or only config >> fields that are valid in legacy layout. What's more severe is that, >> vdpa tool query in theory shouldn't affect feature negotiation at all >> by making confusing calls to the device, but now it is possible with >> the patch. Fixing this would require more delicate work on the other >> paths involving the cf_lock reader/write semaphore. >> >> Not sure what you plan to do next, post the fixes for both issues and >> get the community review? Or simply revert the patch in question? Let >> us know. > The spec says: > The device MUST allow reading of any device-specific configuration > field before FEATURES_OK is set by > the driver. This includes fields which are conditional on feature > bits, as long as those feature bits are offered > by the device. > > so whether FEATURES_OK should not block reading the device config > space. vdpa_get_config_unlocked() will read the features, I don't know > why it has a comment: >         /* >          * Config accesses aren't supposed to trigger before features > are set. >          * If it does happen we assume a legacy guest. >          */ > > This conflicts with the spec. > > vdpa_get_config_unlocked() checks vdev->features_valid, if not valid, > it will set the drivers_features 0, I think this intends to prevent > reading random driver_features. This function does not hold any locks, > and didn't change anything. > > So what is the race? You'll see the race if you keep 'vdpa dev config show ...' running in a tight loop while launching a VM with the vDPA device under query. -Siwei > > Thanks > >> >> Thanks, >> -Siwei >> >> >> On 8/12/2022 3:44 AM, Zhu Lingshan wrote: >>> Users may want to query the config space of a vDPA device, >>> to choose a appropriate one for a certain guest. This means the >>> users need to read the config space before FEATURES_OK, and >>> the existence of config space contents does not depend on >>> FEATURES_OK. >>> >>> The spec says: >>> The device MUST allow reading of any device-specific configuration >>> field before FEATURES_OK is set by the driver. This includes >>> fields which are conditional on feature bits, as long as those >>> feature bits are offered by the device. >>> >>> Signed-off-by: Zhu Lingshan >>> --- >>>   drivers/vdpa/vdpa.c | 8 -------- >>>   1 file changed, 8 deletions(-) >>> >>> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c >>> index 6eb3d972d802..bf312d9c59ab 100644 >>> --- a/drivers/vdpa/vdpa.c >>> +++ b/drivers/vdpa/vdpa.c >>> @@ -855,17 +855,9 @@ vdpa_dev_config_fill(struct vdpa_device *vdev, >>> struct sk_buff *msg, u32 portid, >>>   { >>>       u32 device_id; >>>       void *hdr; >>> -    u8 status; >>>       int err; >>>         down_read(&vdev->cf_lock); >>> -    status = vdev->config->get_status(vdev); >>> -    if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { >>> -        NL_SET_ERR_MSG_MOD(extack, "Features negotiation not >>> completed"); >>> -        err = -EAGAIN; >>> -        goto out; >>> -    } >>> - >>>       hdr = genlmsg_put(msg, portid, seq, &vdpa_nl_family, flags, >>>                 VDPA_CMD_DEV_CONFIG_GET); >>>       if (!hdr) { >> > --------------0i8BQP9fsrY0bWRxxJuYEMA8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 8/16/2022 1:29 AM, Zhu, Lingshan wrote:


On 8/16/2022 3:41 PM, Si-Wei Liu wrote:
Hi Michael,

I just noticed this patch got pulled to linux-next prematurely without getting consensus on code review, am not sure why. Hope it was just an oversight.

Unfortunately this introduced functionality regression to at least two cases so far as I see:

1. (bogus) VDPA_ATTR_DEV_NEGOTIATED_FEATURES are inadvertently exposed and displayed in "vdpa dev config show" before feature negotiation is done. Noted the corresponding features name shown in vdpa tool is called "negotiated_features" rather than "driver_features". I see in no way the intended change of the patch should break this user level expectation regardless of any spec requirement. Do you agree on this point?
I will post a patch for iptour2, doing:
1) if iprout2 does not get driver_features from the kernel, then don't show negotiated features in the command output
This won't work as the vdpa userspace tool won't know *when* features are negotiated. There's no guarantee in the kernel to assume 0 will be returned from vendor driver during negotiation. On the other hand, with the supposed change, userspace can't tell if there's really none of features negotiated, or the feature negotiation is over. Before the change the userspace either gets all the attributes when feature negotiation is over, or it gets nothing when it's ongoing, so there was a distinction.This expectation of what "negotiated_features" represents is established from day one, I see no reason the intended kernel change to show other attributes should break userspace behavior and user's expectation.
2) process and decoding the device features.

2. There was also another implicit assumption that is broken by this patch. There could be a vdpa tool query of config via vdpa_dev_net_config_fill()->vdpa_get_config_unlocked() that races with the first vdpa_set_features() call from VMM e.g. QEMU. Since the S_FEATURES_OK blocking condition is removed, if the vdpa tool query occurs earlier than the first set_driver_features() call from VMM, the following code will treat the guest as legacy and then trigger an erroneous vdpa_set_features_unlocked(... , 0) call to the vdpa driver:

 374         /*
 375          * Config accesses aren't supposed to trigger before features are set.
 376          * If it does happen we assume a legacy guest.
 377          */
 378         if (!vdev->features_valid)
 379                 vdpa_set_features_unlocked(vdev, 0);
 380         ops->get_config(vdev, offset, buf, len);

Depending on vendor driver's implementation, L380 may either return invalid config data (or invalid endianness if on BE) or only config fields that are valid in legacy layout. What's more severe is that, vdpa tool query in theory shouldn't affect feature negotiation at all by making confusing calls to the device, but now it is possible with the patch. Fixing this would require more delicate work on the other paths involving the cf_lock reader/write semaphore.

Not sure what you plan to do next, post the fixes for both issues and get the community review? Or simply revert the patch in question? Let us know.
The spec says:
The device MUST allow reading of any device-specific configuration field before FEATURES_OK is set by
the driver. This includes fields which are conditional on feature bits, as long as those feature bits are offered
by the device.

so whether FEATURES_OK should not block reading the device config space.
vdpa_get_config_unlocked() will read the features, I don't know why it has a comment:
        /*
         * Config accesses aren't supposed to trigger before features are set.
         * If it does happen we assume a legacy guest.
         */

This conflicts with the spec.

vdpa_get_config_unlocked() checks vdev->features_valid, if not valid, it will set the drivers_features 0, I think this intends to prevent reading random driver_features. This function does not hold any locks, and didn't change anything.

So what is the race?
You'll see the race if you keep 'vdpa dev config show ...' running in a tight loop while launching a VM with the vDPA device under query.

-Siwei



Thanks


Thanks,
-Siwei


On 8/12/2022 3:44 AM, Zhu Lingshan wrote:
Users may want to query the config space of a vDPA device,
to choose a appropriate one for a certain guest. This means the
users need to read the config space before FEATURES_OK, and
the existence of config space contents does not depend on
FEATURES_OK.

The spec says:
The device MUST allow reading of any device-specific configuration
field before FEATURES_OK is set by the driver. This includes
fields which are conditional on feature bits, as long as those
feature bits are offered by the device.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
---
  drivers/vdpa/vdpa.c | 8 --------
  1 file changed, 8 deletions(-)

diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index 6eb3d972d802..bf312d9c59ab 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -855,17 +855,9 @@ vdpa_dev_config_fill(struct vdpa_device *vdev, struct sk_buff *msg, u32 portid,
  {
      u32 device_id;
      void *hdr;
-    u8 status;
      int err;
        down_read(&vdev->cf_lock);
-    status = vdev->config->get_status(vdev);
-    if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) {
-        NL_SET_ERR_MSG_MOD(extack, "Features negotiation not completed");
-        err = -EAGAIN;
-        goto out;
-    }
-
      hdr = genlmsg_put(msg, portid, seq, &vdpa_nl_family, flags,
                VDPA_CMD_DEV_CONFIG_GET);
      if (!hdr) {



--------------0i8BQP9fsrY0bWRxxJuYEMA8-- --===============7583481477852579635== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization --===============7583481477852579635==--