Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6002405imu; Wed, 30 Jan 2019 07:12:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN4gC6K9c5iwcyHOLgSrb4yQoAQou9XXU6Cvc1XlcRnAZxjclse6cMXm8E9PSRuANKOWn91j X-Received: by 2002:a63:5346:: with SMTP id t6mr28323436pgl.40.1548861130122; Wed, 30 Jan 2019 07:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548861130; cv=none; d=google.com; s=arc-20160816; b=AzSZkitAUMMP7wa+5DooKeWbMhjGmFiRqW9SY3qp8/purkmJwdJaW/1AK9L2sr6ggL V9LUm2cVkh2JMtzPdxMiyiTm0jlxsHVSx8sjjn8hBAPFj/0uIcQ2jpHv8c0iUF5JHuD0 opG4QlQOq7ZafnNMOq2u8Iv9RxzRbiBkoYS8jkFWulf6TnWxwkJmmBHZgy0l2tKUm1uS mvJ8ub9YS6ApEGKM9yWJdmLVdufy8czWPjgY5D5yD9bG9trYquzQSRPW9XYMncuS91q8 AUnB0xRqXrelY9a9OHZ4tbF5CnUFoMW8emUW22DoOsbdU1b25TX8fdC98xDKoe25xJs2 LiiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=8IPWLcW/t188ThKVQN0x38tCMjcAGeDzbsnMAiTJHDA=; b=KANgmUrQxOANEy4cCSFhhta1KTSiIpv4IdESLnzlZ7FKevZO9zdKZgY6oZXOOuMsEu 1GgVvK12xwLcQjY+Pop8HEND0UpbF9gDA4cNSMFf3Dej0ZPqbKnLmuEH2ZidYowtqRzC P0gOpE4gizQgMVhr+UVhYI1GPtQgYcc15SNKJ25+BzcmLIT4t0kSpdCyAPR/U6XBMPuI BrkqwUCphd0pO4Z+co0Lu2wQU+59Ieo56EqvrnrivIUHdQJh6wAlOfKthJ2nAriyTYCh t0K5kL53HhlFNnG9Q8odXnI8bSFABpbkbEGVocGYHYO4GegfSDZbZzacYEtkM1Zjlwlx sQNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=f74xczSs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i35si1691196plg.396.2019.01.30.07.11.53; Wed, 30 Jan 2019 07:12:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=f74xczSs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731681AbfA3PJh (ORCPT + 99 others); Wed, 30 Jan 2019 10:09:37 -0500 Received: from mail-eopbgr680071.outbound.protection.outlook.com ([40.107.68.71]:39968 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729203AbfA3PJg (ORCPT ); Wed, 30 Jan 2019 10:09:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8IPWLcW/t188ThKVQN0x38tCMjcAGeDzbsnMAiTJHDA=; b=f74xczSsxMJNIq1wbMdjoCSzsB4yd9n4BuK8HF7Llv6mNalKGT9dd8NZl1J48sR3m3Q1mRiFGXbc4kkoc/efany1ZwaiUDtTPPeUV9fPJbXY5U1xaVi8JHhHbDQn6uxLk1NvG+fOdLP8/u5LT39FesNFop1BdVjSkYNcmlAzYqY= Received: from MN2PR12MB3631.namprd12.prod.outlook.com (20.178.243.19) by MN2PR12MB3232.namprd12.prod.outlook.com (20.179.82.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.18; Wed, 30 Jan 2019 15:09:34 +0000 Received: from MN2PR12MB3631.namprd12.prod.outlook.com ([fe80::a861:43c0:476d:e044]) by MN2PR12MB3631.namprd12.prod.outlook.com ([fe80::a861:43c0:476d:e044%5]) with mapi id 15.20.1580.017; Wed, 30 Jan 2019 15:09:34 +0000 From: "Lendacky, Thomas" To: Joerg Roedel , "Michael S . Tsirkin" , Jason Wang , Konrad Rzeszutek Wilk , Christoph Hellwig CC: Jens Axboe , "virtualization@lists.linux-foundation.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "jfehlig@suse.com" , "Grimm, Jon" , "Singh, Brijesh" , "jroedel@suse.de" Subject: Re: [PATCH 3/5] dma: Introduce dma_max_mapping_size() Thread-Topic: [PATCH 3/5] dma: Introduce dma_max_mapping_size() Thread-Index: AQHUt67EIYwmAcLd10+T+UeE6WZPWKXH7DsA Date: Wed, 30 Jan 2019 15:09:33 +0000 Message-ID: References: <20190129084342.26030-1-joro@8bytes.org> <20190129084342.26030-4-joro@8bytes.org> In-Reply-To: <20190129084342.26030-4-joro@8bytes.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0501CA0043.namprd05.prod.outlook.com (2603:10b6:803:41::20) To MN2PR12MB3631.namprd12.prod.outlook.com (2603:10b6:208:cc::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MN2PR12MB3232;20:mX8Ifu8FHC10xEK1eyP7XSYGjheK0jVv/60sGLd/+xb/EvDUarlG3nDtVd64XZVsOvJ9HVG9E/H8T8XV93loHILjbaIv3Upyoqiu98LecPrOlYRpalYAPOk6CGM8PF7krmxD6Y8jSqtWQ8/w+8ay7NemlbrBWzVipppxRuogfeeRyWZFssmgQYZLjYsTOwmHl5CYDvcIm1VdJ6IkTVZ5NkfEmJniCluDJRROJTo+HA/3jFuB5G52rOyh/zKx+GZy x-ms-office365-filtering-correlation-id: c832f9a0-9c71-4cf8-5450-08d686c4f109 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:MN2PR12MB3232; x-ms-traffictypediagnostic: MN2PR12MB3232: x-microsoft-antispam-prvs: x-forefront-prvs: 0933E9FD8D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(366004)(39860400002)(396003)(346002)(199004)(189003)(2616005)(53546011)(102836004)(25786009)(6506007)(6116002)(386003)(3846002)(6246003)(26005)(6512007)(81156014)(81166006)(4326008)(8676002)(99286004)(52116002)(31686004)(106356001)(105586002)(6436002)(76176011)(68736007)(8936002)(446003)(72206003)(11346002)(486006)(229853002)(6486002)(476003)(186003)(2906002)(53936002)(478600001)(97736004)(256004)(14444005)(316002)(86362001)(14454004)(36756003)(66066001)(110136005)(71200400001)(54906003)(7736002)(7416002)(31696002)(305945005)(71190400001);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR12MB3232;H:MN2PR12MB3631.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: gSJCTQvqh72qzFkcSPLmg09UDacuIYr2JD0HvCKkUXW2hKcQ+5Ry/mGgTlU5Z1acLKPjuCGnVcw3lqWofdckSavD0+aFLYfU5KiRqg1cwdu1733wm8gk2CV/30gSdgPe7bPQOaq2RhRaR7kIjieMyJv7Pe2aur7miiuFrhZjMmJumFarJjnXFEraxgh4st8nqrsr4Xf8KgO2F7kw/qB48GLt2x0fVpoO16aU5tW/zS35m1nwroHJbAQ1pNgUtRfKAPzukV1rBAKUarhpea+ZpCRjRya2F0nN/OobXkindVMUjgMuty9k+aeJG+o+S5zXN8rLMvmR+dVrWrt8k5bthBmGMQy6prJ2p71y0g/D95AGMBAB1QcSmXY2KTK/sHEIELi1EA+qAG89M2nO4qXotzc0tSWHP79yuDPwHNul6x4= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c832f9a0-9c71-4cf8-5450-08d686c4f109 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jan 2019 15:09:32.6220 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3232 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gMS8yOS8xOSAyOjQzIEFNLCBKb2VyZyBSb2VkZWwgd3JvdGU6DQo+IEZyb206IEpvZXJnIFJv ZWRlbCA8anJvZWRlbEBzdXNlLmRlPg0KPiANCj4gVGhlIGZ1bmN0aW9uIHJldHVybnMgdGhlIG1h eGltdW0gc2l6ZSB0aGF0IGNhbiBiZSBtYXBwZWQNCj4gdXNpbmcgRE1BLUFQSSBmdW5jdGlvbnMu IFRoZSBwYXRjaCBhbHNvIGFkZHMgdGhlDQo+IGltcGx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