[siemens/jailhouse] df3bdf: x86: Expand x86_msi_vector to carry 64-bit address...

5 views
Skip to first unread message

GitHub

unread,
Jan 17, 2017, 12:25:07 PM1/17/17
to jailho...@googlegroups.com
Branch: refs/heads/next
Home: https://github.com/siemens/jailhouse
Commit: df3bdf1c56119b459b1e4c23c7f24c5e89b8a787
https://github.com/siemens/jailhouse/commit/df3bdf1c56119b459b1e4c23c7f24c5e89b8a787
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-17 (Tue, 17 Jan 2017)

Changed paths:
M hypervisor/arch/x86/include/asm/apic.h
M hypervisor/arch/x86/pci.c

Log Message:
-----------
x86: Expand x86_msi_vector to carry 64-bit address unconditionally

This will allow to match on the whole address to check if we are
actually targeting the MSI address space.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Commit: 3f0fb16a8bd5ddda90729f40d223c3d37834bdb4
https://github.com/siemens/jailhouse/commit/3f0fb16a8bd5ddda90729f40d223c3d37834bdb4
Author: Jan Kiszka <jan.k...@siemens.com>
Date: 2017-01-17 (Tue, 17 Jan 2017)

Changed paths:
M hypervisor/arch/x86/pci.c

Log Message:
-----------
x86: Be graceful with invalid MSI target addresses

Linux seems to write zeros to MSI registers when unregistering an MSI
interrupt:

[...]
pci_bus_write_config_dword+0x14/0x20
__pci_write_msi_msg+0xcc/0x130
pci_msi_domain_write_msg+0x1d/0x20
msi_domain_deactivate+0x28/0x30 <-- this writes zeros
irq_domain_deactivate_irq+0x28/0x40
irq_shutdown+0x39/0x70
__free_irq+0x1ee/0x290
free_irq+0x34/0x80
tg3_test_interrupt+0x3f/0x230
tg3_start+0xfa3/0x1130
[...]
(taken with 4.9-rt)

Let's check if the target address actually matches the MSI address space
and, if not, simply declare the vector invalid. That will block it from
being used, raising an IOMMU runtime error at most when the device
should fire nevertheless. But we no longer panic the writer.

Signed-off-by: Jan Kiszka <jan.k...@siemens.com>


Compare: https://github.com/siemens/jailhouse/compare/3fd789a0a18d...3f0fb16a8bd5
Reply all
Reply to author
Forward
0 new messages