Graphics workaround for AMD IOMMU systems

Chris Wright chrisw at sous-sol.org
Fri Jun 12 12:28:02 PDT 2009


* Bhavna Sarathy (bnagendr at redhat.com) wrote:
> +#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)

I think this is too permissive for upstream, and a blacklist would
be better.  So more like:

static const struct pci_device_id pci_broken_gfx_ids[] = {
	/* Add your favorite busted card here */	
	{ } /* terminate list */
};

static inline bool is_broken_gfx_device(struct pci_device *pdev)
{
	struct pci_device_id *broken = NULL

	broken = pci_id_match(pci_broken_gfx_ids, pdev);
	WARN(broken, "IOMMU: graphics device %s is broken with IOMMU, "
		     "disabling IOMMU protection for this device\n", 
		     pci_name(pdev));
	return !!broken;
}

This should be sharable between VT-d and AMD IOMMU.


More information about the iommu mailing list