From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6AE8C4CEC9 for ; Sat, 14 Sep 2019 14:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B512920717 for ; Sat, 14 Sep 2019 14:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389077AbfINOBb (ORCPT ); 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-Google-Smtp-Source: APXvYqwLzMQI8pZxkVqd8/Fy8A16315KeB9n6NzIBBSxCASBhPGKSRyvm9h7GHG8COZItU0wdTcuOQ== 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A3C2C4CEC9 for ; Sat, 14 Sep 2019 14:01:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E419B20717 for ; Sat, 14 Sep 2019 14:01:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XF0ExkML" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E419B20717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Mime-Version:Message-ID:To:From:In-Reply-To:Subject: Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=N+qpecLLaXUgtWV2VWZg3jt1i8OQFgz8SABAxyVHLcU=; b=XF0ExkMLtnD3xKjOrdHjHVYdB fCZdn+y/6XDZmlbofin3GMIYVBoumQ3G+zi1mwD7SP+5yo9qCguxJ1uT2rcapwEBtqpOII0ovnZd9 LcIklKeTyTjomem4jSo/ZudlrHYpTLYEHzRksRUA3dFJuzOXHpIl/n/QwvJ3dOA2x9bJUxBeNnp0A rp8JImHeDw0ByWsuTPdp7iIMMVQ3RJ/47Rnhjzg4+FNA+plgCSdG8khkMPswOGTRn6ofFe0d4Ym23 o9vmuu16tzJF4odKFglxYrCCg8jYYayB/Bp4wA35o2MqEC7+ITHwuWdDUuu1H9ozEXcNLWKrSO75E YebQViGzQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i98cI-00036A-HU; Sat, 14 Sep 2019 14:01:34 +0000 Received: from mail-pl1-f194.google.com ([209.85.214.194]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i98cF-00035K-Q8 for linux-riscv@lists.infradead.org; Sat, 14 Sep 2019 14:01:33 +0000 Received: by mail-pl1-f194.google.com with SMTP id e5so3489405pls.9 for ; Sat, 14 Sep 2019 07:01:31 -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=i4KPYR0krzkbJdb5mCcQgKgPSlonUAtqX06rwwLNcfJcMQGhab96bRmdve6gVlr5MW qnM0NoInTtBwd6CO8Ldgy7OTzw3vJQPVFIJrpqixYxZDq6TUZ1tvPaammhEySqqlx/2G whw4884A+Yx7vV9myxl7hC2JKPWPJ1R9uMNoNk7EyH8bBL10Pl6jF+0x4frT9C7SoNuo ry5BKget5+U9V/EaP0+RFbvZBZsj5+nKkrhvYUs27usl2ZzhikaIGkuEOR8B7/8hbleX 8G4PPXoKktn66ljW8twA1Z4drwViCL1LGqoIOM0kE+udijoL/rS8XvZozj1+O9o2NhCW JN7Q== X-Gm-Message-State: APjAAAXXSdkTgcQyac4/SAEnfJ8g52FLEitpbYNrpKxDzqlldFpSb9nj e7O6KALNmEA5TpdprO5meBlG/w== X-Google-Smtp-Source: APXvYqwLzMQI8pZxkVqd8/Fy8A16315KeB9n6NzIBBSxCASBhPGKSRyvm9h7GHG8COZItU0wdTcuOQ== 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> From: Palmer Dabbelt To: will@kernel.org Message-ID: Mime-Version: 1.0 (MHng) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190914_070131_881761_F182979C X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: julien.thierry@arm.com, catalin.marinas@arm.com, Will Deacon , christoffer.dall@arm.com, Atish Patra , julien.grall@arm.com, guoren@kernel.org, gary@garyguo.net, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, rppt@linux.ibm.com, Christoph Hellwig , aou@eecs.berkeley.edu, Arnd Bergmann , suzuki.poulose@arm.com, marc.zyngier@arm.com, Paul Walmsley , linux-arm-kernel@lists.infradead.org, Anup Patel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, james.morse@arm.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C482C4CEC7 for ; Sat, 14 Sep 2019 14:01:33 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F229B20717 for ; Sat, 14 Sep 2019 14:01:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F229B20717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id ACFD6B59; Sat, 14 Sep 2019 14:01:32 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 664BDB50 for ; Sat, 14 Sep 2019 14:01:31 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 153462C6 for ; Sat, 14 Sep 2019 14:01:30 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id 4so14536207pld.10 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=rCfIKKXsVoiTAQBUiw+eq2rYIuGtf7hB0NaKbouJXbxs3erT1zG+MAgwsEiYilPbCt X6b+a0uAgwCv3P3UOaNHTmQqg5SLKlSkvyHKYULmFq9qsPKfKpccoj6B2cJEn/3dONcC S8atGaTzfXQk4F+vDGcrHuMRdMbITMSJvmx0FiDO+6jVlhinslLaSGooQoZ54HQYRsZm iSPmHtNAhF05ySWMZ9BUTMRROnOZwNGdbOUuNeSsZRYiA5Kspm1+Z4jnhvIfouOWF1Cc 3X6l707ABsOSBjv5zEfGWiArW3Fv7ZvPclvIbwXVif6/mcmro3p2euVT31vfie6rI6Xk 21JA== X-Gm-Message-State: APjAAAVEnHYeIMVqhkxLhM5IWLuqbdWqFSXXnwoUvSRSYZ2phl6voPZ4 ToI2Ycib4fIWB9Ul/jfT06MTHQ== X-Google-Smtp-Source: APXvYqwLzMQI8pZxkVqd8/Fy8A16315KeB9n6NzIBBSxCASBhPGKSRyvm9h7GHG8COZItU0wdTcuOQ== 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> From: Palmer Dabbelt To: will@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Cc: julien.thierry@arm.com, catalin.marinas@arm.com, Will Deacon , christoffer.dall@arm.com, Atish Patra , julien.grall@arm.com, gary@garyguo.net, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, rppt@linux.ibm.com, aou@eecs.berkeley.edu, Arnd Bergmann , suzuki.poulose@arm.com, marc.zyngier@arm.com, Paul Walmsley , linux-arm-kernel@lists.infradead.org, Anup Patel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, james.morse@arm.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.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. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3465C4CEC7 for ; Sat, 14 Sep 2019 14:01:35 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 79B0020717 for ; Sat, 14 Sep 2019 14:01:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79B0020717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C792F4A69E; Sat, 14 Sep 2019 10:01:34 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NOSQP6z99i15; Sat, 14 Sep 2019 10:01:33 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B9E3A4A69B; Sat, 14 Sep 2019 10:01:33 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 812CB4A69B for ; Sat, 14 Sep 2019 10:01:32 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sXsVJJzantRX for ; Sat, 14 Sep 2019 10:01:31 -0400 (EDT) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 6D3A34A698 for ; Sat, 14 Sep 2019 10:01:31 -0400 (EDT) Received: by mail-pl1-f196.google.com with SMTP id t1so14538486plq.13 for ; Sat, 14 Sep 2019 07:01:31 -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=J5vZXB6qwYyIhgOqlJY8xoASLaBYe3xueqOZDHZcq3ZuuX6F+/6wFK1RlxoWem8s9I IyOri+vdiRjKREcAzy9WnPk9WIEsU+MRsiElbqNYIEPyU9nUE3Rym0XwzB1ab7hzXptk eYK5v3VXfnM5AXtvCyBYrDVwICAkXmwHVRzkgVTQaJRTczxUeM/5AHJM81iv0DVFElIP JeVagYSX8dZohJTpHlvhbzYe5rq5uhyP2SOxbe/PQYxBVgE4nwdhkYZza81rlwkkM1L1 jU9O/2kf9HKTIZLENzaH/x9XU2q624DbhymPQvIz60ARa2y7V1FDPzOn7zfIhZguCu+q wLNA== X-Gm-Message-State: APjAAAXjGVhpaLv6eC6gUnocyyaZZLtK7WtsD3HPk5GZzgIkILhbkVjy y+wgeUT3X+GSxQDRSYQaBzZJBg== X-Google-Smtp-Source: APXvYqwLzMQI8pZxkVqd8/Fy8A16315KeB9n6NzIBBSxCASBhPGKSRyvm9h7GHG8COZItU0wdTcuOQ== 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> From: Palmer Dabbelt To: will@kernel.org Message-ID: Mime-Version: 1.0 (MHng) Cc: catalin.marinas@arm.com, Will Deacon , Atish Patra , julien.grall@arm.com, guoren@kernel.org, gary@garyguo.net, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, rppt@linux.ibm.com, Christoph Hellwig , aou@eecs.berkeley.edu, Arnd Bergmann , marc.zyngier@arm.com, Paul Walmsley , linux-arm-kernel@lists.infradead.org, Anup Patel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A57EDC4CEC7 for ; Sat, 14 Sep 2019 14:01:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7740320717 for ; Sat, 14 Sep 2019 14:01:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R9AuYO3s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7740320717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Mime-Version:Message-ID:To:From:In-Reply-To:Subject: Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=Oj6GYFDEYuLOBbTxLc8FYMYyCqag3uUFcXJuOps5Irs=; b=R9AuYO3sU6So2yYC/3QMDJMii rGPEVBTMG7l0AGYZfmAm4rBRxRn4Pz0Gd3ImTWGqM4xSa5xJa8ux/rpBpIQmmNOtdV/KnOdRt1jpf vMQqfnzNJhrGJU0uXAAXDCFWmlBVp4p6uB8WehW7tiWe6NmoBgP39gpZDI65suH8hXostcnbmT/eh +c340dOnt0JVKMLBisg6PWehxgDGH1PMwNuFgnl+H5z20hxbHz4LTgQ2w8QCnKJ3IZihukXGhgl+N OPnBMXakEe9E6X9a7CAKCRlk+/tLTD3I1E8pSOEodnPDzGbPfBjHxzRG5/IT406pgdFEPZ4hUrmnP Nhuz+YkDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i98cL-00038U-QB; Sat, 14 Sep 2019 14:01:37 +0000 Received: from mail-pl1-f194.google.com ([209.85.214.194]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i98cG-00035Z-1b for linux-arm-kernel@lists.infradead.org; Sat, 14 Sep 2019 14:01:33 +0000 Received: by mail-pl1-f194.google.com with SMTP id f19so14525408plr.3 for ; Sat, 14 Sep 2019 07:01:32 -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=IyECLudG8s/kkJ0yOubLZAcqoXC5EEXr0tHCjTfN3jffChrBX8NC6AVNdntDMKyh5Z azcPoxTrbHPlfw+NJaVAgXSqAzEsRzvP3CaGjZDnWjQrUu5sToZH2kTbNy4p9Odd/OF9 fzLBrQW+dJBnskBb3z10r8CyoVoky9YeDZPdlQ9gVkIpgi3wCM1DVOA70myFooeXJux1 nQSxnQKWG0de1ECidnWkmpVl5Ev0YXEg9D5Ypf+ZK8uP2F/troeGM8CWtVTgkC39z4E6 q1m74cX9/IFeiYIiX/uR1iF7vRGjJQKUSryTEv5J55HuD9ketA8LpXdhL+mpe3tLy5Ju ifKw== X-Gm-Message-State: APjAAAWdlsn5FyqQvU5lPWCw0GPyLwc6LSTacpDoXTd64OnImtlh1yos dHaUPO+dHS2CsGLHHiJQDQFnOA== X-Google-Smtp-Source: APXvYqwLzMQI8pZxkVqd8/Fy8A16315KeB9n6NzIBBSxCASBhPGKSRyvm9h7GHG8COZItU0wdTcuOQ== 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> From: Palmer Dabbelt To: will@kernel.org Message-ID: Mime-Version: 1.0 (MHng) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190914_070132_092321_BADD3D87 X-CRM114-Status: GOOD ( 15.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: julien.thierry@arm.com, catalin.marinas@arm.com, Will Deacon , christoffer.dall@arm.com, Atish Patra , julien.grall@arm.com, guoren@kernel.org, gary@garyguo.net, linux-riscv@lists.infradead.org, kvmarm@lists.cs.columbia.edu, rppt@linux.ibm.com, Christoph Hellwig , aou@eecs.berkeley.edu, Arnd Bergmann , suzuki.poulose@arm.com, marc.zyngier@arm.com, Paul Walmsley , linux-arm-kernel@lists.infradead.org, Anup Patel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, james.morse@arm.com Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel