WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xensource (pci) device id's?

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xensource (pci) device id's?
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Fri, 02 Feb 2007 09:15:26 +0100
Cc: "Zulauf, John" <john.zulauf@xxxxxxxxx>, Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 02 Feb 2007 00:14:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1170361776.12801.14.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BD262A443AD428499D90AF8368C4528D310740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1170361776.12801.14.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20060911)
Ian Campbell wrote:
> 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.

No.  It fully depends on the driver.

> 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

You *can* specify subvendor IDs too.  If you do so linux will match only
devices where both normal and subsystem ID match.  And I think they are
even preferred over more generic (without subsystem) matches, at least
when it comes to module loading.

Adding a subsystem ID makes it possible for the guest OS to use a
different driver for the virtual device.  Without special hooks needed,
the normal device probing works just fine for that purpose then.  If no
special driver is available the generic chipset driver will be used.

cheers,
  Gerd

-- 
Gerd Hoffmann <kraxel@xxxxxxx>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>