From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Philippe Brucker Subject: Re: [virtio-dev] [RFC PATCH v2 1/5] iommu: Add virtio-iommu driver Date: Wed, 29 Nov 2017 15:17:40 +0000 Message-ID: <73427923-e62a-e277-42a2-cd37141fa122__41129.7977356755$1511968488$gmane$org@arm.com> References: <20171117185211.32593-1-jean-philippe.brucker@arm.com> <20171117185211.32593-2-jean-philippe.brucker@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20171117185211.32593-2-jean-philippe.brucker@arm.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "iommu@lists.linux-foundation.org" , "devel@acpica.org" , "linux-acpi@vger.kernel.org" , "kvm@vger.kernel.org" , "kvmarm@lists.cs.columbia.edu" , "virtualization@lists.linux-foundation.org" , "virtio-dev@lists.oasis-open.org" Cc: "Jayachandran.Nair@cavium.com" , Lorenzo Pieralisi , "ashok.raj@intel.com" , "mst@redhat.com" , Marc Zyngier , Will Deacon , "rjw@rjwysocki.net" , "robert.moore@intel.com" , "eric.auger@redhat.com" , "lv.zheng@intel.com" , Sudeep Holla , "lenb@kernel.org" , Robin Murphy , "joro@8bytes.org" , "hanjun.guo@linaro.org" List-Id: virtualization@lists.linuxfoundation.org On 17/11/17 18:52, Jean-Philippe Brucker wrote: [...] > +struct viommu_domain { > + struct iommu_domain domain; > + struct viommu_dev *viommu; > + struct mutex mutex; > + unsigned int id; > + > + spinlock_t mappings_lock; > + struct rb_root_cached mappings; > + > + /* Number of endpoints attached to this domain */ > + refcount_t endpoints; Refcount_t is the wrong tool for this, I went back to an unsigned int (and rebased onto v4.15-rc1), on branch virtio-iommu/base. Thanks, Jean