Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp54440pxa; Mon, 3 Aug 2020 22:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNSgondWFQyO7Xd5wjcbU4NhBu51xLBlHey1y7xO42HcYxPbWEv6oCMqXu/OxinmeNw86J X-Received: by 2002:a17:906:3b45:: with SMTP id h5mr19413836ejf.136.1596519429856; Mon, 03 Aug 2020 22:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596519429; cv=none; d=google.com; s=arc-20160816; b=JB/m69uc2X9zQGsPPLjqLS/ujB5njDoc7q3ikmLJjjU1yTtLNlYGBoB+p9hhHPOHvm fV7NCRE42xOZTy55e3T9WC9ck58AkZ8v1Rss98mNGvRxG4LiQ4Lhw9JA82IQQe9tqSWM GaB4qVIuyL6lGtZu5ujdtmNk425TQCtxcjaFMDMoQ1M3/UL5i1lr9f4Av2ZoYikMvSlp V0b1Q00mrm2GyR7ftpD4rm/+sjNDLw9/5JYYx6k4i7Lkgbe7C1ZLDuKZovdAiC0ItqBY IEACb5tN1/Ht4F/4ZzDxn+Z9BvtdpkMZz3jhCNfg7m68PguyZ+9KLZI+VK+oORVnGiuB Cg5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=uyQNoYlGESQO/9OO+9vrz53k2iffXcZP+/X04lkT/Zs=; b=OHhY6SVcl2NjCeEKQUWIzqpbbZUbhPrNgc7PkPVPWv6djmOoqBUQaITNWqpDJeccAd F8Ghdok6RQCjpPJXjnM3HHyXKEkahDeDmJV+oMtv7vvTNElsqPN1CAbooxGi0dfRicD6 WXMPmLDRuJqwo8tR/t7pcUtjJBz3pd2/p522ewwE69voV0T/81iezq4r6OpJL8VoCA+c +wJAWROU/EO1pFgIQG/aCNZPr0M8OWft+okMM56tteU2ForzyGpGOSFBmNLXpgowakww epF87kJ4qPKZJOXKqfsJogIEmyr4Qw9QopPZBpUepsR+gPl87TxkO2fg9Xk0I/9sx4wY gNDQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yk11si11440351ejb.113.2020.08.03.22.36.47; Mon, 03 Aug 2020 22:37:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729772AbgHDFff (ORCPT + 99 others); Tue, 4 Aug 2020 01:35:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:41998 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgHDFfe (ORCPT ); Tue, 4 Aug 2020 01:35:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 12673ACB5; Tue, 4 Aug 2020 05:35:49 +0000 (UTC) Subject: Re: [PATCH v3 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_* To: Stefano Stabellini , boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, hch@infradead.org, Stefano Stabellini References: <20200710223427.6897-10-sstabellini@kernel.org> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <68f244b5-86e7-4c94-7a22-f9ca53311857@suse.com> Date: Tue, 4 Aug 2020 07:35:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200710223427.6897-10-sstabellini@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.07.20 00:34, Stefano Stabellini wrote: > From: Stefano Stabellini > > xen_dma_sync_for_cpu, xen_dma_sync_for_device, xen_arch_need_swiotlb are > getting called passing dma addresses. On some platforms dma addresses > could be different from physical addresses. Before doing any operations > on these addresses we need to convert them back to physical addresses > using dma_to_phys. > > Move the arch_sync_dma_for_cpu and arch_sync_dma_for_device calls from > xen_dma_sync_for_cpu/device to swiotlb-xen.c, and add a call dma_to_phys > to do address translations there. > > dma_cache_maint is fixed by the next patch. > > Signed-off-by: Stefano Stabellini > Tested-by: Corey Minyard > Tested-by: Roman Shaposhnik Acked-by: Juergen Gross Juergen