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

Re: [Xen-users] PCI passthrough to Windows XP



So I think I am making progress. I decided to try and pass a PCIe network card 
(04:00.0) and a PCI sound card (08:02.0) to see if I could get that working. I 
added the following line to my /etc/default/grub

GRUB_CMDLINE_LINUX="xen-pciback.hide=(04:00.0)(08:02.0)(05:00.0)(06:04.0)"

and after a update-grub the relevant portion of my /boot/grub/grub.cfg is

menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-xen-amd64 and XEN 4.0-amd64' 
--class debian --class gnu-linux --class gnu --class os --class xen {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set 2c69309c-05ce-4e2d-b9f9-d651e65342ae
        echo    'Loading Linux 2.6.32-5-xen-amd64 ...'
        multiboot       /boot/xen-4.0-amd64.gz placeholder  
        module  /boot/vmlinuz-2.6.32-5-xen-amd64 placeholder 
root=UUID=2c69309c-05ce-4e2d-b9f9-d651e65342ae ro xen-pciback.hide=(04:00.0)
(08:02.0)(05:00.0)(06:04.0) quiet
        echo    'Loading initial ramdisk ...'
        module  /boot/initrd.img-2.6.32-5-xen-amd64
}

After a reboot

#xm pci-list-assignable-devices

shows the 4 device ids. If I then add the following to the .cfg file for my 
virtual Windows XP machine

pci = ['04:00.0', '08:02.0']

the virtual machine boots and the network card and sound card appear to work 
fine. So it seems like I can get PCI passthrough to work. If I add the card I 
am interested in

pci = ['04:00.0', '08:02.0', '05:00.0', '06:04.0']

or 

pci = ['04:00.0', '08:02.0', '05:00.0']

and try and create the VM, I get

Error: pci: PCI Backend and pci-stub don't own device 0000:05:00.0


If I only have

pci = ['04:00.0', '08:02.0', '06:04.0']

then

xm create windows.cfg doesn't give me an error, but the VM is not created. 
Potentially relevant are

#lspci -t

-[0000:00]-+-00.0
           +-01.0-[01]--
           +-03.0-[02]--+-00.0
           |            \-00.1
           +-07.0-[03]--
           +-10.0
           +-10.1
           +-14.0
           +-14.1
           +-14.2
           +-14.3
           +-19.0
           +-1a.0
           +-1a.1
           +-1a.2
           +-1a.7
           +-1c.0-[04]----00.0
           +-1c.1-[05-06]----00.0-[06]----04.0
           +-1c.4-[07]----00.0
           +-1d.0
           +-1d.1
           +-1d.2
           +-1d.7
           +-1e.0-[08]----02.0
           +-1f.0
           +-1f.2
           \-1f.3

which shows the PCIe card I am having trouble with is a "bridged" device.

#dmesg | grep pciback

[    0.000000] Command line: placeholder root=UUID=2c69309c-05ce-4e2d-b9f9-
d651e65342ae ro xen-pciback.hide=(04:00.0)(08:02.0)(05:00.0)(06:04.0) quiet
[    1.607196] Kernel command line: placeholder root=UUID=2c69309c-05ce-4e2d-
b9f9-d651e65342ae ro xen-pciback.hide=(04:00.0)(08:02.0)(05:00.0)(06:04.0) 
quiet
[    1.779586] pciback 0000:04:00.0: seizing device
[    1.779591] pciback 0000:05:00.0: seizing device
[    1.779594] pciback 0000:06:04.0: seizing device
[    1.779601] pciback 0000:08:02.0: seizing device
[    1.783149] pciback 0000:04:00.0: BAR 6: no parent found for of device 
[0xfffe0000-0xffffffff]
[    1.783354] pciback 0000:05:00.0: PCI bridge, secondary bus 0000:06
[    1.783359] pciback 0000:05:00.0:   IO window: 0x3000-0x3fff
[    1.783370] pciback 0000:05:00.0:   MEM window: 0xd0100000-0xd01fffff
[    1.783378] pciback 0000:05:00.0:   PREFETCH window: disabled
[    1.783644] pciback 0000:05:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 
17
[    1.783652] pciback 0000:05:00.0: setting latency timer to 64
[    1.846611] pciback 0000:08:02.0: PCI INT A -> GSI 18 (level, low) -> IRQ 
18
[    1.846618] pciback 0000:08:02.0: PCI INT A disabled
[    1.846689] pciback 0000:06:04.0: PCI INT A -> GSI 17 (level, low) -> IRQ 
17
[    1.846698] pciback 0000:06:04.0: PCI INT A disabled
[    1.846837] pciback 0000:04:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 
16
[    1.846849] pciback 0000:04:00.0: PCI INT A disabled

which does mean anything to me.

#xm dmesg

(XEN) Xen version 4.0.1 (Debian 4.0.1-5.4) (ultrotter@xxxxxxxxxx) (gcc version 
4.4.5 (Debian 4.4.5-8) ) Sat Sep  8 19:15:46 UTC 2012
(XEN) Bootloader: GRUB 1.98+20100804-14+squeeze1
(XEN) Command line: placeholder
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN)  Found 1 MBR signatures
(XEN)  Found 1 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000008f000 (usable)
(XEN)  000000000008f000 - 0000000000090000 (reserved)
(XEN)  0000000000090000 - 000000000009d000 (usable)
(XEN)  000000000009d000 - 00000000000a0000 (reserved)
(XEN)  00000000000e0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000cf49d000 (usable)
(XEN)  00000000cf49d000 - 00000000cf4bf000 (reserved)
(XEN)  00000000cf4bf000 - 00000000cf664000 (usable)
(XEN)  00000000cf664000 - 00000000cf7bf000 (ACPI NVS)
(XEN)  00000000cf7bf000 - 00000000cf7db000 (usable)
(XEN)  00000000cf7db000 - 00000000cf7ff000 (ACPI data)
(XEN)  00000000cf7ff000 - 00000000cf800000 (usable)
(XEN)  00000000cf800000 - 00000000d0000000 (reserved)
(XEN)  00000000f8000000 - 00000000fd000000 (reserved)
(XEN)  00000000ffe00000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 00000001b0000000 (usable)
(XEN) ACPI: RSDP 000FE020, 0024 (r2 INTEL )
(XEN) ACPI: XSDT CF7FE120, 0074 (r1 INTEL  DX58SO       1599       1000013)
(XEN) ACPI: FACP CF7FD000, 00F4 (r3 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI Warning (tbfadt-0444): Optional field "Pm2ControlBlock" has zero 
address or length: 0000000000000450/0 [20070126]
(XEN) ACPI: DSDT CF7F8000, 4617 (r2 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: FACS CF72A000, 0040
(XEN) ACPI: APIC CF7F7000, 0138 (r2 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: WDDT CF7F6000, 0040 (r1 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: MCFG CF7F5000, 003C (r1 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: ASF! CF7F4000, 00AC (r32 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: HPET CF7F3000, 0038 (r1 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: SSDT CF7DE000, 12344 (r1 INTEL  SSDT  PM     1599 MSFT  100000D)
(XEN) ACPI: DMAR CF7DB000, 0168 (r1 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: WDTT CF7F1000, 020C (r2 INTEL  DX58SO       1599 MSFT  100000D)
(XEN) ACPI: ASPT CF7F2000, 0034 (r4 INTEL  PerfTune     1599 MSFT  100000D)
(XEN) System RAM: 6133MB (6281196kB)
(XEN) Domain heap initialised
(XEN) Processor #0 7:10 APIC version 21
(XEN) Processor #2 7:10 APIC version 21
(XEN) Processor #4 7:10 APIC version 21
(XEN) Processor #6 7:10 APIC version 21
(XEN) Processor #1 7:10 APIC version 21
(XEN) Processor #3 7:10 APIC version 21
(XEN) Processor #5 7:10 APIC version 21
(XEN) Processor #7 7:10 APIC version 21
(XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Detected 3108.037 MHz processor.
(XEN) Initing memory sharing.
(XEN) VMX: Supported advanced features:
(XEN)  - APIC MMIO access virtualisation
(XEN)  - APIC TPR shadow
(XEN)  - Extended Page Tables (EPT)
(XEN)  - Virtual-Processor Identifiers (VPID)
(XEN)  - Virtual NMI
(XEN)  - MSR direct-access bitmap
(XEN) EPT supports 2MB super page.
(XEN) HVM: ASIDs enabled.
(XEN) HVM: VMX enabled
(XEN) HVM: Hardware Assisted Paging detected.
(XEN) Intel VT-d Snoop Control supported.
(XEN) Intel VT-d DMA Passthrough not supported.
(XEN) Intel VT-d Queued Invalidation supported.
(XEN) Intel VT-d Interrupt Remapping supported.
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Total of 8 processors activated.
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using new ACK method
(XEN) TSC is reliable, synchronization unnecessary
(XEN) Platform timer is 14.318MHz HPET
(XEN) Allocated console ring of 16 KiB.
(XEN) Brought up 8 CPUs
(XEN) *** LOADING DOMAIN 0 ***
(XEN)  Xen  kernel: 64-bit, lsb, compat32
(XEN)  Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x1708000
(XEN) PHYSICAL MEMORY ARRANGEMENT:
(XEN)  Dom0 alloc.:   00000001a4000000->00000001a8000000 (1498406 pages to be 
allocated)
(XEN) VIRTUAL MEMORY ARRANGEMENT:
(XEN)  Loaded kernel: ffffffff81000000->ffffffff81708000
(XEN)  Init. ramdisk: ffffffff81708000->ffffffff8332a400
(XEN)  Phys-Mach map: ffffffff8332b000->ffffffff83eb9930
(XEN)  Start info:    ffffffff83eba000->ffffffff83eba4b4
(XEN)  Page tables:   ffffffff83ebb000->ffffffff83ede000
(XEN)  Boot stack:    ffffffff83ede000->ffffffff83edf000
(XEN)  TOTAL:         ffffffff80000000->ffffffff84000000
(XEN)  ENTRY ADDRESS: ffffffff81531200
(XEN) Dom0 has maximum 8 VCPUs
(XEN) Scrubbing Free RAM: .done.
(XEN) Xen trace buffers: disabled
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) Xen is relinquishing VGA console.
(XEN) *** Serial input -> DOM0 (type \047CTRL-a\047 three times to switch 
input to Xen)
(XEN) Freed 176kB init memory.


The "(XEN) Intel VT-d DMA Passthrough not supported." entry stands out to me, 
but doesn't mean anything.

Any ideas?

This message and any attachment are intended solely for the addressee and may 
contain confidential information. If you have received this message in error, 
please send it back to me, and immediately delete it.   Please do not use, copy 
or disclose the information contained in this message or in any attachment.  
Any views or opinions expressed by the author of this email do not necessarily 
reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.