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

Re: [Xen-devel] [PATCH for-4.13] AMD/IOMMU: honour IR setting while pre-filling DTEs



On 25.11.2019 22:05, Igor Druzhinin wrote:
> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -1279,7 +1279,7 @@ static int __init amd_iommu_setup_device_table(
>          for ( bdf = 0, size /= sizeof(*dt); bdf < size; ++bdf )
>              dt[bdf] = (struct amd_iommu_dte){
>                            .v = true,
> -                          .iv = true,
> +                          .iv = iommu_intremap,

This was very intentionally "true", and ignoring "iommu_intremap":
We're _pre_-filling DTEs here. Their actual values will be
established by the loop further down in the function, and just
for those devices that actually exist. By unilaterally setting IV
here we make sure that all interrupt requests from devices we
don't recognize get blocked rather than allowed through in an
un-remapped fashion.

The question continues to be which specific DTE the loop below
may wrongly leave untouched. Even if the the IDE device of the
chipset has no MSI/MSI-X, amd_iommu_set_intremap_table() at
the bottom of the loop should still get invoked, and hence IV
should still get set to false there when !iommu_intremap. There's
further investigation necessary, I'm afraid.

Jan

_______________________________________________
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®.