Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-04 Thread Auger Eric
Hi Peter, On 2/3/20 7:19 PM, Peter Xu wrote: > On Mon, Feb 03, 2020 at 06:46:36PM +0100, Auger Eric wrote: >> Hi Peter, >> >> On 2/3/20 4:19 PM, Peter Xu wrote: >>> On Mon, Feb 03, 2020 at 03:59:00PM +0100, Auger Eric wrote: >>> >>> [...] >>> >> +static void >> virtio_iommu_detach_endpoin

Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-03 Thread Peter Xu
On Mon, Feb 03, 2020 at 06:46:36PM +0100, Auger Eric wrote: > Hi Peter, > > On 2/3/20 4:19 PM, Peter Xu wrote: > > On Mon, Feb 03, 2020 at 03:59:00PM +0100, Auger Eric wrote: > > > > [...] > > > +static void > virtio_iommu_detach_endpoint_from_domain(VirtIOIOMMUEndpoint *ep) > +{

Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-03 Thread Auger Eric
Hi Peter, On 2/3/20 4:19 PM, Peter Xu wrote: > On Mon, Feb 03, 2020 at 03:59:00PM +0100, Auger Eric wrote: > > [...] > +static void virtio_iommu_detach_endpoint_from_domain(VirtIOIOMMUEndpoint *ep) +{ +QLIST_REMOVE(ep, next); +g_tree_unref(ep->domain->mappings);

Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-03 Thread Peter Xu
On Mon, Feb 03, 2020 at 03:59:00PM +0100, Auger Eric wrote: [...] > >> +static void virtio_iommu_detach_endpoint_from_domain(VirtIOIOMMUEndpoint > >> *ep) > >> +{ > >> +QLIST_REMOVE(ep, next); > >> +g_tree_unref(ep->domain->mappings); > > > > Here domain->mapping is unreferenced for eac

Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-03 Thread Auger Eric
Hi Peter, On 2/3/20 2:49 PM, Peter Xu wrote: > On Sat, Jan 25, 2020 at 06:19:48PM +0100, Eric Auger wrote: >> This patch implements the endpoint attach/detach to/from >> a domain. >> >> Domain and endpoint internal datatypes are introduced. >> Both are stored in RB trees. The domain owns a list of

Re: [PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-02-03 Thread Peter Xu
On Sat, Jan 25, 2020 at 06:19:48PM +0100, Eric Auger wrote: > This patch implements the endpoint attach/detach to/from > a domain. > > Domain and endpoint internal datatypes are introduced. > Both are stored in RB trees. The domain owns a list of > endpoints attached to it. Also helpers to get/put

[PATCH v13 03/10] virtio-iommu: Implement attach/detach command

2020-01-25 Thread Eric Auger
This patch implements the endpoint attach/detach to/from a domain. Domain and endpoint internal datatypes are introduced. Both are stored in RB trees. The domain owns a list of endpoints attached to it. Also helpers to get/put end points and domains are introduced. As for the IOMMU memory regions