[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 3/5] iommu: make iommu_inclusive_mapping a suboption of dom0-iommu



> From: Roger Pau Monne [mailto:roger.pau@xxxxxxxxxx]
> Sent: Wednesday, August 1, 2018 7:04 PM
> 
> Introduce a new dom0-iommu=inclusive generic option that supersedes
> iommu_inclusive_mapping. The prevcious behaviour is preserved and the
> option should only be enabled by default on Intel hardware.
> 
> No functional change intended.

there is functional change. Original condition is:

 -    if ( !iommu_dom0_passthrough && is_pv_domain(d) )
 -    {
 -        /* Set up 1:1 page table for hardware domain. */
 -        vtd_set_hwdom_mapping(d);
 -    }
        
Now it is always called.

> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> Changes since v1:
>  - Use dom0-iommu instead of the iommu option.
>  - Only enable by default on Intel hardware.

[...]
> 
> +void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
> +{
> +    unsigned long i, top, max_pfn;
> +
> +    BUG_ON(!is_hardware_domain(d));
> +
> +    /* Set the default value of inclusive depending on the hardware. */
> +    if ( iommu_dom0_inclusive == -1 )
> +        iommu_dom0_inclusive = boot_cpu_data.x86_vendor ==
> X86_VENDOR_INTEL;
> +

I don't like above style. 

btw It's better to set it in intel_iommu_hwdom_init.

Thanks
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.