Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

using PCI devices in guest domains



Hi,
with my recent commits, it's possible to use PCI devices in NetBSD guest
domains (tested with uhci(4) and ahc(4)). Unfortunably the primary VGA
adapter can't be exported because Xen don't allow to use ISA devices
in other domains than domain0. 

First you need to tell the hyperviror to hide some devices from domain0.
Use physdev_dom0_hide on grub's command line. For example:
physdev_dom0_hide='(00:04.2)(01:00.0)(00:06.0)'
(the syntax is bus:device.function, all numbers in hex).
Then build a XENU kernel with PCI support:
include         "arch/i386/conf/XENU"

# Add support for PCI busses to the XENU kernel
pci*            at hypervisor? bus ?

# Now add PCI and related devices to be used by this domain
# USB Controller and Devices

# PCI USB controllers
uhci*   at pci? dev ? function ?        # Universal Host Controller (Intel)

# USB bus support
usb*    at uhci?

# USB Hubs
uhub*   at usb?
uhub*   at uhub? port ? configuration ? interface ?

# USB Mass Storage
umass*  at uhub? port ? configuration ? interface ?
wd*     at umass?

# SCSI controllers
ahc*    at pci? dev ? function ?        # Adaptec [23]94x, aic78x0 SCSI

# SCSI bus support (for both ahc and umass)
scsibus* at scsi?

# SCSI devices
sd*     at scsibus? target ? lun ?      # SCSI disk drives
cd*     at scsibus? target ? lun ?      # SCSI CD-ROM drives


And add the PCI devices to the config file for this guest domain:
pci = [ '0,4,2','0,6,0' ]

This should work. 

Note: I send a diff to www@ to add this to the howto.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--



Home | Main Index | Thread Index | Old Index