pci: treat class 0 devices as endpoints
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 8 May 2018 09:33:00 +0000 (11:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Jun 2018 07:29:38 +0000 (09:29 +0200)
commit7495a5b6aa1c741964baf18a1cbdb8b8d71cce98
tree69e6ed05c32db5f7c77f10652342bc143e67ce06
parent328ca55b7bd47e1324b75cce2a6c461308ecf93d
pci: treat class 0 devices as endpoints

Class 0 devices are legacy pre PCI 2.0 devices that didn't have a
class code. Treat them as endpoints, so that they can be handled by
the IOMMU and properly passed-through to the hardware domain.

Such device has been seen on a Super Micro server, lspci -vv reports:

00:13.0 Non-VGA unclassified device: Intel Corporation Device a135 (rev 31)
Subsystem: Super Micro Computer Inc Device 0931
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at df222000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [80] Power Management version 3

Arguably this is not a legacy device (since this is a new server), but
in any case Xen needs to deal with it.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/pci.c