On 2016-07-05 20:49, Valentine Sinitsyn wrote:
> On 05.07.2016 22:51, Jan Kiszka wrote:
>> On 2016-07-05 13:21, Valentine Sinitsyn wrote:
>>> Hi all,
>>>
>>> I faced a strange issue regarding MSI-X on my board.
>>>
>>> A USB host (xchi_hcd) enables 5 MSI-X vectors out of 8.
>>>
>>> The problem is other three vectors remain unmasked (at least, according
>>> to dev->msi_vectors in Jailhouse), even if they store all-zeros. The PCI
>>
>> (you mean dev->msix_vectors, I suppose)
> Sure, dev->msix_vectors.
> 
>>
>>> spec says all vectors must be masked on reset (which sounds sane).
>>>
>>> What's this? A bug in the kernel/driver? A config issue? Has anyone
>>> tested Jailhouse in conjunction with MSI-X?
>>
>> Yes, in various setups. Worked fine so far.
>>
>> What is the exact problem you see? Does Jailhouse fail when enabling,
>> thus trying to migrate those vectors to remapped mode?
> Yes. When iommu_map_interrupt() tries to validate these all-zero
> entries, it fails. This is expected, of course, but the precise reason
> is destination CPU 0 (all-zeros entry obviously can't reference anything
> else) doesn't exists on this board.
> 
> The expected behavior would be not to remap these entries, of course.
> However, they aren't masked (which is what I'd expect), and adding
> another "address != 0" check seems like a hack.

We are pretty strict right now with the configuration migration during
jailhouse enable. We could relax that, only warn about "blocking invalid
vector X of device Y", do not configure a route and continue. When a
guest actively programs such things later on, failing is likely still
better (because that would be a guest bug, or worse).

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to