Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-22 Thread Juergen Gross
On 22.04.22 21:01, Andrew Cooper wrote: On 22/04/2022 08:09, Jan Beulich wrote: On 21.04.2022 19:47, Andrew Cooper wrote: On 20/04/2022 07:27, Jan Beulich wrote: On 20.04.2022 08:22, Juergen Gross wrote: On 20.04.22 08:11, Jan Beulich wrote: On 20.04.2022 07:57, Juergen Gross wrote: --- a/x

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-22 Thread Stefano Stabellini
On Wed, 20 Apr 2022, Juergen Gross wrote: > Today iommu_do_domctl() is being called from arch_do_domctl() in the > "default:" case of a switch statement. This has led already to crashes > due to unvalidated parameters. > > Fix that by moving the call of iommu_do_domctl() to the main switch > state

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-22 Thread Andrew Cooper
On 22/04/2022 08:09, Jan Beulich wrote: > On 21.04.2022 19:47, Andrew Cooper wrote: >> On 20/04/2022 07:27, Jan Beulich wrote: >>> On 20.04.2022 08:22, Juergen Gross wrote: On 20.04.22 08:11, Jan Beulich wrote: > On 20.04.2022 07:57, Juergen Gross wrote: >> --- a/xen/include/xen/iommu.

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-22 Thread Jan Beulich
On 21.04.2022 19:47, Andrew Cooper wrote: > On 20/04/2022 07:27, Jan Beulich wrote: >> On 20.04.2022 08:22, Juergen Gross wrote: >>> On 20.04.22 08:11, Jan Beulich wrote: On 20.04.2022 07:57, Juergen Gross wrote: > --- a/xen/include/xen/iommu.h > +++ b/xen/include/xen/iommu.h > @@

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-21 Thread Andrew Cooper
On 20/04/2022 06:57, Juergen Gross wrote: > Today iommu_do_domctl() is being called from arch_do_domctl() in the > "default:" case of a switch statement. This has led already to crashes > due to unvalidated parameters. > > Fix that by moving the call of iommu_do_domctl() to the main switch > statem

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-21 Thread Andrew Cooper
On 20/04/2022 07:27, Jan Beulich wrote: > On 20.04.2022 08:22, Juergen Gross wrote: >> On 20.04.22 08:11, Jan Beulich wrote: >>> On 20.04.2022 07:57, Juergen Gross wrote: --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -341,8 +341,17 @@ struct domain_iommu { /*

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 20.04.2022 08:22, Juergen Gross wrote: > On 20.04.22 08:11, Jan Beulich wrote: >> On 20.04.2022 07:57, Juergen Gross wrote: >>> --- a/xen/include/xen/iommu.h >>> +++ b/xen/include/xen/iommu.h >>> @@ -341,8 +341,17 @@ struct domain_iommu { >>> /* Does the IOMMU pagetable need to be kept synchro

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
On 20.04.22 08:11, Jan Beulich wrote: On 20.04.2022 07:57, Juergen Gross wrote: --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -341,8 +341,17 @@ struct domain_iommu { /* Does the IOMMU pagetable need to be kept synchronized with the P2M */ #ifdef CONFIG_HAS_PASSTHROUGH #def

Re: [PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 20.04.2022 07:57, Juergen Gross wrote: > --- a/xen/include/xen/iommu.h > +++ b/xen/include/xen/iommu.h > @@ -341,8 +341,17 @@ struct domain_iommu { > /* Does the IOMMU pagetable need to be kept synchronized with the P2M */ > #ifdef CONFIG_HAS_PASSTHROUGH > #define need_iommu_pt_sync(d) (d

[PATCH v4] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_domctl() to the main switch statement of do_domctl(). Signed-off-by: Juergen Gross --