Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp880173pxj; Wed, 16 Jun 2021 16:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1n0uI2J/9xqclFRD41tWOmD1Q1RvkEdZf0hIImdwlIdc053yig5CrfyvvP+snW15m50YH X-Received: by 2002:a05:6602:1348:: with SMTP id i8mr1327722iov.208.1623884958491; Wed, 16 Jun 2021 16:09:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1623884958; cv=pass; d=google.com; s=arc-20160816; b=vW4DT0j59SrKmtmaf4mh3F3R1hk23Peu3lBKlUhFZqF2awl2lITxGh3H8RZoLUebBg 9xSjI1qzespdqx+g7nGs+Jkl+7jRNmcIn8EMCnQ4S6/jAgZG1DPUZFoRUNOT0ET9KmbN jVq7ZNICwcbUqFninWa8YhlVsaZ30PScl+eazcMUYBFeL+55MI5wGLNiJoo/JvSpiPIq jJJO1IYqsY33qrgOHojqdl9riL/2dVT6vKtKj96dkjAnNnq+js/O9/qFZs0B8PNRTujW iLVKK/CBmQMwqNZaAhp9wOY0FIkKpomB6TnptSEZPFd7BuJKSaQMDzwYxf0+KsmzMpuw nrzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature:dkim-signature; bh=9o4zO9/76jPH5jhgzUljYo/DDXq6qELutUc+AEOe64w=; b=gFVE3Zz6uqEB44NFpDM/i9EiafRhWkvmrMa9rIO8z0xOraZNZWm0cC3DN+hGUwhKVf X+UNYfrfHVagQAfhrzPnZve4xLNyRlYcUVa5at3R3SGhqaMjG6k5EGXIOeK3IItteLnr mOMHkkmnaNGtmT+6BWDm+w0m9wvL4CuTbUslgdO2veHSQd+ye8zqwf98Kk4pnFIKzSIm nQHI61B56QgnrqxNdzoGSNsbPoXm6w+DGlbjWZB1C6NUmQ/LzwJDfsTJn92ctjSLwWzR d61s+krbZc39rNyrw08LCakUEjy7AO/qMO8gpn1RcFue0PgFfIbIg+PJka8sl0BtZZVS B2Aw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=lgYqKRI9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZtI4ZxZR; 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 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r127si3872454iod.92.2021.06.16.16.09.07; Wed, 16 Jun 2021 16:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=lgYqKRI9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ZtI4ZxZR; 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 23.128.96.18 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 S235257AbhFPPn6 (ORCPT + 99 others); Wed, 16 Jun 2021 11:43:58 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:4534 "EHLO mx0a-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbhFPPlf (ORCPT ); Wed, 16 Jun 2021 11:41:35 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15GFVgrr000890; Wed, 16 Jun 2021 15:39:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=9o4zO9/76jPH5jhgzUljYo/DDXq6qELutUc+AEOe64w=; b=lgYqKRI9MPy4nW7kNY2WaylETH8CBbHQUO2m6cLQ2Lh/hkDjeDfAATY3PeHYndQpakKB K+79nVgf/tzE2YkF6QljrxMZFGBNws2CYzGsJ8JBixwuq8LsZcZ+QVzJ8W5032g0YtRH FBwa4zFI/fBZ7ltbjazO4JGrdhSEPxPYyOAtmYEl7Dg6z5dKp5qZuPXInsDVta5Rpe+z Et5nwHgbP9VteRFW7CA2lKGHxvKPaxiFSUJ7nH+AjYcBuFkVPEPumzWM+imbHLPu2lSP d6MMmnb1zIp25L8v+l+Gj9dALkOSdKLkBA++T6gHh5VJfgcf6yk5oSSXF6qS6dE7+cdT vg== Received: from oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 397jnqr7r6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Jun 2021 15:39:18 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.podrdrct (8.16.0.36/8.16.0.36) with SMTP id 15GFYxr4079246; Wed, 16 Jun 2021 15:39:17 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2168.outbound.protection.outlook.com [104.47.73.168]) by userp3030.oracle.com with ESMTP id 396wap0u7v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 16 Jun 2021 15:39:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZBJN0eTMw0U99qaOm8CFe0MiCTUETF/LmmFsaNSxyMvZMRNQmyZv/iYmBaW975rseVcHsE9Qwh0UQwWl/5tr8lGaP38z/04qgsd+Kl1CVZBvMWtyTf4Bq6gYGS8nh7pBaW8QgVpeZyDlE+oOQa7Pv9zlp/uW5E5tVo0HK9tD37pCdCjgMQouqaOhFkWXceAOBby+WLucg3u8Vqlbeb1gLt33j/kihXtVSKPRoN0Sw8cPDTfsErYF7wxXEPAiggaiUSj87QXhkab5i3koV7rEiD+dbt8Z/VltUDOKwe9RRY08jpaAtYzlt9DQBYin04yPVtYhwjXLtdblUErgZkzRTA== 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-SenderADCheck; bh=9o4zO9/76jPH5jhgzUljYo/DDXq6qELutUc+AEOe64w=; b=NnOIjolSG58jDXOfo0uCfTDlONJRkNijR9OFKJgmMUAs+VLGPH97tcO+7PqS20+OOO2i6/AM/ieR08rV2wEo9X4KYsuaI3jEpsVjbrMVp2dyUkTi1W1dX8jMm7GW3z4Z2yh1uSjPmV7GKlOtaEYxnBquw5A0Gh9hlq9NpceUq97LwnNyw7zKUaVDf9R7PV0R1vnIWusR/+xkmgwj2Kec8o9F6KVxp2IEpg8uPxaXx5aQ0l/i6mttbKkICpwjol3oj06Y5orjJj93DMCq2aKuXoLjNhYezkRvUxMv8X5QIIFqaNJ5iq3fKxsm3aI6A6PhXaH9ZbqrqjYuK5//H5hBNg== 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=9o4zO9/76jPH5jhgzUljYo/DDXq6qELutUc+AEOe64w=; b=ZtI4ZxZR1MLhG4gtn/sdI3YMq5LF4Zz26C/dm6Xsl7b4CXcvrm+xafMe6q23t47NXOrp865vcQ8oZ9riXvT1RrHdWG+/KbuAhf0PS53bnbINWkDC0jp3D3O0JM0HgODJO309kXfa4VSc2IWZIg48dA3HjK2UsPiNdow0D/FrS2s= Authentication-Results: epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=none action=none header.from=oracle.com; Received: from BLAPR10MB5009.namprd10.prod.outlook.com (2603:10b6:208:321::10) by MN2PR10MB4288.namprd10.prod.outlook.com (2603:10b6:208:1dc::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Wed, 16 Jun 2021 15:39:15 +0000 Received: from BLAPR10MB5009.namprd10.prod.outlook.com ([fe80::78a3:67d:a8ca:93cf]) by BLAPR10MB5009.namprd10.prod.outlook.com ([fe80::78a3:67d:a8ca:93cf%7]) with mapi id 15.20.4242.019; Wed, 16 Jun 2021 15:39:15 +0000 Subject: Re: [PATCH 2/2] swiotlb-xen: override common mmap and get_sgtable dma ops To: Christoph Hellwig Cc: Roman Skakun , Konrad Rzeszutek Wilk , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Oleksandr Tyshchenko , Oleksandr Andrushchenko , Volodymyr Babchuk , Roman Skakun , Andrii Anisov References: <855a58e2-1e03-4763-cb56-81367b73762c@oracle.com> <20210616114205.38902-1-roman_skakun@epam.com> <20210616114205.38902-2-roman_skakun@epam.com> <2834cdc0-534c-4f07-1901-e468a7713c1f@oracle.com> <20210616142148.GA764@lst.de> <83353b34-2abb-9dfc-bed6-21d500abf49f@oracle.com> <20210616153519.GA6476@lst.de> From: Boris Ostrovsky Message-ID: Date: Wed, 16 Jun 2021 11:39:07 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: <20210616153519.GA6476@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [160.34.88.136] X-ClientProxiedBy: SA9PR11CA0018.namprd11.prod.outlook.com (2603:10b6:806:6e::23) To BLAPR10MB5009.namprd10.prod.outlook.com (2603:10b6:208:321::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.74.102.136] (160.34.88.136) by SA9PR11CA0018.namprd11.prod.outlook.com (2603:10b6:806:6e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Wed, 16 Jun 2021 15:39:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e8f31f4-5250-47c7-72c5-08d930dce567 X-MS-TrafficTypeDiagnostic: MN2PR10MB4288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0UL7UXMMgLuE6DoiuUnfADfQhdLKp/OHK9PL2ed4eTI9RLPXu+rnsKMvUJlm2fFswTnDXVqXJTPlKCrTPNoa1koZXYWHPh6ugeqeQAwc4uS6P66gBmxBk9m3PBsOBc/O0yHSry4ql8PXePej88tPUVlQtECskpa02NGtmkDzKKt0We9DuvzPKBmrMjgMVaKatHaiXgdbCs1T9bPcftthwi0rLN9+5iqggZe34tsDgWsrXRW3WZsAb+9D2t+L5hgb3MR/QCyLOmzmI/so8m4eycaPCuiUaekdH8GVsUIGIXR5hAfESIlMK07WhxFSs3jPdo8ekXKOAjclG6BOwO/Wa0OndGqP2EboMrj0btndkDdCuPcXYPVeFCawQBL4OljFxJRcMYpPQd62NkHidPF+eUXA01GR+50t5T91Sv4NjfGMKEovFcvrsFLCWII+4eEffl05j7wtyLknoB4T9VyG9+11K2g0snUHuKRQBXqyoWX+A+YwDgCPaOVmqXFxsL2n3CuLy0+ZFNwpJyubLQ3smv5xegS3ytgyjf3SPaOXepP7m7DKFYZEQLR59ZncxEFYXoAiMfCEclTsCZZdLmNZiDU5lUv/ZeZ26vupBWK23vtSA1vuWAuHvorOJ7bGwxkjhGwkqSZxoVjpi/9T6w7MqZQd1gJFfc/r7J+1kWV2CNEpDgdEwSHWcdaI3fhszxR9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5009.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(39860400002)(376002)(346002)(366004)(136003)(66556008)(66476007)(66946007)(7416002)(956004)(38100700002)(2616005)(6916009)(53546011)(54906003)(5660300002)(6666004)(44832011)(8676002)(4744005)(4326008)(26005)(16526019)(86362001)(186003)(8936002)(316002)(36756003)(2906002)(31686004)(478600001)(31696002)(6486002)(16576012)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Nkl2dTgwUnhqcjY4SEFSNFk2VFUvTFo0UkJ1UFJJVkhKTUFXU3ZtdUVSNURC?= =?utf-8?B?U1hwUk1NcnZZOG5DMlBvK2dhenpseFBYY1ZWdjBNQ25yb3p2c0VnWjVjcUMr?= =?utf-8?B?MjFKS3BtdU9DakJ0ZmdxZXFleUJ2Y0hLT0VpYWFKT3Fna2JhK1JYU2ZNRkhS?= =?utf-8?B?UkJRY0UweEpQRTdCT2lKVmpqSDhWbndVSXVIcDdzS1J5SE9XOU5QRWRtcW9J?= =?utf-8?B?LzVDa1dMcmdaYjBkUTl5NDlaeDZObS9SMVY3Znl2VGMrT245TG5G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NitCTWVzYU1wc1IreGN2VVUvaUFYK283ckYvdjJwNGJU?= =?utf-8?B?MVg0RzRERTZKaW1KVGRvMWV0UEFZK2V1bkJnWHROaEllOTM0NExHdWhkK3A0?= =?utf-8?B?OXc2MmlHZklQd3laM1lHSzFXOE5HUTVuc3p1QVIreFRZdzdHcC92OHpVTjll?= =?utf-8?B?cXVRNHZua01sU2ZlQnNYcS93RkNod1RvWnFMRTFDcDRBd1VSQkYyVEhlVWRI?= =?utf-8?B?WmswcVdaMUNHU2lBNVpCZTZ0bk5BOEpjOFo0UnNndGtsOStmejRscy8xbWxZ?= =?utf-8?B?ZGdPdDd1OUwzQTRzWXpYUmVSUVNpUS9jTFc2MnBFUEN2QzQ2RmNSWllBR2FD?= =?utf-8?B?c09idEt2MTBJNU5Cbko2VDVvdExnSVBTeUs4aFZSZUNRdVdwbzZkZ3JoTWN4?= =?utf-8?B?R2lsSEZTcXlDUjVTdGI4SzFwUy9vODhCRGZtdlpReFB5Zm1rdzNXcDNRWFZN?= =?utf-8?B?NHBYYTBBK09jZ1dsMW14amVFT2ZsYytJWUt4dXk3Wk4zTjUvNE44aGI4TlE3?= =?utf-8?B?MktrOHpBSWh0aVppckY0aXFCdE1DRGo2bjBuNklYL3NVZDlqNU9mdDBmaFVN?= =?utf-8?Q?FeaCpjFqICWItRg11+Kq79sBQTi7tPQBowjFqzF?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e8f31f4-5250-47c7-72c5-08d930dce567 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5009.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 15:39:15.1267 (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: 3ZeGRt4qcV4Kmmp09CJ4TuWSOOBYt6SRkKrTekZXPfkq/lHraD1a0QZoLKMYnIf6pyLGCAfIAOptWqZCfafWCYlURdIeTSPUlYYnmdHbsSs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4288 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10016 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106160089 X-Proofpoint-GUID: XLkRvkGr5dscz3vWtyy9po6ZAzrd3rO9 X-Proofpoint-ORIG-GUID: XLkRvkGr5dscz3vWtyy9po6ZAzrd3rO9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/21 11:35 AM, Christoph Hellwig wrote: > On Wed, Jun 16, 2021 at 11:33:50AM -0400, Boris Ostrovsky wrote: >> Isn't the expectation of virt_to_page() that it only works on non-vmalloc'd addresses? (This is not a rhetorical question, I actually don't know). > Yes. Thus is why I'd suggest to just do the vmalloc_to_page or > virt_to_page dance in ops_helpers.c and just continue using that. Ah, OK, so something along the lines of what I suggested. (I thought by "helpers" you meant virt_to_page()). -boris