From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: RE: xensource (pci) device id's? Date: Thu, 01 Feb 2007 20:29:36 +0000 Message-ID: <1170361776.12801.14.camel@localhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Zulauf, John" Cc: Gerd Hoffmann , Xen devel list List-Id: xen-devel@lists.xenproject.org On Thu, 2007-02-01 at 12:02 -0800, Zulauf, John wrote: > If we change all the PCI vendor ID's for the virtualized devices, how > will the OS find the correct driver in standard HVM systems? Gerd is proposing to change the subvendor/subdevice ID's which is different to the regular vendor/device ID. The purpose of the subvendor/subdevice ID is to allow manufacturers to take an existing PCI device chipset (with a given vendor/device ID burnt in) and incorporate it into a card of their own. They can then use their own subvendor/subdevice ID for this card and presumably have their own driver match on these IDs rather than the more generic ones to offer advanced functionality which is dependant on the board not the chipset etc. Linux at least matches primarily on the vendor/device IDs with subvendor/subdevice set to match anything so we would be OK here. From include/linux/pci.h here is the macro typically used by drivers: #define PCI_DEVICE(vend,dev) \ .vendor = (vend), .device = (dev), \ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID I'd be interested to know if this is true of other OSs such as Windows and what matching procedure (if any) the PCI spec actually specifies. Ian.