Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Xu, Quan
On March 07, 2016 7:49pm, wrote: > >>> On 07.03.16 at 12:42, wrote: > > On March 07, 2016 7:36pm, wrote: > >> >>> On 07.03.16 at 12:23, wrote: > >> > On March 07, 2016 7:14pm, wrote: > >> >> >>> On 07.03.16 at 08:05, wrote: > >> > > >> > > >> >> > A quick question, is it '-ERESTART', instead

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Jan Beulich
>>> On 07.03.16 at 12:42, wrote: > On March 07, 2016 7:36pm, wrote: >> >>> On 07.03.16 at 12:23, wrote: >> > On March 07, 2016 7:14pm, wrote: >> >> >>> On 07.03.16 at 08:05, wrote: >> > >> > >> >> > A quick question, is it '-ERESTART', instead of '-EBUSY' ? >> >> >> >> No idea what this questi

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Xu, Quan
On March 07, 2016 7:36pm, wrote: > >>> On 07.03.16 at 12:23, wrote: > > On March 07, 2016 7:14pm, wrote: > >> >>> On 07.03.16 at 08:05, wrote: > > > > > >> > A quick question, is it '-ERESTART', instead of '-EBUSY' ? > >> > >> No idea what this question is about in this context. > >> > > > > it

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Jan Beulich
>>> On 07.03.16 at 12:23, wrote: > On March 07, 2016 7:14pm, wrote: >> >>> On 07.03.16 at 08:05, wrote: > > >> > A quick question, is it '-ERESTART', instead of '-EBUSY' ? >> >> No idea what this question is about in this context. >> > > it is in xen/drivers/passthrough/pci.c, assign_device

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Xu, Quan
On March 07, 2016 7:14pm, wrote: > >>> On 07.03.16 at 08:05, wrote: > > A quick question, is it '-ERESTART', instead of '-EBUSY' ? > > No idea what this question is about in this context. > it is in xen/drivers/passthrough/pci.c, assign_device(). static int assign_device() { if

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-07 Thread Jan Beulich
>>> On 07.03.16 at 08:05, wrote: > I try to fix it with follow: > patch >> > > --- a/xen/drivers/passthrough/pci.c > +++ b/xen/drivers/passthrough/pci.c > @@ -118,6 +118,11 @@ int pcidevs_is_locked(void) > return spin_is_locked(&_pcidevs_lock); > } > > +int pcidevs_tryloc

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-06 Thread Xu, Quan
On March 04, 2016 9:59pm, wrote: > On Fri, 2016-03-04 at 11:54 +, Xu, Quan wrote: > > On March 04, 2016 5:29pm, wrote: > > > On March 04, 2016 7:59am, wrote: > > > > > > > Also I'd highlight the below modification: > > > > -if ( !spin_trylock(&pcidevs_lock) ) > > > > -return -ERE

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-04 Thread Jan Beulich
>>> On 04.03.16 at 14:59, wrote: > On Fri, 2016-03-04 at 11:54 +, Xu, Quan wrote: >> On March 04, 2016 5:29pm, wrote: >> > To be honest, changes like this would better not be buried in a big >> > rework like >> > the one here. Make it a prereq patch, where you then will kind of >> > automatic

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-04 Thread Dario Faggioli
On Fri, 2016-03-04 at 11:54 +, Xu, Quan wrote: > On March 04, 2016 5:29pm, wrote: > > On March 04, 2016 7:59am, wrote: > > > > > Also I'd highlight the below modification: > > > -if ( !spin_trylock(&pcidevs_lock) ) > > > -return -ERESTART; > > > - > > > +pcidevs_lock(); > > >

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-04 Thread Xu, Quan
On March 04, 2016 5:29pm, wrote: > >>> On 04.03.16 at 03:45, wrote: > > On March 04, 2016 7:59am, wrote: > >> On Wed, 2016-03-02 at 22:31 +0800, Quan Xu wrote: > >> > @@ -788,10 +787,10 @@ static bool_t __init > >> > set_iommu_interrupt_handler(struct amd_iommu *iommu) > >> > return 0;

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-04 Thread Jan Beulich
>>> On 04.03.16 at 03:45, wrote: > On March 04, 2016 7:59am, wrote: >> On Wed, 2016-03-02 at 22:31 +0800, Quan Xu wrote: >> > @@ -788,10 +787,10 @@ static bool_t __init >> > set_iommu_interrupt_handler(struct amd_iommu *iommu) >> > return 0; >> > } >> > >> > -spin_lock_irqsave(&

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-03 Thread Xu, Quan
On March 04, 2016 7:59am, wrote: > On Wed, 2016-03-02 at 22:31 +0800, Quan Xu wrote: > > Signed-off-by: Quan Xu > > > So, this patch looks ok to me. > > I spotted something, though, that I think needs some attention. > > Since I'm jumping on this series only now, if this has been discussed befo

Re: [Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-03 Thread Dario Faggioli
[I've removed some of the people that shouldn't be involved in this discussion any longer from the Cc-list] On Wed, 2016-03-02 at 22:31 +0800, Quan Xu wrote: > Signed-off-by: Quan Xu > So, this patch looks ok to me. I spotted something, though, that I think needs some attention. Since I'm jump

[Xen-devel] [PATCH v6 3/5] IOMMU: Make the pcidevs_lock a recursive one

2016-03-02 Thread Quan Xu
Signed-off-by: Quan Xu --- xen/arch/x86/domctl.c | 8 +-- xen/arch/x86/hvm/vmsi.c | 4 +- xen/arch/x86/irq.c | 8 +-- xen/arch/x86/msi.c | 16 ++--- xen/arch/x86/pci.c | 4 +-