On Wed, 2007-05-02 at 20:47 +0100, Ian Campbell wrote:
> On Tue, 2007-05-01 at 19:41 -0500, Guil Barros wrote:
> > Note, I am moving this thread over here from ivtv-users in hopes that  
> > it gets some attention/fixing :) For further info please see the  
> > ivtv-users archive.
> 
> Thinking about it a bit further -- I think the problem is more likely
> with the "swiotlb=foo" options not working, without it the ivtv driver
> failure is somewhat expected.
> 
> The reason for the failure is that Xen to disallow multipage contiguous
> allocations for non-privileged domUs. Unfortunately a swiotlb is
> precisely a multipage contiguous allocation.
> 
> It seems that the way to become a "privileged domU" is to have a
> non-empty set of I/O capabilities and that doing PCI pass-through should
> cause this to happen. (I presume you are passing the PVR device
> through). 
> 
> At least on 3.0.5 this doesn't seem to happen correctly.

Actually it looks like the PCI device needs to have an I/O memory region
and the device I was testing with (a spare USB host controller) only had
an I/O port region.

My PVR box isn't a Xen box so I can't check but I think that since my
pvr card shows I/O memory in lspci you should be OK.

You can confirm by starting the domain with on_crash=preserve then
pressing Ctrl-A 3 times on the Xen console and pressing 'q'. You should
get output like:
        (XEN) Rangesets belonging to domain 4:
        (XEN)     Interrupts { 16 }
        (XEN)     I/O Memory { e0000-e7fff, e8200-e823f }
        (XEN)     I/O Ports  { 2000-20ff }
        (XEN)     I/O Memory { }
        (XEN)     I/O Ports  { 3080-309f }
which should show I/O Memory for your domain. Also /var/log/xen/xend.log
on dom0 should contain something like:
        [2007-05-02 22:55:45 2956] INFO (pciquirk:90) NO quirks found for PCI 
device [1002:5b60:174b:0500]
        [2007-05-02 22:55:45 2956] DEBUG (pciquirk:131) Permissive mode NOT 
enabled for PCI device [1002:5b60:174b:0500]
        [2007-05-02 22:55:45 2956] DEBUG (pciif:155) pci: enabling ioport 
0x2000/0x100
        [2007-05-02 22:55:45 2956] DEBUG (pciif:168) pci: enabling iomem 
0xe0000000/0x8000000 pfn 0xe0000/0x8000
        [2007-05-02 22:55:45 2956] DEBUG (pciif:168) pci: enabling iomem 
0xe8210000/0x10000 pfn 0xe8210/0x10
        [2007-05-02 22:55:45 2956] DEBUG (pciif:168) pci: enabling iomem 
0xe8220000/0x20000 pfn 0xe8220/0x20
        [2007-05-02 22:55:45 2956] DEBUG (pciif:179) pci: enabling irq 16

Ian.
-- 
Ian Campbell

Likewise, the national appetizer, brine-cured herring with raw onions,
wins few friends, Germans excepted.
                -- Darwin Porter "Scandinavia On $50 A Day"


_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to