Intel-iommu panic on kernel v4.1-rc1
Quoted 12 lines · On Mon, 2015-04-27 at 15:27 +0800, [email protected].…
commit
18436afdc11a00ac881990b454cfb2eae81d6003iommu/vt-d: Allow RMRR on graphics devices toocause kernel panic with Z77+vt-d and kernel parameters:
intel_iommu=igfx_off iommu=pt
the panic path is:dev_prepare_static_identity_mapping()
domain_add_dev_info()dmar_insert_dev_info() find_domain() info = dev->archdata.iommu; if (info)
Quoted 6 lines
-> return
info->domain;
igfx_offcause <igfx@0:2.0>.archdata.iommu assigned to
DUMMY_DEVICE_DOMAIN_INFO.
Above patch causeiommu_should_identity_map()return 1, and attempt to setup identity mapping for igfx.
Can you try this please?
drivers/iommu/intel-iommu.c +8 -5
@@ -696,6 +696,11 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommureturn &context[devfn]; } +static int iommu_dummy (struct device *dev) +{ +return dev->archdata.iommu ==DUMMY_DEVICE_DOMAIN_INFO ; +} +static struct intel_iommu *device_to_iommu (struct device *dev,u8 *bus,u8 *devfn) {struct dmar_drhd_unit *drhd =NULL ;
@@ -705,6 +710,9 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfu16 segment =0 ;int i; +if (iommu_dummy (dev)) +return NULL ; +if (dev_is_pci (dev)) { pdev =to_pci_dev (dev); segment =pci_domain_nr (pdev->bus);
@@ -2969,11 +2977,6 @@ static inline struct dmar_domain *get_valid_domain_for_dev(struct device *dev)return __get_valid_domain_for_dev (dev); } -static int iommu_dummy (struct device *dev) -{ -return dev->archdata.iommu ==DUMMY_DEVICE_DOMAIN_INFO ; -} -/* Check if the dev needs to go through non-identity map and unmap process.*/ static int iommu_no_mapping (struct device *dev) {
Signature · 2 lines
David Woodhouse Open Source Technology Centre [email protected] Intel Corporation