Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2825456rwd; Mon, 29 May 2023 01:09:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7E/AweiouTN/bQ6r+cHaJqvPp9r+g3BprPsdVcLDswzwLGePW4ceXnXw6FZQ2eYss4WKkF X-Received: by 2002:a05:6a00:218f:b0:64a:fa71:a98f with SMTP id h15-20020a056a00218f00b0064afa71a98fmr13485703pfi.13.1685347795600; Mon, 29 May 2023 01:09:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685347795; cv=pass; d=google.com; s=arc-20160816; b=NVICWKKI0QVMenbCNAZXK+SaVY7ufs60kKn6MTdPi3Cux+QpJyIA4pAZ/0FmOX84JR eMg09dy+2GvHkYsbM9XDBRStc80gYIJJmTNir4Z687JVLD5hdGdhzvqFTnyNRrzWg3Rw q+ERwjguxgtWsBoQcl43Obfzd2oNuUc4aFC4SKdMfqSW3eaaQI477Zstd8wpHAu+WFx8 78mt1v6ZA36BPC7lM7gwUor99Bjz6LEzAdwKHJkyeIL8vqcGJHTQSxkKcmRo1i43MgQl lr+l8pQD3qATzTV8pAl8AImj+O74DqDYRQcPi7OAV3FmbeDaW+0VXLY85uUr6OJt5zPm 1Gfw== 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:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=wtaSRgdEMB6Z0xl2JA0XToTjrGybNczPhHrXGdMgXj4=; b=tyQ1MYJWqAGg9qqD41AY0hUH0NxzhbNe1fRpOrtjsd3umvkDTfBMuPEKjlqIKs7Wk7 N0/JGH/moi3YpDOMZmHDWX31sc3fKYQn5VttQ1OHfh8OyXJjYpWTjQAyUvotER39MEVN YmVj+4oKokY4MkhPrc6yaGsl7ELAyC9NdzlvGwEE5/W8BbFERD07x/lCzVJCAL90vl+h tjr+ei0dmDC5hQdklJ2gl27HgTMBn23/Oif4YtOhF3nryfX+qF24MGgrWZ4WJwh4QLHG qcrK//H9v28opIp+0NZPsnbQmuTxbbEoDGxN6elqhPahcXyovWf6zxvJvY6L2MG0E3z4 w9uw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=4ZzgypDi; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020aa79493000000b0063b7e907032si5931345pfk.271.2023.05.29.01.09.40; Mon, 29 May 2023 01:09:55 -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=@amd.com header.s=selector1 header.b=4ZzgypDi; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbjE2IH6 (ORCPT + 99 others); Mon, 29 May 2023 04:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbjE2IHw (ORCPT ); Mon, 29 May 2023 04:07:52 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2070.outbound.protection.outlook.com [40.107.94.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B499AF5; Mon, 29 May 2023 01:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZt2VseziN9gpI7cmNiXcLiWT/fwLayvuhOj7UJ+27L/KNvmES8dfgSvJP7Xh12qrEFEDETf3yB0zzTJ46Hxeze8ryc8j50H1KhwcXmCmeCwVTf/HI6ls1rGNURXlkRMk7VVxjzS18ruIfSTk8S00aAnIprYqrlI4FG1yIw4XoMuGzhz1wfTzeG5FB5Hp7Wa0U5sptPMOMzUT3cbeaf596g4RqkGE4Bvms6V83zfEHhtiXdFQx7ddI1DH+fynNmLRUTH10xLzLBcN9oDejy3+Ib/uPmTS3icHWrExHZaQ3RSZLSaM3HtTYl3N7ZGTGrTrCUBkMs1MEryvQ3h25/VOg== 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=wtaSRgdEMB6Z0xl2JA0XToTjrGybNczPhHrXGdMgXj4=; b=b4/yUSHPcKOEnI/5z1dTVL7ZqgrJ0WakO5l8icIxd3/SrsHd5YBFRW7A1meI1dMy9eNFjzPlXeRb6fodKnojMRS1iV7swXKqdwxpw2VuTti/zbnqKvvofC7Mql0dlzQZGo6ABDaLWWjZ5H9tG5gZGi62+BHQZQk2fVor02bmRBX6/rk37YHnyWRJEGpUZb2rRa/GM3J285J+iAFC1B7f7cKKvjTrq58sitatz+VkYhdrBQpEONOQ9z68iIjkBPh2su1r99nkz49nG8HxCdTFX/QoGEfIeIUPXCCDLaSITLKDKtubWvrLhgnvazGq+aE+GXM0wdwHZAMCbbq7plxj2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wtaSRgdEMB6Z0xl2JA0XToTjrGybNczPhHrXGdMgXj4=; b=4ZzgypDiy4mR09QvwYLMTzD32qKgIsUmItx6eAc7A4vBGwHoQJItGh4vRKOKhlR2TcN2BhvZudwjrh7TkxYo0MoWS/M7f49Q9l00IiUQJq2qwAdJcY9Zw4eZ3Fpr9q7slUA8GoZQiCeZiBPj4q1XQ7Gano2Fy7OIeppJUR3QGRs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) by SJ2PR12MB9192.namprd12.prod.outlook.com (2603:10b6:a03:55d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.22; Mon, 29 May 2023 08:07:42 +0000 Received: from CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::4e4f:3a93:b7bd:489c]) by CH3PR12MB8308.namprd12.prod.outlook.com ([fe80::4e4f:3a93:b7bd:489c%5]) with mapi id 15.20.6433.022; Mon, 29 May 2023 08:07:42 +0000 Message-ID: <1bf0323b-1191-de11-061e-00227e09dc35@amd.com> Date: Mon, 29 May 2023 13:36:30 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v6] vfio/cdx: add support for CDX bus Content-Language: en-US To: Alex Williamson Cc: jgg@ziepe.ca, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, masahiroy@kernel.org, nathan@kernel.org, ndesaulniers@google.com, nicolas@fjasle.eu, git@amd.com, harpreet.anand@amd.com, pieter.jansen-van-vuuren@amd.com, nikhil.agarwal@amd.com, michal.simek@amd.com References: <20230517095718.16117-1-nipun.gupta@amd.com> <20230524104529.28708ae8.alex.williamson@redhat.com> <20230524134831.28dc97e2.alex.williamson@redhat.com> From: Nipun Gupta In-Reply-To: <20230524134831.28dc97e2.alex.williamson@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0187.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:e8::14) To CH3PR12MB8308.namprd12.prod.outlook.com (2603:10b6:610:131::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR12MB8308:EE_|SJ2PR12MB9192:EE_ X-MS-Office365-Filtering-Correlation-Id: 232d117e-2ad6-41e8-19f8-08db601bc625 X-LD-Processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GgkF64vuyeBXfCTfJasz9GZXYvYw7p+Fe9YgsmBKVjYzMucF7oDT9LMB3eR4cE1l6PioY7WxD1FWBKg9XDv3rrOVC1kcXWEEqFmKFTPLvsr3lUEqA0F3EpDJYwlbJ1AG5PKZiI7iDaEgzHQqPXbB7dPz7ZonYVQecoPPbOJWEWsHMmWuCGY3/11ZAcN4bPxU455/3QEYfIl6JaQ/eGtN8h/HAhEqgVZO2HxSOMg0TbaakNJq8HBeDNA5jzJy+n8biNrGKex16uwOcbELRzlrf2ofPDBLVIwIE/Wv52Lq4l/fOxziYoBMGnmB5BihhnqgNyl8hh1B7uxwwypSoIsoFaFmI9hoHWiAdOiVMPgHvTjgfUAJa51bFzUHBeZGmSt9XFCBk4fUswb6iSELCFgVaBPnYGGDe7mChv1jxCs+yuxP3JHvnD0WTaPq286PT+ptGIvkQZtRutVtaCrtwpPTdN7NHo3blmlmA2+e7ExqSm5kq2XyxYYeFcL13kCH8zj0tQSFAwAwAXOjOWgNjhXZ6Kiq5QjO/KY7yMxp0V5vfoJs5OcHhoxzUad6mW3oHJAafppT+reaJgJfC5LJDA93tTnaFggtZ7sZ1pHVkwNCO82GMEuACuGDFu+rq9LavzTbyGuPm4MJTL7Mu/YskVZ/ew== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR12MB8308.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(396003)(136003)(39860400002)(346002)(376002)(451199021)(26005)(6486002)(53546011)(6512007)(6506007)(2906002)(6666004)(316002)(186003)(5660300002)(44832011)(41300700001)(36756003)(8676002)(8936002)(478600001)(38100700002)(31686004)(4326008)(6916009)(31696002)(86362001)(2616005)(66946007)(66476007)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NHdQc0FsTHZMS0c2OEZJTGVvaUxneXVZWFRrK2htSXJWSmJVc2xUQUNtejVV?= =?utf-8?B?VVdzMWt5eVBvS0M0ZG40YWJCcm1IVGZubXJqYWVYTmpQeWJqeHI2QUd3bUFh?= =?utf-8?B?aGJsT0xlMjZRcTRyT3BzWXhGUFhXQnN1ZUo5dmlhc0gxUVA3YWl1dW5GNTBM?= =?utf-8?B?V0dsaTRWdXZLd2x1emNBN3NwNlNXdHRrd3pSMjVTODFUTDdCUDF4S3NSZlg1?= =?utf-8?B?VTlRRXdLclc2WVQ5MTFQMCtmOG5aeXJMWHp5RUVmVDQzOFZ6SWpSTEdCOVor?= =?utf-8?B?RGFzSmNUeHBMZHUyR3V5MndpaHl4eEFPUU9HdGNDNmJrbURNUkIxWGFSSEt1?= =?utf-8?B?YzhEbytvazAycnpDTzBoRHVBYnFod1RnUzJpVlpUNHd0R2J4MEVKbDk1UzJZ?= =?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exchange-CrossTenant-AuthSource: CH3PR12MB8308.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 08:07:41.2873 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mnrJsOuPAJ9DYdog7bxPosW3W/qZWjGWFqLHauOBT1nRPAUL5z7hvWMbmKsQgctU X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9192 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 5/25/2023 1:18 AM, Alex Williamson wrote: > > On Wed, 24 May 2023 10:45:29 -0600 > Alex Williamson wrote: > >> On Wed, 17 May 2023 15:27:18 +0530 >> Nipun Gupta wrote: >> >>> + >>> +MODULE_DEVICE_TABLE(cdx, vfio_cdx_table); >>> + >>> +static struct cdx_driver vfio_cdx_driver = { >>> + .probe = vfio_cdx_probe, >>> + .remove = vfio_cdx_remove, >>> + .match_id_table = vfio_cdx_table, >>> + .driver = { >>> + .name = "vfio-cdx", >>> + .owner = THIS_MODULE, >>> + }, >>> + .driver_managed_dma = true, > > Hmm, looks like cdx bus is broken here, there's no actual > implementation of a dma_configure callback and no setup of the IOMMU > default domain for theoretical cdx drivers that might want to use the > DMA API. Without that, this driver_manged_dma flag doesn't provide any > guarantees to a vfio driver that we have exclusive ownership of the > group. Please fix, this flag needs to actually have some meaning on > cdx. Thanks, > > Alex Agree, this change was missed on CDX bus and we are working on fixing this. Shall I send this fix as a commit with this patch? Thanks, Nipun