Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4422836ybe; Mon, 16 Sep 2019 11:59:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrMLezwcG4Gb0nc1MNBeR2S4AbY47lli76GcpIzq4C//oYm209+wsOxVwqeNN01d43Gz6N X-Received: by 2002:a50:b6aa:: with SMTP id d39mr811561ede.16.1568660384386; Mon, 16 Sep 2019 11:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568660384; cv=none; d=google.com; s=arc-20160816; b=y6JdPflXvyJKhdK2uIEv58v73FrbI5WDd1kvJu73U9NmSwywP2G2gQ8KYghpszqpSr oufgf1UiXHhUCW1mHDItwomsjiX61Q3+PLbKJv65XToOSvUQNZAj5lSle7blbfscRNZC xJ18z9v4nXdM1RF7y1klPIA4nSayAX3R3qCZA5SJbF59i+M62tWfde2AWvSVz3oSB9rk 5lqVmCiA11eHAB1jXUW3NgQ1MNBGELl8alahLDXGr/pnOwLrZnWL18CstZ7vooyW7OZv WnWh9OPFniWjc1PQa9HNQxxyK57M3ZIYzdZ95KayKSrId/qthCw+KTAz6BvbVzokE0bu XMww== 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:autocrypt:from:references:cc:to:subject:dkim-signature; bh=aFLGIENEDQOBhys1thGsZ6higxQQlTaU+TMP6ccyh4Y=; b=O9nPqmDZLDJ33YANSaUGOndpa5nXKk+crxAZIH6Ip924kmY6kQ4M2eALOok/LiFBk2 IWeExXcRqgTAHXAqkyC5LmJ4Ncc/BfeZZXCNeUT9FoTier16nGBxU9KSY6as+P7mULwX qSPho8MuWgg/gbXGi5maTL5Qhgo76PUYJVWXLBRTgcWApWR1PmkGarYqW0seVFVF5nAU gNIVVN9E5YAMafGQ8Iij4T8Jvh5AplELoOc7fPa7qqezj5cwMdgSQHnOVuCzK5oXI8iQ DVfRmU2WV7QOO4g8Y/tPHWAkWwzw9eltX2U5HMlfAbO7AfBk8Dvx92rfprj0njUrjz6Q K+yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PzM0Z5Yu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10si5863826ejc.337.2019.09.16.11.59.19; Mon, 16 Sep 2019 11:59:44 -0700 (PDT) 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=@linaro.org header.s=google header.b=PzM0Z5Yu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732908AbfIPM5V (ORCPT + 99 others); Mon, 16 Sep 2019 08:57:21 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44845 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727917AbfIPM5U (ORCPT ); Mon, 16 Sep 2019 08:57:20 -0400 Received: by mail-ed1-f65.google.com with SMTP id p2so31779570edx.11 for ; Mon, 16 Sep 2019 05:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aFLGIENEDQOBhys1thGsZ6higxQQlTaU+TMP6ccyh4Y=; b=PzM0Z5Yud8yQir7fH+iLf2GzB7onVdqE8GWsCpjrxxFYJxBz3iPT9RXPYlL5+7RLKJ B0eJPkBkayQnWh9BdA7YkAvCr7tdmd6rOOEtLgtzWV8Pj6mjjXMcN4xlDHCRcKOL9wsm CmHmGhktWLbIIAqF7npC02At32NC2WzAiBKxehoKv7M3d/Ngb4l237APpecOgFuQHl3A zqjX0k9imB+4Mk2R26QUJvtTO5yQoAQA9z9KE8XMmSJtv7CQ5cJwTbd+M9q8IMsO93EV 9TnImA4fHSr00QdYOeuKatwfMrLxAwJC7oWye16o/qyVuO53YJGcy0GpivWpe1E24y+F sHlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=aFLGIENEDQOBhys1thGsZ6higxQQlTaU+TMP6ccyh4Y=; b=cRV/Z860RpPXh5mg5o6jXMHLJWe5Iz9+HS5n44GAxwp+ZiBNoueMh2zAFSEdqk95TX T2sYSWpGq5TiYTSE7G5lPozOyl6t2p7eWA8RGXFN+8eyXCkVHJgA7yIk+Fk1L8OV2WwF 61+Y09qojxOv9gddo31PO52BQf1B0j7l/3xVqTThOonVk3AZwBYKT8xqERAqHHmdZyjP vEMEfkj8lMQlKeeb9L8WY5xMhJR6yo3cM4UJsdPpLadUko5lC+rz7KIrOGovI7mI15XE GnJrueI8Sk+vl5084jNG9hU8wU6rahkBjNmV66bdwi8viL8/iRqt//nN1ZfadhFTMOOt LaTg== X-Gm-Message-State: APjAAAWk56Xw5aS23ATNdpIzEsdDoteWee7UbNurbBx5ZdcnTGrrZOmQ +NvgTzjp4v7dH9o0JKTe9Tgdzg== X-Received: by 2002:aa7:c154:: with SMTP id r20mr40727034edp.268.1568638638822; Mon, 16 Sep 2019 05:57:18 -0700 (PDT) Received: from [10.10.2.67] ([85.195.192.192]) by smtp.gmail.com with ESMTPSA id o26sm1526150edi.23.2019.09.16.05.57.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Sep 2019 05:57:18 -0700 (PDT) Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file To: Guo Ren , Will Deacon Cc: Catalin Marinas , Palmer Dabbelt , christoffer.dall@arm.com, Atish Patra , Julien Grall , gary@garyguo.net, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Mike Rapoport , aou@eecs.berkeley.edu, Arnd Bergmann , suzuki.poulose@arm.com, Marc Zyngier , Paul Walmsley , linux-arm-kernel@lists.infradead.org, Anup Patel , Linux Kernel Mailing List , iommu@lists.linux-foundation.org, james.morse@arm.com References: <20190321163623.20219-12-julien.grall@arm.com> <0dfe120b-066a-2ac8-13bc-3f5a29e2caa3@arm.com> <20190619091219.GB7767@fuggles.cambridge.arm.com> <20190619123939.GF7767@fuggles.cambridge.arm.com> <20190624104006.lvm32nahemaqklxc@willie-the-truck> <20190912140256.fwbutgmadpjbjnab@willie-the-truck> From: Jean-Philippe Brucker Autocrypt: addr=jean-philippe@linaro.org; keydata= mQINBFjECSIBEACydb9gqSK48ok0i6BQG5HzrtJLuVNNzRJtx7+nbD5GJfSCND/IJBZEJpXC EE5wTsYc0Lrc0UP5CH5WOTrinO5xif19ebgyKebLaFf4EykGuyliWZ5yqjUQTTM1SWQBbVqh eYf4LcVX1HkGXDBc1/I7l1NP4t3MYoBYKz8rrOBh9ZpX7h+0AH+Hhrw3Cl2zD/El5Xbzlr9n UmezRFLOLD9/DI8feDwinqZlumYPTl6w04oZy6t3wOMF5HUXwtUqusS0NAPcsKoP4PIBCWWo up5zyknJHT8G6epZSX/yOv2n0VNIHoQnBESVUJsivpDl0W5XnBoryV7K33uLHbaeeTW/dxrC gyPJ+RsAd6dntGWauYOLC0U8cYefsyVLOtDs0m3m9vQ97J+vu62QwOojTnIFjCCy8D0jZTGX MjKUBLRTVw19YgWZI95PUX2iUo1+GNMLQs4FOZDrf1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e0QaRTFj4uBgdOTkjq+lnjULLUrDjoKnF08sDoO/Gigj5f4bfHjd6dkT4YxPVmHVpHV FmjXNgy0Jcft8I449FCeZv3Ba8KZQ++pB5wwJfgUxJanRMy3aDXYkcn4ZQkV8ogX7DE9gOPw 4pVqNCS6hvzHBAsY/sGGgoxYJQJvTJxovApMyi1YqK3V4BNaHyOyOCSTcoYh8kiOSV/KXEkd aOruGBzKzZyLfHPAnMolBuZ/6NTdBr6F6iy2YIz4whI2i9sGMkPjWh3UcmqeUHBg02cgTPew lVlrgFLPoJ0r52tsxYvE+a+FtBv0KGWk1RJ4bAKvNJUJeGMzAqHhpoQnw0nZhPAvAnAJ3j+Q sNiMLAL+daIAlufLaeYCGKnCw9uOfJWXPMednN/NgfRafHYAOmnmlEh2dXPf+FXSH0mwFWPD 6BrkExywH3k9qVdWUdxd0hg4nRGMAB8KK9KgyBTtmTKrBkScMJbWPlJTHrmMqU8dlQ== Message-ID: <057a0af3-93f7-271c-170e-4b31e6894c3c@linaro.org> Date: Mon, 16 Sep 2019 14:57:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 13/09/2019 09:13, Guo Ren wrote: > Another idea is seperate remote TLB invalidate into two instructions: > >  - sfence.vma.b.asyc >  - sfence.vma.b.barrier // wait all async TLB invalidate operations > finished for all harts. It's not clear to me how this helps, but I probably don't have the whole picture. If you have a place where it is safe to wait for the barrier to complete, why not do the whole invalidate there? > (I remember who mentioned me separate them into two instructions after > session. Anup? Is the idea right ?)  > > Actually, I never consider asyc TLB invalidate before, because current our > light iommu did not need it. > > Thx all people attend the session :) Let's continue the talk.  > > > Guo Ren > 于 2019年9月12日周 > 四 22:59写道: > > Thx Will for reply. > > On Thu, Sep 12, 2019 at 3:03 PM Will Deacon > wrote: > > > > On Sun, Sep 08, 2019 at 07:52:55AM +0800, Guo Ren wrote: > > > On Mon, Jun 24, 2019 at 6:40 PM Will Deacon > wrote: > > > > > I'll keep my system use the same ASID for SMP + IOMMU :P > > > > > > > > You will want a separate allocator for that: > > > > > > > > > https://lkml.kernel.org/r/20190610184714.6786-2-jean-philippe.brucker@arm.com > > > > > > Yes, it is hard to maintain ASID between IOMMU and CPUMMU or different > > > system, because it's difficult to synchronize the IO_ASID when the CPU > > > ASID is rollover. > > > But we could still use hardware broadcast TLB invalidation instruction > > > to uniformly manage the ASID and IO_ASID, or OTHER_ASID in our IOMMU. > > > > That's probably a bad idea, because you'll likely stall execution on the > > CPU until the IOTLB has completed invalidation. In the case of ATS, > I think > > an endpoint ATC is permitted to take over a minute to respond. In > reality, I > > suspect the worst you'll ever see would be in the msec range, but that's > > still an unacceptable period of time to hold a CPU. > Just as I've said in the session that IOTLB invalidate delay is > another topic, My main proposal is to introduce stage1.pgd and > stage2.pgd as address space identifiers between different TLB systems > based on vmid, asid. My last part of sildes will show you how to > translate stage1/2.pgd to as/vmid in PCI ATS system and the method > could work with SMMU-v3 and intel Vt-d. (It's regret for me there is > no time to show you the whole slides.) > > In our light IOMMU implementation, there's no IOTLB invalidate delay > problem. Becasue IOMMU is very close to CPU MMU and interconnect's > delay is the same with SMP CPUs MMU (no PCI, VM supported). > > To solve the problem, we could define a async mode in sfence.vma.b to > slove the problem and finished with per_cpu_irq/exception. The solution I had to this problem is pinning the ASID [1] used by the IOMMU, to prevent the CPU from recycling the ASID on rollover. This way the CPU doesn't have to wait for IOMMU invalidations to complete, when scheduling a task that might not even have anything to do with the IOMMU. In the Arm SMMU, ASID and IOASID (PASID) are separate identifiers. IOASID indexes an entry in the context descriptor table, which contains the ASID. So with unpinned shared ASID you don't need to invalidate the ATC on rollover, since the IOASID doesn't change, but you do need to modify the context descriptor and invalidate cached versions of it. Once you have pinned ASIDs, you could also declare that IOASID = ASID. I don't remember finding an argument to strictly forbid it, even though ASID and IOASID have different sizes on Arm (respectively 8/16 and 20 bits). Thanks, Jean [1] https://lore.kernel.org/linux-iommu/20180511190641.23008-17-jean-philippe.brucker@arm.com/