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

Re: [Xen-devel] [PATCH v3 0/3] x86/IOMMU: multi-vector MSI prerequisites

On 4/16/2013 1:43 AM, Jan Beulich wrote:
On another topic, in arch/x86/msi.c, in the function
>"setup_msi_affinity()", the code does:
>1. "read_msi_msg"
>2. Modify the affitity mask
>3. "write_msi_msg" back the register value.
>In read, if the interrupt remapping is enabled, from the patch, the
>function returns the MSI data with remapped information from IOMMU. Then
>in write, if the interrupt remapping is enabled, the function will
>update the IOMMU interrupt remapping entries with the already "remapped"
>vector.   In this case, you would be updating the incorrect IOMMU IRTE.
Where did you spot that?
This is in xen/arch/x86/msi.c

To prevent this from happening is exactly
why amd_iommu_read_msi_from_ire() isn't empty anymore (this is
where the original MSI message information gets reconstructed - or
at least is intended to be). The only modification done by
update_intremap_entry_from_msi_msg() are the low 11 data bits,
and that's what gets overwritten upon read.
Sorry, I am not quite following this. Why do we need to reconstruct MSI message? Why was not it required in the past?


Xen-devel mailing list



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