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

[Xen-users] PCI passthrough to PV guest - domU kernel panic when using iommu=soft


  • To: xen-users@xxxxxxxxxxxxx
  • From: Christian <mythtv@xxxxxxxxxx>
  • Date: Fri, 8 Jun 2012 19:17:13 +0200
  • Delivery-date: Sun, 10 Jun 2012 03:43:27 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi everybody,

I followed the tutorial at http://wiki.xen.org/wiki/Xen_PCI_Passthrough to passthrough a PCI-Device (DVB-C Tuner Card [saa7146 device]) to a pv xen guest. My system ist based on an Asus M4N78 Pro motherboard + an AMD X4 600e processor and thus does not come with native IOMMU support. Both, dom0 and domU are based on Ubuntu 12.04 with Xen 4.1.2 from official repositories.
I set up a pv domU guest system that works flawlessly. However, when I try to boot the guest with iommu=soft as a kernel-parameter the domU crashes with a kernel panic. The kernel panic does not seem to be related to an assigned PCI device, since the guest crashes even if no PCI device is passed. 

Here's an excerpt of the guest system's boot log:
(early) [    0.000000] Kernel command line: root=/dev/xvda1 iommu=soft debug loglevel=10 earlyprintk=xenboot console=hvc0 ro xencons=tty
(early) [    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
(early) [    0.000000] Xen-SWIOTLB: Lowering to 32MB
(early) [    0.000000] Xen-SWIOTLB: Lowering to 16MB
(early) [    0.000000] Xen-SWIOTLB: Lowering to 8MB
(early) [    0.000000] Kernel panic - not syncing: Failed to get contiguous memory for DMA from Xen!
(early) [    0.000000] You either: don't have the permissions, do not have enough free memory under 4GB, or the hypervisor memoryis too fragmented! (rc:-12)
(early) [    0.000000] Pid: 0, comm: swapper Not tainted 3.2.0-24-generic #39-Ubuntu
(early) [    0.000000] Call Trace:
(early) [    0.000000]  [<ffffffff8164434a>] panic+0x91/0x1a4
(early) [    0.000000]  [<ffffffff81d2ecd4>] xen_swiotlb_init+0x185/0x1e1
(early) [    0.000000]  [<ffffffff81d0e596>] ? pci_swiotlb_late_init+0x29/0x29
(early) [    0.000000]  [<ffffffff81d0e56d>] ? pci_swiotlb_detect_4gb+0x2c/0x2c
(early) [    0.000000]  [<ffffffff81669cac>] ? bad_to_user+0x7f6/0x7f6
(early) [    0.000000]  [<ffffffff81d00d78>] pci_xen_swiotlb_init+0x17/0x29
(early) [    0.000000]  [<ffffffff81d03b4e>] pci_iommu_alloc+0x57/0x6f
(early) [    0.000000]  [<ffffffff81d10fa3>] mem_init+0x19/0xec
(early) [    0.000000]  [<ffffffff81cfba2d>] start_kernel+0x1da/0x3c7
(early) [    0.000000]  [<ffffffff81cfb388>] x86_64_start_reservations+0x132/0x136
(early) [    0.000000]  [<ffffffff81cfef06>] xen_start_kernel+0x5bc/0x5c3



Some more information about my configuration:

Dom0 (ubuntu 12.04, 3.2.0-24-generic #39-Ubuntu):
* Kernel parameter pci=resource_alignment=01:05.0 set.

* xen-pciback is loaded as module with options in /etc/modprobe.d/xen-pciback.conf:
# hide (0000:01:05.0)
options xen-pciback passthrough=1
options xen-pciback permissive
options xen-pciback hide=(0000:01:05.0) 

* saa7146 driver is blacklisted:
/etc/modprobe.d/blacklist-saa7146.conf:
blacklist saa7146

* xm pci-list-assignable-devices lists mentioned PCI device

* guest's xen.cfg looks as follows:
kernel = "/usr/local/xendomains/precise_test/kernel.img"
ramdisk = "/usr/local/xendomains/precise_test/initrd.img"
memory = 512
vcpus = 1
name = "precisetest"
vif = [ 'mac=00:16:00:00:42:23' ]
disk = [ 'file:/usr/local/xendomains/precise_test/xvda.img,xvda,w'  ]
root = "/dev/xvda1"
pci = [ '01:05.0' ]
extra = "iommu=soft debug loglevel=10 earlyprintk=xenboot console=hvc0 ro xencons=tty"


DomU ubuntu 12.04, 3.2.0-24-generic #39-Ubuntu):
* xen-pcifront is loaded as module

* System starts when iommu=soft is not set and lspci shows passed device. However, the device is not usable

At this point I got stuck and have no clue how to further debug my setup. The log files of both systems are attached. Please let me know, if I missed something.

Thank you very much for your support

best regards
Christian





Attachment: kernel_config.txt
Description: Text document

Attachment: dom0_dmesg.log
Description: Binary data

Attachment: dom0_domain-builder-ng.log
Description: Binary data

Attachment: dom0_xen-hotplug.log
Description: Binary data

Attachment: dom0_xend-debug.log
Description: Binary data

Attachment: dom0_xend.log
Description: Binary data

Attachment: dom0_xm_dmesg.log
Description: Binary data

Attachment: domU_boot.log
Description: Binary data

_______________________________________________
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®.