Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 08:33:30AM -0400, Stefan Hajnoczi wrote: > On Tue, Apr 15, 2025 at 03:11:00AM -0400, Michael S. Tsirkin wrote: > > On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: > > > Address space creation might end up being called without holding the > > > bql as i

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread CLEMENT MATHIEU--DRIF
On 15/04/2025 8:53 am, Philippe Mathieu-Daudé wrote: > Caution: External email. Do not open attachments or click links, unless > this email comes from a known sender and you know the content is safe. > > > On 15/4/25 08:18, CLEMENT MATHIEU--DRIF wrote: >> Address space creation might end up be

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread CLEMENT MATHIEU--DRIF
On 15/04/2025 2:59 pm, Paolo Bonzini wrote: > Caution: External email. Do not open attachments or click links, unless > this email comes from a known sender and you know the content is safe. > > > On 4/15/25 13:55, Philippe Mathieu-Daudé wrote: >> On 15/4/25 13:51, Paolo Bonzini wrote: >>> On

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Stefan Hajnoczi
On Tue, Apr 15, 2025 at 10:16 AM CLEMENT MATHIEU--DRIF wrote: > On 15/04/2025 2:33 pm, Stefan Hajnoczi wrote: > > On Tue, Apr 15, 2025 at 03:11:00AM -0400, Michael S. Tsirkin wrote: > >> On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: > >>> Address space creation might end u

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread CLEMENT MATHIEU--DRIF
On 15/04/2025 2:33 pm, Stefan Hajnoczi wrote: > On Tue, Apr 15, 2025 at 03:11:00AM -0400, Michael S. Tsirkin wrote: >> On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: >>> Address space creation might end up being called without holding the >>> bql as it is exposed through t

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Paolo Bonzini
On 4/15/25 14:33, Stefan Hajnoczi wrote: On Tue, Apr 15, 2025 at 03:11:00AM -0400, Michael S. Tsirkin wrote: On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. S

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Paolo Bonzini
On 4/15/25 13:55, Philippe Mathieu-Daudé wrote: On 15/4/25 13:51, Paolo Bonzini wrote: On Tue, Apr 15, 2025 at 1:51 PM CLEMENT MATHIEU--DRIF wrote: On 15/04/2025 11:30 am, Paolo Bonzini wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a know

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Paolo Bonzini
On 4/15/25 08:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/i3

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Stefan Hajnoczi
On Tue, Apr 15, 2025 at 03:11:00AM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: > > Address space creation might end up being called without holding the > > bql as it is exposed through the IOMMU ops. > > > > Signed-off-by: Clement Mathi

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread CLEMENT MATHIEU--DRIF
On 15/04/2025 11:30 am, Paolo Bonzini wrote: > Caution: External email. Do not open attachments or click links, unless > this email comes from a known sender and you know the content is safe. > > > On 4/15/25 08:18, CLEMENT MATHIEU--DRIF wrote: >> Address space creation might end up being call

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Philippe Mathieu-Daudé
On 15/4/25 13:51, Paolo Bonzini wrote: On Tue, Apr 15, 2025 at 1:51 PM CLEMENT MATHIEU--DRIF wrote: On 15/04/2025 11:30 am, Paolo Bonzini wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe. On 4

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Philippe Mathieu-Daudé
On 15/4/25 13:49, Philippe Mathieu-Daudé wrote: On 15/4/25 11:30, Paolo Bonzini wrote: On 4/15/25 08:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif Please

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Paolo Bonzini
On Tue, Apr 15, 2025 at 1:51 PM CLEMENT MATHIEU--DRIF wrote: > On 15/04/2025 11:30 am, Paolo Bonzini wrote: > > Caution: External email. Do not open attachments or click links, unless > > this email comes from a known sender and you know the content is safe. > > > > > > On 4/15/25 08:18, CLEMENT M

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Philippe Mathieu-Daudé
On 15/4/25 11:30, Paolo Bonzini wrote: On 4/15/25 08:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif Please use a separate lock instead of the BQL. There i

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 07:28:34AM +, CLEMENT MATHIEU--DRIF wrote: > > > On 15/04/2025 8:53 am, Philippe Mathieu-Daudé wrote: > > Caution: External email. Do not open attachments or click links, unless > > this email comes from a known sender and you know the content is safe. > > > > > > O

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Yi Liu
On 2025/4/15 16:03, Philippe Mathieu-Daudé wrote: On 15/4/25 09:42, Michael S. Tsirkin wrote: On Tue, Apr 15, 2025 at 07:28:34AM +, CLEMENT MATHIEU--DRIF wrote: On 15/04/2025 8:53 am, Philippe Mathieu-Daudé wrote: Caution: External email. Do not open attachments or click links, unless th

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: > Address space creation might end up being called without holding the > bql as it is exposed through the IOMMU ops. > > Signed-off-by: Clement Mathieu--Drif Reviewed-by: Michael S. Tsirkin Stefan, want to pick this one up

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Paolo Bonzini
On 4/15/25 08:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif Please use a separate lock instead of the BQL. Paolo --- hw/i386/intel_iommu.c | 10 +++

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Yi Liu
Hi CMD, good catch. Did you see any assert log. Just curious which path complains it. On 2025/4/15 14:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-15 Thread Philippe Mathieu-Daudé
On 15/4/25 09:42, Michael S. Tsirkin wrote: On Tue, Apr 15, 2025 at 07:28:34AM +, CLEMENT MATHIEU--DRIF wrote: On 15/04/2025 8:53 am, Philippe Mathieu-Daudé wrote: Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-14 Thread Michael S. Tsirkin
On Tue, Apr 15, 2025 at 06:18:08AM +, CLEMENT MATHIEU--DRIF wrote: > Address space creation might end up being called without holding the > bql as it is exposed through the IOMMU ops. > > Signed-off-by: Clement Mathieu--Drif Indeed, and this can maybe explain some failures we are seeing ...

Re: [PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-14 Thread Philippe Mathieu-Daudé
On 15/4/25 08:18, CLEMENT MATHIEU--DRIF wrote: Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/i3

[PATCH] intel_iommu: Take the bql before registering a new address space

2025-04-14 Thread CLEMENT MATHIEU--DRIF
Address space creation might end up being called without holding the bql as it is exposed through the IOMMU ops. Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index dffd