Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp873929pxb; Thu, 30 Sep 2021 20:37:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1gVh3ec9+pqwL0a4pDedCZDmHjYHACTUJXI5KtCZaTOAXaIGI3Iwgt7JWO3ugWHtr+ZgT X-Received: by 2002:a50:9d0f:: with SMTP id v15mr11756210ede.275.1633059476649; Thu, 30 Sep 2021 20:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633059476; cv=none; d=google.com; s=arc-20160816; b=SRAvyh62wOtcHS8tDOiSD/2z3AHN8/Eb2nWezaY7W2lMBI50Ht8yOPUw8hQwFx6epM CRHxkxt/6vuamFKv0Sc/+L9adRdl/Lj7pfn1+H3HiHK3uaUeH8cNsRlsf7TTrU2ZvaO4 vd1ywuAgGQiOBBtId41xu8QU1OZghaBRpRl68HEd1mm3JTR2TvS83eZ6P8hefLLkMnZk J4pL12YapOkHZ0fdHmS+hfkRztJWRnivw/Qhk0i49MYWgXbXcZccTp/NuIRH7kXvqTEE VCUzrT+hxBCZ1v2Uj9nR0HPvEYfukw+liwsdcjBV8HEOf4JcCXaKnWjIX7qndUOSQtGx C9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bab1Vcj6+ZMY8oumeeo0DI95cgP/BnuApYQcewmgoMU=; b=Q42fywj+ljxXZb6c4avyJ2WEjp0GXsfoMeBvxtz1LOLaqUaS7oQ/f1z4xsZJgx+MsD mVjaL5WyRkzaFB/dZaS0B3e3WIVo4bZpUJwVpoXakcacEKdMwAaJXbEODhlswAC6DBnI 6EbZAQrLXdsRHAvqwOVCd71ECTP4ga5TYC5zzmIl445F16LwdGS+JN7vMpDq+4w2Algg tP7IFEJx2tn8LjJUE+jln4sJkQ+4JzdAvinaTeoGnsYltvmzcDCQ31HLWcmVolT8QBn0 Kt5HztGuKUsaEJW14/XiM+7+qpUj74JkzDTIwRLwxEUzUmIoXCAhoNOHj5xjdFCIwSa6 o0+A== 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 z28si5359140ejl.17.2021.09.30.20.37.31; Thu, 30 Sep 2021 20:37:56 -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 S1351497AbhJADcn (ORCPT + 99 others); Thu, 30 Sep 2021 23:32:43 -0400 Received: from verein.lst.de ([213.95.11.211]:33497 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230346AbhJADcm (ORCPT ); Thu, 30 Sep 2021 23:32:42 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id D489D68B05; Fri, 1 Oct 2021 05:30:54 +0200 (CEST) Date: Fri, 1 Oct 2021 05:30:54 +0200 From: "hch@lst.de" To: Jason Gunthorpe Cc: "Tian, Kevin" , Alex Williamson , "Liu, Yi L" , "hch@lst.de" , "jasowang@redhat.com" , "joro@8bytes.org" , "jean-philippe@linaro.org" , "parav@mellanox.com" , "lkml@metux.net" , "pbonzini@redhat.com" , "lushenming@huawei.com" , "eric.auger@redhat.com" , "corbet@lwn.net" , "Raj, Ashok" , "yi.l.liu@linux.intel.com" , "Tian, Jun J" , "Wu, Hao" , "Jiang, Dave" , "jacob.jun.pan@linux.intel.com" , "kwankhede@nvidia.com" , "robin.murphy@arm.com" , "kvm@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "dwmw2@infradead.org" , "linux-kernel@vger.kernel.org" , "baolu.lu@linux.intel.com" , "david@gibson.dropbear.id.au" , "nicolinc@nvidia.com" Subject: Re: [RFC 10/20] iommu/iommufd: Add IOMMU_DEVICE_GET_INFO Message-ID: <20211001033054.GD16450@lst.de> References: <20210919063848.1476776-1-yi.l.liu@intel.com> <20210919063848.1476776-11-yi.l.liu@intel.com> <20210922152407.1bfa6ff7.alex.williamson@redhat.com> <20210922234954.GB964074@nvidia.com> <20210923114219.GG964074@nvidia.com> <20210930222355.GH964074@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210930222355.GH964074@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 07:23:55PM -0300, Jason Gunthorpe wrote: > > > The Intel functional issue is that Intel blocks the cache maintaince > > > ops from the VM and the VM has no way to self-discover that the cache > > > maintaince ops don't work. > > > > the VM doesn't need to know whether the maintenance ops > > actually works. > > Which is the whole problem. > > Intel has a design where the device driver tells the device to issue > non-cachable TLPs. > > The driver is supposed to know if it can issue the cache maintaince > instructions - if it can then it should ask the device to issue > no-snoop TLPs. The driver should never issue them. This whole idea that a driver can just magically poke the cache directly is just one of these horrible short cuts that seems to happen in GPU land all the time but nowhere else. > > coherency and indirectly the underlying I/O page table format. > > If yes, then I don't see a reason why such decision should not be > > given to userspace for passthrough case. > > The choice all comes down to if the other arches have cache > maintenance instructions in the VM that *don't work* Or have them at all.