Skip to contentSkip to conversation

PCI passthrough and 3.3.1/3.4.0 ** SUCCESS**

DISCUSSION Andy Burns 1 participant 2 messages Mar 8, 2009

lore
Share & tools
lore

Andy Burns

author
#0 lore raw

2009/3/8 Andy Burns <[email protected]>:

Quoted 1 line

was a DECLARE_PCI_FIXUP_HEADER missing

It seems that it was missing from the patch, I just added

+DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources);

to the quirks.c section of the patch and now I have three nicely page aligned devices

08:00.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast D)

        Memory at feb01000 (32-bit, non-prefetchable) [disabled] [size=1K]

08:01.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast D)

        Memory at feb02000 (32-bit, non-prefetchable) [disabled] [size=1K]

08:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller )

        Memory at feb00000 (32-bit, non-prefetchable) [size=2K]

I unloaded the dom0 modules for the PCI devices, assigned them to pciback and **YES** my domU loads once again :-)

Now to see if my mythtv domU that previosuly would crash the whole machine every couple of days is any better behaved under 3.3.1 ... I've set up logserial capturing the dom0/xen serial console in case it still does it ...

I'll also try adding the later revisions to Yuji's patch.

author
#1 lore raw

2009/3/8 Andy Burns <[email protected]>:

Quoted 2 lines

Now to see if my mythtv domU that previosuly would crash the whole machine every couple of days is any better behaved under 3.3.1 ...

Well after a few hours of the domU with the PCI passthrough running, the dom0 crashed :-(

irq 16: nobody cared (try booting with the "irqpoll" option)

Call Trace:
 <IRQ>  [<ffffffff802af5b2>] __report_bad_irq+0x30/0x7d
 [<ffffffff802af7e9>] note_interrupt+0x1ea/0x22b
 [<ffffffff802aecef>] __do_IRQ+0xbd/0x103
 [<ffffffff8028cf7e>] _local_bh_enable+0x61/0xc5
 [<ffffffff8026db48>] do_IRQ+0xe7/0xf5
 [<ffffffff8039f979>] evtchn_do_upcall+0x86/0xe0
 [<ffffffff802608d6>] do_hypervisor_callback+0x1e/0x2c
 <EOI>  [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000
 [<ffffffff802063aa>] hypercall_page+0x3aa/0x1000
 [<ffffffff8026f139>] raw_safe_halt+0x84/0xa8
 [<ffffffff8026c683>] xen_idle+0x38/0x4a
 [<ffffffff8024aa8e>] cpu_idle+0x97/0xba
 [<ffffffff805f6b09>] start_kernel+0x21f/0x224
 [<ffffffff805f61e5>] _sinittext+0x1e5/0x1eb

handlers:
[<ffffffff803d34f4>] (usb_hcd_irq+0x0/0x55) [<ffffffff880f47e5>] (ahci_interrupt+0x0/0x473 [ahci]) [<ffffffff88172c7b>] (shpc_isr+0x0/0x207 [shpchp]) Disabling IRQ #16

Message from syslogd@ at Sun Mar 8 20:23:55 2009 ... xen kernel: Disabling IRQ #16general protection fault: 0000 [1] SMP last sysfs file: /devices/xen-backend/vbd-4-51712/statistics/wr_req

Modules linked in: xt_physdev pciback netloop netbk blktap blkbk

ipt_MASQUERADE iptable_nat ip_nat xt_state ip_conntrack nfnetlink ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge ipv6 xfrm_nalgo crypto_api autofs4 eeprom ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi scsi_transport_iscsi nls_utf8 loop dm_multipath raid456 xor video sbs backlight i2c_ec button battery asus_acpi ac parport_pc lp parport snd_hda_intel snd_hda_codec ata_generic video_buf snd_seq_dummy sr_mod snd_seq_oss sata_mv cdrom compat_ioctl32 snd_seq_midi_event ir_kbd_i2c i2c_i801 serio_raw pcspkr serial_core snd_seq i2c_core ir_common ieee1394 snd_seq_device videodev v4l1_compat snd_pcm_oss floppy sg sky2 snd_mixer_oss snd_pcm v4l2_common snd_timer snd soundcore snd_page_alloc shpchp dm_snapshot dm_zero dm_mirror dm_mod usb_storage pata_marvell ahci libata sd_mod scsi_mod raid1 ext3 jbd uhci_hcd ehci_hcd

Pid: 7962, comm: xenstored Not tainted
2.6.18-92.1.22.el5.centos.plus.jab.1xen #1

RIP: e030:[<ffffffff80211362>]  [<ffffffff80211362>]
__find_get_block_slow+0x6e/0xf7
RSP: e02b:ffff8801de5fda48  EFLAGS: 00010283
RAX: 0000000000000000 RBX: f15261e4e3538843 RCX: ffff8801dbc44970
RDX: 0000000000000001 RSI: 000000000040d376 RDI: ffff8801ed8758c8
RBP: ffff88000928e158 R08: ffff8801e07edf10 R09: ffff8801cb0d0c90
R10: 0000000000001000 R11: 0000000000000000 R12: 000000000040d376
R13: ffff8801ed875748 R14: ffff8801ed875858 R15: 0000000000001000
FS:  00002b6ef7d21df0(0000) GS:ffffffff805ad000(0000) knlGS:0000000000000000
CS:  e033 DS: 0000 ES: 0000
Process xenstored (pid: 7962, threadinfo ffff8801de5fc000, task
ffff8801ea73e100)
Stack:  000000000040d376  0000000000000000  ffff8801ed875680  0000000000001000
 ffff8801ddf5c670  ffffffff8023bd95  0000000000001000  0000000000000000
 ffff880008b67aa8  ffffffff8020e7b7

Call Trace:
 [<ffffffff8023bd95>] unmap_underlying_metadata+0x1d/0x5b
 [<ffffffff8020e7b7>] __block_prepare_write+0x1dc/0x438
 [<ffffffff8804fc7c>] :ext3:ext3_get_block+0x0/0xe3
 [<ffffffff8023e702>] block_prepare_write+0x1a/0x25
 [<ffffffff880511cb>] :ext3:ext3_prepare_write+0xaf/0x17b
 [<ffffffff80210655>] generic_file_buffered_write+0x29c/0x645
 [<ffffffff8020e3ae>] current_fs_time+0x3b/0x40
 [<ffffffff8020d381>] file_read_actor+0x0/0xfc
 [<ffffffff8021678a>] __generic_file_aio_write_nolock+0x36c/0x3b8
 [<ffffffff80222262>] generic_file_aio_write+0x65/0xc1
 [<ffffffff8804d18e>] :ext3:ext3_file_write+0x16/0x91
 [<ffffffff802180c3>] do_sync_write+0xc7/0x104
 [<ffffffff80298bce>] autoremove_wake_function+0x0/0x2e
 [<ffffffff80216cd7>] vfs_write+0xce/0x174
 [<ffffffff80217524>] sys_write+0x45/0x6e
 [<ffffffff802602f9>] tracesys+0xab/0xb6

Code: 4c 39 63 18 74 5f 8b 03 48 8b 5b 08 a8 20 b8 00 00 00 00 0f
RIP  [<ffffffff80211362>] __find_get_block_slow+0x6e/0xf7
 RSP <ffff8801de5fda48>

<0>Kernel panic - not syncing: Fatal exception (XEN) Domain 0 crashed: rebooting machine in 5 seconds.

Within the domU I see these physical interrupts

 16:          0        Phys-irq  saa7130[0]
 17:        195        Phys-irq  saa7130[1]
 19:          2        Phys-irq  ohci1394

and within the dom0

  1:          2          0          0          0        Phys-irq  i8042
  6:          5          0          0          0        Phys-irq  floppy
  8:          0          0          0          0        Phys-irq  rtc
  9:          0          0          0          0        Phys-irq  acpi
 12:          4          0          0          0        Phys-irq  i8042
 16:          0          0          0          0        Phys-irq
uhci_hcd:usb3, ahci, shpchp
 17:        544         11          0          0        Phys-irq  sata_mv
 18:     193759          0          0       2035        Phys-irq

ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb8, peth0
19: 5 0 0 0 Phys-irq
uhci_hcd:usb7, eth1
20: 0 0 0 0 Phys-irq
ehci_hcd:usb2, uhci_hcd:usb6

 21:         35          0          0          0        Phys-irq  uhci_hcd:usb4
 22:      48118          0       2055          0        Phys-irq

ahci, HDA Intel

So there is cross-domain IRQ sharing going on, unavoidable with the PCI slots on this motherboard.

I'm sure I've tried various irqpoll and noirqdebug options a year or so ago, but I don't have any of them in my grub config at the moment, so I'll try putting them back, which to use and do they belong as xen parameters or dom0 parameters?