From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: xensource (pci) device id's? Date: Mon, 05 Feb 2007 15:20:22 +0100 Message-ID: <45C73D26.6090102@suse.de> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060808000606000605020602" 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: Keir Fraser Cc: Xen devel list , Ian Campbell List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060808000606000605020602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Keir Fraser wrote: > >>> Ok, how device IDs are allocated? I'd like to use them to tag virtual >>> devices ... >> ... like this (see attached patch), handing out numbers 2-6 ... > > Looks okay. The subvendor device id's can all be the same (e.g., 0x1, as I'm > not sure about validity of 0x0), since disambiguation amongst device types > is already provided by the main vendor/device id's. Then 0x5853/0x0001 Updated patch attached. cheers, Gerd -- Gerd Hoffmann --------------060808000606000605020602 Content-Type: text/x-patch; name="add-pci-ids.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="add-pci-ids.diff" --- tools/ioemu/hw/cirrus_vga.c | 4 ++++ tools/ioemu/hw/ide.c | 4 ++++ tools/ioemu/hw/rtl8139.c | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) Index: build-32-unstable-13800/tools/ioemu/hw/rtl8139.c =================================================================== --- build-32-unstable-13800.orig/tools/ioemu/hw/rtl8139.c +++ build-32-unstable-13800/tools/ioemu/hw/rtl8139.c @@ -3423,8 +3423,10 @@ void pci_rtl8139_init(PCIBus *bus, NICIn pci_conf[0x0e] = 0x00; /* header_type */ pci_conf[0x3d] = 1; /* interrupt pin 0 */ pci_conf[0x34] = 0xdc; - pci_conf[0x2c] = pci_conf[0x00]; // same as Vendor ID - pci_conf[0x2d] = pci_conf[0x01]; + pci_conf[0x2c] = 0x53; /* subsystem vendor: XenSource */ + pci_conf[0x2d] = 0x58; + pci_conf[0x2e] = 0x01; /* subsystem device */ + pci_conf[0x2f] = 0x00; s = &d->rtl8139; Index: build-32-unstable-13800/tools/ioemu/hw/cirrus_vga.c =================================================================== --- build-32-unstable-13800.orig/tools/ioemu/hw/cirrus_vga.c +++ build-32-unstable-13800/tools/ioemu/hw/cirrus_vga.c @@ -3340,6 +3340,10 @@ void pci_cirrus_vga_init(PCIBus *bus, Di pci_conf[0x0a] = PCI_CLASS_SUB_VGA; pci_conf[0x0b] = PCI_CLASS_BASE_DISPLAY; pci_conf[0x0e] = PCI_CLASS_HEADERTYPE_00h; + pci_conf[0x2c] = 0x53; /* subsystem vendor: XenSource */ + pci_conf[0x2d] = 0x58; + pci_conf[0x2e] = 0x01; /* subsystem device */ + pci_conf[0x2f] = 0x00; /* setup VGA */ s = &d->cirrus_vga; Index: build-32-unstable-13800/tools/ioemu/hw/ide.c =================================================================== --- build-32-unstable-13800.orig/tools/ioemu/hw/ide.c +++ build-32-unstable-13800/tools/ioemu/hw/ide.c @@ -2502,6 +2502,10 @@ void pci_piix3_ide_init(PCIBus *bus, Blo pci_conf[0x0a] = 0x01; // class_sub = PCI_IDE pci_conf[0x0b] = 0x01; // class_base = PCI_mass_storage pci_conf[0x0e] = 0x00; // header_type + pci_conf[0x2c] = 0x53; /* subsystem vendor: XenSource */ + pci_conf[0x2d] = 0x58; + pci_conf[0x2e] = 0x01; /* subsystem device */ + pci_conf[0x2f] = 0x00; pci_register_io_region((PCIDevice *)d, 4, 0x10, PCI_ADDRESS_SPACE_IO, bmdma_map); --------------060808000606000605020602 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060808000606000605020602--