WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: PCI passthrough stopped working, brainache!

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: PCI passthrough stopped working, brainache!
From: Andy Burns <xen.lists@xxxxxxxxxxx>
Date: Sat, 15 Oct 2011 11:07:22 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 15 Oct 2011 03:08:16 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HUqBaSWCOGheK/7L9HRq4amMWF3flScvvrq5Iad6I6E=; b=lahznSZ73AHLNB/d16CCzgfzk8a4CXQt4owmebZJ5ISR0aa/eipy+OKC/Eemg17Ywy HnTUWezjkWgBskZG3MkI1kDjl1mISX2bDD0pyGNrbosWxDBrqg+Ed5NOHrnzrDnAWtH/ Lmrb/ZTVKmTwA2hyrB56Ko4dKl0Bv7+OFpkG0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111013181543.GF15499@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAE1-PReH55X375oSb_gx4K_2iTTo67xpFfS8r7zv3KPtiOxj_A@xxxxxxxxxxxxxx> <CAE1-PRc9LqO07TjH3TnfSnEB8gLkBhw2211syeA04XPWts62Xg@xxxxxxxxxxxxxx> <CAE1-PRfg3fkMMSQyPO+y8dqxcE-KNJc--6bx84aouaQorOF27w@xxxxxxxxxxxxxx> <20111012035032.GB26092@xxxxxxxxxxxxxxxxx> <CAE1-PRfuo10T2iKJUNoY=Aj4S_TjUbiPT1jARv+iD7g+1qWuNg@xxxxxxxxxxxxxx> <CAE1-PRd9Kicm=dRtDmPKGXM8-fp62NyvDdpww38jA3Afwrt8+g@xxxxxxxxxxxxxx> <20111013181543.GF15499@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 13 October 2011 19:15, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:

> On Wed, Oct 12, 2011 at 10:36:12PM +0100, Andy Burns wrote:
>
>> I discovered that the PCI tuners don't work in dom0 under Xen,
>> they only work if the dom0 is booted  as baremetal.
>
> That would imply it is not the PCI passthrough code (good!).
> It is something related to the driver

I've been having a go at getting the card running in dom0 rather than
domU, no more success yet.

I've stopped using the PCI resource realignment for now, and enabled
debugging knobs in the tuner modules, seems the I2C transfers used to
program the tuner and receive status bits back from it are working OK,
I can see the driver queueing up DMA using a succession of transfer
buffers, and apparently interrupts signalling their completion.

Presume it's correct that within the dom0, the buffers should *NOT* be
within the SWIOTLB range?

# dmesg | grep ffff8800

[    0.000000] found SMP MP-table at [ffff8800000ff780] ff780
[    0.000000] Base memory trampoline at [ffff880000097000] 97000 size 20480
[    0.000000] PERCPU: Embedded 27 pages/cpu @ffff88001fe43000 s81024
r8192 d21376 u110592
[    0.000000] Placing 64MB software IO TLB between ffff880015c00000 -
ffff880019c00000

... snip ...

[ 1539.146723] saa7130[0]/ts: buffer_activate [ffff88000c25ca00]
[ 1539.146726] saa7130[0]/ts: - [top]     buf=ffff88000c25ca00
next=ffff88000959c800
[ 1539.146737] saa7130[0]/core: buffer_next #2
prev=ffff8800041f8440/next=ffff88000959c840
[ 1539.146790] saa7130[0]/core: buffer_queue ffff88000c25c000
[ 1539.154693] saa7130[0]/core: buffer_finish ffff88000c25ca00
[ 1539.154698] saa7130[0]/core: buffer_next ffff88000959c800
[prev=ffff88000c25c040/next=ffff88000959c840]
[ 1539.154702] saa7130[0]/ts: buffer_activate [ffff88000959c800]
[ 1539.154705] saa7130[0]/ts: - [bottom]  buf=ffff88000959c800
next=ffff88000959c600
[ 1539.154716] saa7130[0]/core: buffer_next #2
prev=ffff88000c25c040/next=ffff88000959c640
[ 1540.156114] saa7130[0]/core: timeout on ffff88000959c800
[ 1540.156118] saa7130[0]/core: buffer_finish ffff88000959c800

I assume no meaningful transport stream contents are contained in the
buffers following the transfers, as no stations are found.

Hypervisor, dom0 (and domU when I was using it) are all 64bit, the
tuner device is 32bit, is this likely to be an issue with DMA
transfers? Any extra logging for Xen?

09:00.0 Multimedia controller: Philips Semiconductors SAA7130 Video
Broadcast Decoder (rev 01)
        Subsystem: Compro Technology, Inc. Videomate DVB-T200
        Flags: bus master, medium devsel, latency 64, IRQ 16
        Memory at febffc00 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [40] Power Management version 1
        Kernel driver in use: saa7134
        Kernel modules: saa7134

09:01.0 Multimedia controller: Philips Semiconductors SAA7130 Video
Broadcast Decoder (rev 01)
        Subsystem: Compro Technology, Inc. Videomate DVB-T200
        Flags: bus master, medium devsel, latency 64, IRQ 17
        Memory at febff800 (32-bit, non-prefetchable) [size=1K]
        Capabilities: [40] Power Management version 1
        Kernel driver in use: saa7134
        Kernel modules: saa7134

> Perhaps it is the VM_IO bug that sometimes creeps up..

Any pointers to previous cases of that bug, or the methods to discover it?

> I saw something about I2C, is there a knob in the driver to _not_ use I2C?

Not for my tuner, I've added modprobe options to blacklist devices
that I don't need and turn on debugging for the tuner modules

# cat /etc/modprobe.d/dvb.conf

blacklist ds3000
blacklist dvb_usb_dw2102
blacklist firewire_ehci
blacklist firewire_ohci
options saa7134 disable_ir=1 video_debug=1 ts_debug=1 i2c_debug=1
i2c_scan=1 irq_debug=1 core_debug=1 gpio_tracking=1
options saa7134-dvb debug=1
options tda1004x debug=1

# lsmod
Module                  Size  Used by
lockd                  70080  0
bridge                 72368  0
stp                     1927  1 bridge
llc                     4738  2 bridge,stp
ip6t_REJECT             3992  2
nf_conntrack_ipv6       7730  2
nf_defrag_ipv6          9083  1 nf_conntrack_ipv6
xt_state                1306  2
nf_conntrack           67597  2 nf_conntrack_ipv6,xt_state
ip6table_filter         1655  1
ip6_tables             16792  1 ip6table_filter
snd_hda_codec_realtek   312621  1
raid456                54497  1
async_raid6_recov       5358  1 raid456
async_pq                4339  2 raid456,async_raid6_recov
raid6_pq               78299  2 async_raid6_recov,async_pq
async_xor               3255  3 raid456,async_raid6_recov,async_pq
xor                     4793  1 async_xor
async_memcpy            1845  2 raid456,async_raid6_recov
async_tx                2702  5
raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
tda1004x               14722  2
snd_hda_intel          24072  0
snd_hda_codec          85181  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               6264  1 snd_hda_codec
saa7134_dvb            27032  0
videobuf_dvb            5146  1 saa7134_dvb
dvb_core               87211  1 videobuf_dvb
snd_seq                52186  0
snd_seq_device          5941  1 snd_seq
iTCO_wdt               12024  0
snd_pcm                78514  2 snd_hda_intel,snd_hda_codec
saa7134               159679  1 saa7134_dvb
rc_core                17136  1 saa7134
videobuf_dma_sg         8462  2 saa7134_dvb,saa7134
videobuf_core          15780  3 videobuf_dvb,saa7134,videobuf_dma_sg
v4l2_common             6905  1 saa7134
videodev               78689  2 saa7134,v4l2_common
media                  11511  1 videodev
v4l2_compat_ioctl32     7665  1 videodev
shpchp                 24554  0
i2c_i801                9237  0
serio_raw               4298  0
iTCO_vendor_support     2578  1 iTCO_wdt
sky2                   42923  0
snd_timer              19372  2 snd_seq,snd_pcm
snd                    63124  8
snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore               6267  1 snd
snd_page_alloc          7311  2 snd_hda_intel,snd_pcm
tveeprom               13045  1 saa7134
asus_atk0110           12395  0
x38_edac                3159  0
edac_core              40154  2 x38_edac
xen_netback            23987  0 [permanent]
xen_blkback            17924  0 [permanent]
xen_gntdev              9019  0
xen_evtchn              5032  1
sunrpc                200831  2 lockd
xenfs                   9621  1
raid1                  22676  2
ata_generic             3587  0
uas                     7775  0
pata_acpi               3419  0
usb_storage            46027  0
sata_mv                24941  8
pata_marvell            3240  0
radeon                690803  1
ttm                    54997  1 radeon
drm_kms_helper         26490  1 radeon
drm                   194532  3 radeon,ttm,drm_kms_helper
i2c_algo_bit            4958  1 radeon
i2c_core               25728  11
tda1004x,saa7134_dvb,saa7134,v4l2_common,videodev,i2c_i801,tveeprom,radeon,drm_kms_helper,drm,i2c_algo_bit
[root@xen ~]# lsmod|more
Module                  Size  Used by
lockd                  70080  0
bridge                 72368  0
stp                     1927  1 bridge
llc                     4738  2 bridge,stp
ip6t_REJECT             3992  2
nf_conntrack_ipv6       7730  2
nf_defrag_ipv6          9083  1 nf_conntrack_ipv6
xt_state                1306  2
nf_conntrack           67597  2 nf_conntrack_ipv6,xt_state
ip6table_filter         1655  1
ip6_tables             16792  1 ip6table_filter
snd_hda_codec_realtek   312621  1
raid456                54497  1
async_raid6_recov       5358  1 raid456
async_pq                4339  2 raid456,async_raid6_recov
raid6_pq               78299  2 async_raid6_recov,async_pq
async_xor               3255  3 raid456,async_raid6_recov,async_pq
xor                     4793  1 async_xor
async_memcpy            1845  2 raid456,async_raid6_recov
async_tx                2702  5
raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
tda1004x               14722  2
snd_hda_intel          24072  0
snd_hda_codec          85181  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               6264  1 snd_hda_codec
saa7134_dvb            27032  0
videobuf_dvb            5146  1 saa7134_dvb
dvb_core               87211  1 videobuf_dvb
snd_seq                52186  0
snd_seq_device          5941  1 snd_seq
iTCO_wdt               12024  0
snd_pcm                78514  2 snd_hda_intel,snd_hda_codec
saa7134               159679  1 saa7134_dvb
rc_core                17136  1 saa7134
videobuf_dma_sg         8462  2 saa7134_dvb,saa7134
videobuf_core          15780  3 videobuf_dvb,saa7134,videobuf_dma_sg
v4l2_common             6905  1 saa7134
videodev               78689  2 saa7134,v4l2_common
media                  11511  1 videodev
v4l2_compat_ioctl32     7665  1 videodev
shpchp                 24554  0
i2c_i801                9237  0
serio_raw               4298  0
iTCO_vendor_support     2578  1 iTCO_wdt
sky2                   42923  0
snd_timer              19372  2 snd_seq,snd_pcm
snd                    63124  8
snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore               6267  1 snd
snd_page_alloc          7311  2 snd_hda_intel,snd_pcm
tveeprom               13045  1 saa7134
asus_atk0110           12395  0
x38_edac                3159  0
edac_core              40154  2 x38_edac
xen_netback            23987  0 [permanent]
xen_blkback            17924  0 [permanent]
xen_gntdev              9019  0
xen_evtchn              5032  1
sunrpc                200831  2 lockd
xenfs                   9621  1
raid1                  22676  2
ata_generic             3587  0
uas                     7775  0
pata_acpi               3419  0
usb_storage            46027  0
sata_mv                24941  8
pata_marvell            3240  0
radeon                690803  1
ttm                    54997  1 radeon
drm_kms_helper         26490  1 radeon
drm                   194532  3 radeon,ttm,drm_kms_helper
i2c_algo_bit            4958  1 radeon
i2c_core               25728  11
tda1004x,saa7134_dvb,saa7134,v4l2_common,videodev,i2c_i801,tveeprom,radeon,drm_kms_helper,drm,i2c_algo_bit

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>