Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2341442ybe; Sat, 14 Sep 2019 12:53:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqiedr3ZPh8uWpWbYy7d4FhM2jep5JMzVciR7DpUfsP6O/dGgKXIwA35d3gFrIWoCcShR3 X-Received: by 2002:a50:c908:: with SMTP id o8mr54482628edh.187.1568490798416; Sat, 14 Sep 2019 12:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568490798; cv=none; d=google.com; s=arc-20160816; b=nvwzWBUhKhzE0hcLFDsLrXdCsZuTdeLGVhc2fmuGG00iaeRGWF6vr2yrKeLJltou8v mst1T6AimasiGpgGDF6rnk32AAPrH3QkMPixjwIRPUCKJ/eomKIuhWb48DVlruiRpH5O td+6uOfOHvZMreaRQBebJIFeTzMh+xEwYLyjBnT/n4na9c1oH0zZABID+sU5e4nok0vt +Wh0s/imOr87lYZxkcmodRoJ5Eg3FftlzCqaE/Pko+9zMwjdgqIu02yfYqfjpmZ/kFbk oXSV+Bs1vJDsREPA4h61ZHc/C8juMMHvx0W5UDlHBthNIUAtOrm12woxH3YMcIOo3qac 2lSw== 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:mime-version :message-id:to:from:cc:in-reply-to:subject:date; bh=SXwC5T6wCRhaSBRQu04uBARGF1aDUDc2HyVfMMcCfp8=; b=0PrvpvQUCC/NaIdDXepH8VDzqh38bd9S9YiRDdqES31+9f57Rqwm1ctmnnAtIbLEcN N8tyeAiigJa4F3NcZRzTSwESEZM4Alxspkfr+81WnMpr6ypY7BHtXzLXcrU6HEGoh0vB 17JHtUOTGwQh1PRKCuTr+IO75kTDbglKwn+0nvW1HocBbfzIgbwd3tsS6MeYzy9QFd8/ i0L3wclBbpGBqJw61uy6NqDmu2xES8G58BCOMPPo+xheO7GDgVtTnswLlf8z8XQVnYIY h/0kV/Kv0k6+mgIf2ycpqPnSvmThLUmu8/4OgDdDHWEEbQLprt2fEOv5SpZHJw2gmwMn syKQ== ARC-Authentication-Results: i=1; mx.google.com; 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 b21si252546ejq.343.2019.09.14.12.52.55; Sat, 14 Sep 2019 12:53:18 -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; 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 S2389055AbfINOBb (ORCPT + 99 others); Sat, 14 Sep 2019 10:01:31 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35283 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388939AbfINOBb (ORCPT ); Sat, 14 Sep 2019 10:01:31 -0400 Received: by mail-pl1-f194.google.com with SMTP id s17so9631240plp.2 for ; Sat, 14 Sep 2019 07:01:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=SXwC5T6wCRhaSBRQu04uBARGF1aDUDc2HyVfMMcCfp8=; b=SCVHZIrywLbmty/LMXdlXjKcx/2ZcrhFdFrRSVBT93CPCrqzmkKmHJ7RDpe0OLnwUf M2M7XvfPUhs67MWCsdeh30GZVgtDANGYByqdW4xyxvfgwMvre8wfSAWbj9jg0wfXR9lJ CJQLP53nW6Kz+yD0iZq1pmeEATQUsJwgazrxXLwqdTCDn+SPG4X8iucXH+kl+shqdsqQ m+aEjn1Jrh4FFSmfWF2Iq19tAecTmtnDB5OP0cc6cXrHHLf1wNjHDrxttTSb3XlRVw15 XdCpsfMukpJVW4XdQNfnED+y5eeqEHgS5M2UZ2FQGqA8H0mhEmzYOWcduoUmODe4HWA9 9TFA== X-Gm-Message-State: APjAAAWB6NxGVATDfF5vrr7JXd7E6rt7lVsd8bxzNHg1a5bd5z/bDZtK LpBf/8frY3QwsS2VIlJtPTDDvw== X-Received: by 2002:a17:902:d685:: with SMTP id v5mr16361073ply.15.1568469690307; Sat, 14 Sep 2019 07:01:30 -0700 (PDT) Received: from localhost (amx-tls3.starhub.net.sg. [203.116.164.13]) by smtp.gmail.com with ESMTPSA id u17sm6671227pgf.8.2019.09.14.07.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Sep 2019 07:01:29 -0700 (PDT) Date: Sat, 14 Sep 2019 07:01:29 -0700 (PDT) X-Google-Original-Date: Sat, 14 Sep 2019 07:00:16 PDT (-0700) Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file In-Reply-To: <20190912140256.fwbutgmadpjbjnab@willie-the-truck> CC: guoren@kernel.org, Will Deacon , julien.thierry@arm.com, aou@eecs.berkeley.edu, james.morse@arm.com, Arnd Bergmann , suzuki.poulose@arm.com, marc.zyngier@arm.com, catalin.marinas@arm.com, Anup Patel , linux-kernel@vger.kernel.org, rppt@linux.ibm.com, Christoph Hellwig , Atish Patra , julien.grall@arm.com, gary@garyguo.net, Paul Walmsley , christoffer.dall@arm.com, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org From: Palmer Dabbelt To: will@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Sep 2019 07:02:56 PDT (-0700), will@kernel.org 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. > >> Welcome to join our disscusion: >> "Introduce an implementation of IOMMU in linux-riscv" >> 9 Sep 2019, 10:45 Jade-room-I&II (Corinthia Hotel Lisbon) RISC-V MC > > I attended this session, but it unfortunately raised many more questions > than it answered. Ya, we're a long way from figuring this out.