Re: [RFC PATCH v7 03/14] x86/domain: Defer domain iommu initialization.

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 20.11.2025 12:09, Teddy Astie wrote:
> For the IOMMU redesign, the iommu context pagetable is defined once during
> initialization. When reusing P2M pagetable, we want to ensure that this
> pagetable is properly initialized.
> 
> Signed-off-by Teddy Astie <[email protected]>

From what is said, I for one cannot deduce why the move is (a) necessary and
(b) correct / safe to do.

Jan

> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -927,9 +927,6 @@ int arch_domain_create(struct domain *d,
>      if ( (rc = init_domain_irq_mapping(d)) != 0 )
>          goto fail;
>  
> -    if ( (rc = iommu_domain_init(d, config->iommu_opts)) != 0 )
> -        goto fail;
> -
>      psr_domain_init(d);
>  
>      if ( is_hvm_domain(d) )
> @@ -948,6 +945,9 @@ int arch_domain_create(struct domain *d,
>      else
>          ASSERT_UNREACHABLE(); /* Not HVM and not PV? */
>  
> +    if ( (rc = iommu_domain_init(d, config->iommu_opts)) != 0 )
> +        goto fail;
> +
>      if ( (rc = tsc_set_info(d, XEN_CPUID_TSC_MODE_DEFAULT, 0, 0, 0)) != 0 )
>      {
>          ASSERT_UNREACHABLE();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.