Received: by 2002:a17:90a:bc8d:0:0:0:0 with SMTP id x13csp1519184pjr; Mon, 18 May 2020 15:18:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcIUKwKgaYRjQ/SDW2oGsIsQTO2wXlSTboSlJdMzbBOZgaLLOFSF/9UfIemZONwci5VQkI X-Received: by 2002:a17:906:2604:: with SMTP id h4mr15926445ejc.307.1589840285841; Mon, 18 May 2020 15:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589840285; cv=none; d=google.com; s=arc-20160816; b=kM/C1MeybjtjuJChzM3/cQL/pf54SelNVTFY5Ua1HD1fQNGFiahkWeOUT2FrSm+Lx/ US8/cU76g/3tb7Xn/RpRUfKX350hgDM+k99OO8LEhoIbw3KAFvT4h6U2tMd1gGkaQ+gf EyIdNZryxMwAs/hfHhoPCQ93OV/x/Enj051G6IQE7Wdu6tcuiaXlxe8EtpQ+lm51jlkx WXctzUMCw0dFpVgOX83j4wG9zl2uv29p3DUPN1BQhRak1L+fVZKz/WQqAcNpzkHdr6lN yHf54kdcU0HYu/soSDgO3WMOZWyF5x4Z+OQVQGcI9pWzaW+2Vl6nW9/vvFmI3zxi6kSo O7UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=prsCkCxLy7bTtHoNJZEl6S+IBLY3Vu826GUD9uYHGiY=; b=l+RSeFZojYA9amC0qkmsNEqdc2kql9yQfn5CPmeNcR9RhKEc6aRW3PyeMhA3wKS8OE lGoXHe8Z34ZO0BiA17InqHsGJq8+T10o9/bQuwgakSbsVHszi5KySDBH/ZIWWCAUME7o 2Dh1f2ZpLoyUnG5xiKrsnVxm5MekvIC0nbwp+nDADDTwpOf+08w84XXMipnBlhVfMuow +GJgA8vEP7s2wKrVAqfKZ4HY9Tqyjh03/yD8WBm0IlortylltQvqMoZomNyT6uon+OFn wGSHn3Wrj8ko/iETQdqiZ3nyY+uwV50f9BA+vHL945ilIaJfGnS8T+T7xJ2IFNPW0bQQ aTkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GMXdM/Zy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si7044440ejr.380.2020.05.18.15.17.41; Mon, 18 May 2020 15:18:05 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="GMXdM/Zy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728255AbgERWPk (ORCPT + 99 others); Mon, 18 May 2020 18:15:40 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:45652 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726386AbgERWPj (ORCPT ); Mon, 18 May 2020 18:15:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589840138; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=prsCkCxLy7bTtHoNJZEl6S+IBLY3Vu826GUD9uYHGiY=; b=GMXdM/Zyw4VueoKJVOtQK8OAUpNChoOfVS5QTjDFh4uHb4zo6JI4xfJizVSJu1bNoTs206 8txUBQw1Jy8GdgRWfw4uXFjS+mYolWDdWAqOn6iGz1tVgplF43AejxwtVGWyTi6+p6ycni RY4L/k8PIlt/qfsYRqCFB6HtWtTRuKs= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-D5YhnMb-NvmR81rG7cJ_pQ-1; Mon, 18 May 2020 18:15:37 -0400 X-MC-Unique: D5YhnMb-NvmR81rG7cJ_pQ-1 Received: by mail-qk1-f199.google.com with SMTP id r124so12335359qkf.1 for ; Mon, 18 May 2020 15:15:37 -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:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=prsCkCxLy7bTtHoNJZEl6S+IBLY3Vu826GUD9uYHGiY=; b=LGak06+MEDxq5Ln9BYN3+7a5Fp+U0rlFeX251hh7i4KYZ8ty2E08Kmr41iffuYKhsN sQBqaCCNu9ryTElyf6uMzYgTCK9l5Nd/ihRrPJfO5nPWLb+y/hWQXgBqrO6sPUfDm3bE v2Ba9djewvufkOjrPoW0sv3snzdZ3n21+PIsFvmNfIzc/b3zJxCDgxWWK81grGHxyeV9 KNGX74n04V8QrXd8phrlPop33uhXZ+Obt7geKeFP9Cghbnm5cU2Ynizvar5AlfVv5uBk wgN/z7ev2Yn5EP17OSZ2xGflJzqHuVQLO26mhZkZqQK21NZMqxq1OIgHCZgFh5NkBgb+ drMw== X-Gm-Message-State: AOAM533mnz50zXsMBtLt1XlKr0qwckjv0O/EcwZIuN6urK5JGrz676n0 6+1C+6DVEnU14l+lrbdQEvKI4CYemfqs0X7O62WcG5fYnQ1uNIpAh1NY4/AwRVvu0AnR1Lt24Lr tfbuYNhu7IXvrW1G1kQT1L4ia X-Received: by 2002:ac8:34a2:: with SMTP id w31mr19243746qtb.368.1589840136566; Mon, 18 May 2020 15:15:36 -0700 (PDT) X-Received: by 2002:ac8:34a2:: with SMTP id w31mr19243709qtb.368.1589840136227; Mon, 18 May 2020 15:15:36 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id n206sm9251212qke.20.2020.05.18.15.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 15:15:33 -0700 (PDT) Date: Mon, 18 May 2020 15:15:31 -0700 From: Jerry Snitselaar To: Joerg Roedel Cc: Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Tom Murphy Subject: Re: [PATCH] iommu: Implement deferred domain attachment Message-ID: <20200518221531.5mddl4fatu5hvbyb@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Joerg Roedel , Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Tom Murphy References: <20200515094519.20338-1-joro@8bytes.org> <20200515161400.GZ18353@8bytes.org> <20200515182600.GJ8135@suse.de> <20200518132656.GL8135@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20200518132656.GL8135@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon May 18 20, Joerg Roedel wrote: >On Fri, May 15, 2020 at 08:23:13PM +0100, Robin Murphy wrote: >> But that's not what this is; this is (supposed to be) the exact same "don't >> actually perform the attach yet" logic as before, just restricting it to >> default domains in the one place that it actually needs to be, so as not to >> fundamentally bugger up iommu_attach_device() in a way that prevents it from >> working as expected at the correct point later. > >You are right, that is better. I tested it and it seems to work. Updated >diff attached, with a minor cleanup included. Mind sending it as a >proper patch I can send upstream? > >Thanks, > > Joerg > I should have this tested this afternoon.