Hello!
Van egy jo kis gep, amin Wheezy van xen-nel (kinomban mar
backportos, 3.13-as kernellel).

# grep 'model name' /proc/cpuinfo 
model name      : Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz

# lspci 
00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 
06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated 
Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller 
(rev 05)
00:16.0 Communication controller: Intel Corporation Lynx Point MEI Controller 
#1 (rev 04)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host 
Controller #2 (rev 05)
00:1c.0 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #1 (rev 
d5)
00:1c.1 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #2 (rev 
d5)
00:1c.2 PCI bridge: Intel Corporation Lynx Point PCI Express Root Port #3 (rev 
d5)
00:1c.3 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d5)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host 
Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation Lynx Point LPC Controller (rev 05)
00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID 
mode] (rev 05)
00:1f.3 SMBus: Intel Corporation Lynx Point SMBus Controller (rev 05)
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI 
Express Gigabit Ethernet controller (rev 0c)
05:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge 
(rev 04)

Van rajta egy virtualis gep, aminek oda szeretnem adni az usb
portokat. Mar egy csomo mindennel probalkoztam, de nem akar
mukodni, a virtualis gep inditasakor mindig ezt kapom:
# xm create /etc/xen/windows-xp.cfg 
Using config file "/etc/xen/windows-xp.cfg".
Error: (22, 'Invalid argument')

# grep iommu /etc/default/grub 
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=512M iommu=1"

Az iommu=1 helyett mar probaltam az "iommu=pass-through" es az
"iommu=dom0-passthrough" opciokkal is, de ugy sem mukodott.

# grep pci /etc/default/grub
#GRUB_CMDLINE_LINUX="ipv6.disable=1 
xen-pciback.hide=(0000:00:14.0)(0000:00:1d.0)"
GRUB_CMDLINE_LINUX="ipv6.disable=1 xen-pciback.hide=(00:14.0)(00:1d.0)"
Mind a ket variacioval probalkoztam mar...

# cat /etc/modprobe.d/xen-pciback.conf 
options xen-pciback passthrough=1

A xen-pciback es a pci-stub modulokkal is megprobaltam,
termeszetesen kulon-kulon, reboot volt a probalkozasok kozott,
hogy tuti "uresen" induljon minden...

# cat usb_hozzarendeles_xen-pciback.sh 
#!/bin/bash

modprobe xen-pciback

echo "0000:00:14.0" > /sys/bus/pci/devices/0000\:00\:14.0/driver/unbind
echo "0000:00:14.0" > /sys/bus/pci/drivers/pciback/new_slot
echo "0000:00:14.0" > /sys/bus/pci/drivers/pciback/bind

echo "0000:00:1d.0" > /sys/bus/pci/devices/0000\:00\:1d.0/driver/unbind
echo "0000:00:1d.0" > /sys/bus/pci/drivers/pciback/new_slot
echo "0000:00:1d.0" > /sys/bus/pci/drivers/pciback/bind

# cat usb_hozzarendeles_pci-stub.sh 
#!/bin/bash

modprobe pci_stub

echo "8086 8c31" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:00:14.0" > /sys/bus/pci/devices/0000\:00\:14.0/driver/unbind
echo "0000:00:14.0" > /sys/bus/pci/drivers/pci-stub/bind

echo "8086 8c26" > /sys/bus/pci/drivers/pci-stub/new_id
echo "0000:00:1d.0" > /sys/bus/pci/devices/0000\:00\:1d.0/driver/unbind
echo "0000:00:1d.0" > /sys/bus/pci/drivers/pci-stub/bind

Barmelyik fenti szkriptet is futtatom, ezt kapom:
# xm pci-list-assignable-devices
0000:00:14.0
0000:00:1d.0

# cat /etc/xen/windows-xp.cfg
kernel = 'hvmloader'
builder = 'hvm'
vcpus = '2'
memory = '3280'
disk = [ 'phy:/dev/mapper/VG-xp,hda,w',
         'phy:/dev/mapper/SSD-xp--data,hdb,w']
name = 'windows-xp'
vif = ['mac=00:00:00:00:00:11,bridge=br0,model=e1000']
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
boot = 'c'
acpi = '1'
apic = '1'
viridian = '1'
xen_platform_pci = '1'
vfb = [ 
'vnc=1,sdl=0,vncdisplay=1,vnclisten=127.0.0.1,display=1,vncpasswd=jelszo,keymap=hu']
stdvga = '0'
usb = '1'
usbdevice = 'tablet'
pci = [ '00:14.0' , '00:1d.0' ]

# lspci -vv | egrep -i --colour flreset
                        ExtTag- RBE+ FLReset-
                        ExtTag- RBE- FLReset+
                        ExtTag- RBE+ FLReset-
                        ExtTag- RBE+ FLReset-
                        ExtTag- RBE+ FLReset-
                        ExtTag- RBE+ FLReset-
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

Aminel FLReset+ van, az ez:
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)

Igy ne is varjam, hogy oda tudom adni az usb-t a virtualis
gepnek?

# xm dmesg | grep -i enable
(XEN) Intel VT-d Snoop Control not enabled.
(XEN) Intel VT-d Dom0 DMA Passthrough not enabled.
(XEN) Intel VT-d Queued Invalidation enabled.
(XEN) Intel VT-d Interrupt Remapping enabled.
(XEN) Intel VT-d Shared EPT tables not enabled.
(XEN) I/O virtualisation enabled
(XEN) Enabled directed EOI with ioapic_ack_old on!
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled

Gondolom, hogy azert nem mukodik, mert nincs passthrough.
De vajon miert nincs? Mi az, ami miatt nincs? Elvileg az i7-es
proci tudja.

-- 
                Udvozlettel
                                    Zsiga
_________________________________________________
linux lista      -      linux@mlf.linux.rulez.org
http://mlf.linux.rulez.org/mailman/listinfo/linux

válasz