From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Bobulsky Subject: Re: Some MSI related bugs when trying to use VT-d. Help identify software vs hardware problem? Date: Wed, 22 May 2013 14:32:49 -0700 Message-ID: <3656599526576098219@unknownmsgid> References: <20130510133638.GB19520@phenom.dumpdata.com> <-4289025711329885815@unknownmsgid> <20130522202131.GD12372@phenom.dumpdata.com> Mime-Version: 1.0 (1.0) Content-Type: multipart/mixed; boundary="===============5639505168047323032==" Return-path: In-Reply-To: <20130522202131.GD12372@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: George Dunlap , Jan Beulich , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============5639505168047323032== Content-Type: multipart/alternative; boundary=047d7b111c53e081d804dd554e0e --047d7b111c53e081d804dd554e0e Content-Type: text/plain; charset=ISO-8859-1 Hello Konrad! On May 22, 2013, at 1:21 PM, Konrad Rzeszutek Wilk wrote: On Fri, May 10, 2013 at 11:20:28AM -0400, Andrew Bobulsky wrote: Hello Konrad, Thanks for getting back to me! Sure, sorry for the long response, vacation and other things have delayed my response time. In a sheer twist of irony, I'm now the one who is on vacation :D I'll be returning home on the 28th, and will be able to answer with better detail at that point, but I can give you a few answers in the meantime. Here goes! On May 10, 2013, at 9:36 AM, Konrad Rzeszutek Wilk wrote: On Wed, May 08, 2013 at 09:45:14AM +0100, George Dunlap wrote: On Tue, May 7, 2013 at 11:38 AM, Andrew Bobulsky wrote: Hello List! I'm having another [rather fruitless] go at trying to get PCIe passthrough to work on my Radeon 6990 card(s). I have an i7 920 chip in a Gigabyte GA-EX58-EXTREME board that I've flashed a modded BIOS into to add VT-d support... I found the BIOS image on a BIOS modding forum maybe a year or two ago. I stuck an extra Highpoint RocketU 1144A USB 3 card into the board, because I know it works *very well* with IOMMU and its architecture is really convenient... each port on the back is essentially its own PCIe device[1]. I was able to "xl pci-assignable-add" the usb controllers, and attach and detach them at will to a Server 2012 DomU. The dmesg output from that event looked like this: [49857.921550] xhci_hcd 0000:06:00.0: remove, state 4 [49857.921555] usb usb15: USB disconnect, device number 1 [49857.921600] xHCI xhci_drop_endpoint called for root hub [49857.921602] xHCI xhci_check_bandwidth called for root hub [49857.921681] xhci_hcd 0000:06:00.0: USB bus 15 deregistered [49857.921686] xhci_hcd 0000:06:00.0: remove, state 1 [49857.921689] usb usb13: USB disconnect, device number 1 [49857.921691] usb 13-1: USB disconnect, device number 4 [49857.953278] xHCI xhci_drop_endpoint called for root hub [49857.953280] xHCI xhci_check_bandwidth called for root hub [49857.963158] xhci_hcd 0000:06:00.0: USB bus 13 deregistered [49857.963455] pciback 0000:06:00.0: seizing device [49857.963500] xen: registering gsi 17 triggering 0 polarity 1 [49857.963503] Already setup the GSI :17 [49857.963514] pciback 0000:06:00.0: MSI-X preparation failed (-38) Nonetheless, it works quite well! I played audio through a USB headset from the DomU to confirm it as well. However, when I try to "xl pci-assignable-add" one of my VGA controllers from the Radeon, the action completes, and "xl pci-assignable-list" shows the device as available, but "xl pci-attach" never completes, and attemping to "xl pci-assignable-add" the HDMI audo device never returns to the CLI either. OK, and is 0e:00.0 your VGA controller? How do you assign the VGA controller? Do you do: echo "0000:0e.00.0" > /sys/../radeon/unbind echo "0000:0e.00.0" > /sys/../pciback/new_slot echo "0000:0e.00.0" > /sys/../pciback/bind ? I tried both the sysfs methods suggested by the wiki, as well as trying to hide the device via grub. Pciback is compiled into the kernel (I can't say I verified it, but it's definitely loaded and doesn't show up on lsmod :P). I didn't check my dmesg output when using sysfs, as I just figured I was doing something wrong as certain objects either didn't exist or wouldn't accept input via the ">" operator. I can't remember precisely, but I'd be willing to go back and find out if you like. I basically ended up doing "xl pci-assignable-add" to all of the functions I needed. In the case of the 6990, there are four, which for me are 0:d:0.0-1, and 0:e:0.0-1. Two VGA controllers and their respective HDMI audio devices. There are two of these cards in the system, a total of 8 functions: four VGA controllers and four HDMI audio devices. The four listed here are on my "unused" card. The AMD CCC does detect all four devices, so I assume that the driver is bound to all of them by the time I get around to running my xl commands. There is no visible output in dmesg from the attempt on the HDMI audio device, but when I run it against the VGA controller, I get this: [55817.715309] pciback 0000:0e:00.0: seizing device [55817.737444] ------------[ cut here ]------------ [55817.737447] kernel BUG at drivers/pci/msi.c:346! [55817.737449] invalid opcode: 0000 [#1] PREEMPT SMP [55817.737451] Modules linked in: xt_physdev iptable_filter ip_tables x_tables tun parport_pc ppdev lp parport bnep rfcomm bluetooth rfkill crc16 cpufreq_stats binfmt_misc fuse bridge stp llc ext2 loop snd_hda_codec_hdmi snd_hda_codec_realtek joydev mperf coretemp crc32c_intel fglrx(PO) snd_hda_intel snd_hda_codec snd_usb_audio microcode hid_generic mxm_wmi snd_usbmidi_lib evdev psmouse snd_seq_midi snd_seq_midi_event i2c_i801 pcspkr tpm_tis snd_hwdep tpm snd_rawmidi serio_raw snd_pcm i2c_core tpm_bios snd_seq snd_timer snd_seq_device lpc_ich mfd_core snd ehci_pci soundcore snd_page_alloc wmi xhci_hcd button processor thermal_sys sg sr_mod cdrom ext3 jbd mbcache dm_mirror dm_region_hash dm_log dm_mod sd_mod crc_t10dif usb_storage usbhid hid ahci libahci uhci_hcd ehci_hcd usbcore usb_common e1000e [55817.737482] CPU 6 [55817.737484] Pid: 18055, comm: xl Tainted: P O 3.8.11 #1 Gigabyte Technology Co., Ltd. EX58-EXTREME/EX58-EXTREME [55817.737485] RIP: e030:[] [] free_msi_irqs+0x5d/0x11b [55817.737490] RSP: e02b:ffff88034211dd08 EFLAGS: 00010282 [55817.737491] RAX: ffff880420bbd600 RBX: ffff88042096fa80 RCX: 0000000000000000 [55817.737492] RDX: 0000000000000000 RSI: 0000000000000091 RDI: 0000000000000011 [55817.737493] RBP: ffff880421f81000 R08: ffff88042096fa80 R09: ffff88034211dce4 [55817.737494] R10: ffff88034211dd16 R11: 0000000000000000 R12: ffff880421f81858 [55817.737495] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 [55817.737498] FS: 00007fa609475740(0000) GS:ffff88043a2c0000(0000) knlGS:0000000000000000 [55817.737499] CS: e033 DS: 0000 ES: 0000 CR0: 000000008005003b [55817.737500] CR2: ffffffffff600400 CR3: 000000033a673000 CR4: 0000000000002660 [55817.737501] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [55817.737503] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [55817.737504] Process xl (pid: 18055, threadinfo ffff88034211c000, task ffff8804217b5ca0) [55817.737504] Stack: [55817.737505] 00000000000000a2 ffff880421f81000 0000000000000000 ffff8803ca2ab6c0 [55817.737507] ffff880421f81098 ffff880421f810f8 ffff8803ca2abc00 ffffffff811eb21d [55817.737509] ffff880421f81000 ffffffff81240822 ffff880421f81098 ffff880421f81000 [55817.737510] Call Trace: [55817.737513] [] ? pci_disable_msi+0x28/0x41 [55817.737516] [] ? xen_pcibk_reset_device+0x3a/0xa0 [55817.737518] [] ? pcistub_init_device+0x167/0x19c [55817.737521] [] ? __kmalloc+0xd6/0xe2 [55817.737523] [] ? pcistub_probe+0x134/0x1b8 [55817.737525] [] ? local_pci_probe+0x37/0x5d [55817.737527] [] ? pci_device_probe+0xc2/0xe3 [55817.737529] [] ? driver_probe_device+0xa1/0x1ac [55817.737532] [] ? driver_bind+0x7e/0xc7 [55817.737534] [] ? sysfs_write_file+0xd3/0x10f [55817.737537] [] ? vfs_write+0xa4/0xfe [55817.737539] [] ? _raw_spin_lock+0xe/0x2a [55817.737541] [] ? sys_write+0x58/0x92 [55817.737543] [] ? system_call_fastpath+0x16/0x1b [55817.737544] Code: 8a 3b 45 31 f6 41 d0 ef 44 89 f9 45 89 ef 83 e1 07 41 d3 e7 eb 1c 8b 7b 0c 44 01 f7 e8 59 74 eb ff 48 83 b8 90 00 00 00 00 74 04 <0f> 0b eb fe 41 ff c6 45 39 fe 7c df 48 8b 5b >10 48 83 eb 10 48 [55817.737560] RIP [] free_msi_irqs+0x5d/0x11b [55817.737562] RSP [55817.737563] ---[ end trace e1c5a8a903358804 ]--- Any chance anyone could help me identify the source of this problem? Can I work around it with software, or do I need a different motherboard or video card to make it work? cc'ing Konrad and a couple of other people who might be able to take a look at the BUG That looks to be: 344 #ifdef CONFIG_GENERIC_HARDIRQS 345 for (i = 0; i < nvec; i++) 346 BUG_ON(irq_has_action(entry->irq + i)); 347 #endif I have to say I hadn't actually compiled the kernel with GENERIC_HARDIRQS in a while. I take it back, it looks as if my kernel has been compiling with that option. Looking at the code the issue seems that the MSI is enabled when the PCI device was assigned to xen-pciback. That looks like a bug in the radeon driver. And based on our config (thanks!) you could also do this on your Linux command line: xen-pciback.hide=(0e:00.0) If you do that and try to pass in the radeon device does it work? Strangely, this was actually the second or third thing I tried... It's like my system is ignoring it for some reason. I hid *all* of the devices I wanted to use via grub... But they weren't hidden. I don't recall if I tried it with my USB 3 controller, as *it* worked just fine when yanking it from Dom0 via xl. What do you mean by hidden? Are you thinking that by doing 'lspci' you wouldn't see them? They will be visible in your dom0. It is just that the driver (radeon) won't bind to them. You will see something like this (look for pciback): 01:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06) Subsystem: Intel Corporation PRO/1000 PT Dual Port Server Adapter Flags: fast devsel, IRQ 16 Memory at fe4a0000 (32-bit, non-prefetchable) [disabled] [size=128K] Memory at fe480000 (32-bit, non-prefetchable) [disabled] [size=128K] I/O ports at e020 [disabled] [size=32] Expansion ROM at fe460000 [disabled] [size=128K] Capabilities: [c8] Power Management version 2 Capabilities: [d0] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [e0] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Device Serial Number 00-15-17-ff-ff-8f-18-a2 ======> Kernel driver in use: pciback <==================== Kernel modules: e1000e When I say that they weren't hidden, while I didn't check with lspci -v, running xl pci-assignable-list shows that nothing is available to pass to a DomU. I have to xl pci-assignable-add every device I want to use regardless of whether or not it is hidden via my GRUB command line. Additionally, the Radeon driver was bound to the card I hid via grub, and its HDMI audio device was also bound to snd-hda-intel (I think) in spite of it also being in the grub command line. xl itself mentions that it is seizing devices from others drivers in order to bind them to pciback. I ended up on kernel 3.8.11 because various other kernels I tried, including 3.4.9 and something from the 3.7.x line both resulted in X failing to start, but only when booting Xen. After playing kernel shuffle X failing to start? Blinking (or solid, I cant recall precisely) underscore-type cursor in the upper left corner of the screen, and it appears to be at a BIOS-like text-mode resolution. What card at that point are you using? Is the radeon or another? How does it fail? I tried with the Radeon 6990, and also with a Radeon 5850. I tried with and without the Radeon driver, too, it didn't seem to make much difference :( If you boot with 'drm.debug=255 debug loglevel=8' on your command line what does dmesg (or /var/log/messages) show? Can you attach that please. I usually rebooted the system so my dmesg was out of date by the time i get my hands on it. I could try to SSH in, which should work as the system responds to Ctrl-Alt-Del by rebooting after a few seconds, or grab a historical log.... I'll report back next week :) Perhaps you can also attach the lspci so I can get an idea of what is what in your box. The best I have access to is an lspci -vtQ that I ran a while back: http://pastebin.com/raw.php?i=4dGmneYi for a while, I've landed, late last night, on 3.4.44, and it actually resolved my MSI problem! Funny enough, every kernel I've tried has been built with the config I posted too, 3.4.44 included! If I was just "doing it wrong" with the 3.8.11 kernel, then the solution of "use 3.4.44 instead" is acceptable for me, but if I've truly hit on some kind of kernel bug that bears resolving, I still have the dpkg images that I built of all the kernels in question and can collect more data as needed. I'm rebooting a lot right now anyway. ;) Still, I'm troubled by my inability to hide devices via grub. I just expected it to work and am flabbergasted that it won't... I'll send a copy of my grub config if you like, but I don't want to pollute the developers list with an issue that's probably more appropriate for the users list. :) cat /proc/cmdline and 'xl info' would help. Thanks so much for your time and help, Konrad! I really, really appreciate it! Sure thing. Cheers, Andrew --047d7b111c53e081d804dd554e0e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Konrad!

On May= 22, 2013, at 1:21 PM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:

On Fri, May 10, 2013 at 11:2= 0:28AM -0400, Andrew Bobulsky wrote:
Hello Konrad,

Thanks for getting back to me!=

Sure, sorry for the long res= ponse, vacation and other things have delayed
my response t= ime.

In a sheer twist of irony, I'm n= ow the one who is on vacation :D

I'll be retur= ning home on the 28th, and will be able to answer with better detail at tha= t point, but I can give you a few answers in the meantime. =A0Here goes!




<= span>On May 10, 2013, at 9:36 AM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
wrote:
=

On Wed, May 08, 2013 at 09:45:14AM +0100, George Dunlap wrote:=

On Tue, May 7, 2013 at 11:38 AM, Andrew Bobulsky = <rulerof@gmail.com> wrote:

Hello List!

<= /span>
I'm having another [rather= fruitless] go at trying to get PCIe passthrough

to work on my Radeon 6990 card(s). =A0I have an i7 920 chip in a Giga= byte

GA-EX58-EXTREME board that I'v= e flashed a modded BIOS into to add VT-d

support... I found the BIOS image on a BIOS moddi= ng forum maybe a year or
<= span>
two ago.



I stuck an extra Highpoint Roc= ketU 1144A USB 3 card into the board, because

I know it works *very well* with IOMMU and its architecture is reall= y

convenient... each port on the back is essentiall= y its own PCIe device[1].
=
I was able to "xl pci-ass= ignable-add" the usb controllers, and attach and

detach them at will to a Server 2012 DomU. =A0The dmesg output from t= hat event
looked like this:
<= /blockquote>


[49857= .921550] xhci_hcd 0000:06:00.0: remove, state 4

[49857.921555= ] usb usb15: USB disconnect, device number 1

= [49857.921600] xHCI xhci_drop_endpoint called for root hub

[49857.921602] xHCI xhci_check_bandwidth called f= or root hub
<= br>
[49857.921681] xhci_hcd 0000:0= 6:00.0: USB bus 15 deregistered

[49857.= 921686] xhci_hcd 0000:06:00.0: remove, state 1

[49857.921689] usb usb13: USB disconnect, device = number 1

=
[49857.921691] usb 13-1: USB disconnect, de= vice number 4

[49857.953278] xHCI xhci_= drop_endpoint called for root hub

[49857.953280] xHCI xhci_check_bandwidth called f= or root hub
<= br>
[49857.963158] xhci_hcd 0000:0= 6:00.0: USB bus 13 deregistered

[49857.= 963455] pciback 0000:06:00.0: seizing device

[49857.963500] xen: registering gsi 17 triggering= 0 polarity 1

[49857.963503] Already setup t= he GSI :17
[49857.963514] pciback 0000:= 06:00.0: MSI-X preparation failed (-38)



Nonetheless,= it works quite well! =A0I played audio through a USB headset from

the DomU to confirm it as well.




However, when I try to "xl pci-assignable-add&= quot; one of my VGA controllers

from the Radeon, the action completes, and "= xl pci-assignable-list" shows

the device as= available, but "xl pci-attach" never completes, and attemping

to "xl pci-assignable-add" the HD= MI audo device never returns to the CLI

either.


OK, and is 0e:00.0 your VGA controller?

How do you as= sign the VGA controller? Do you do:

ech= o "0000:0e.00.0" > /sys/../radeon/unbind
echo "0000:0e.00.0" = > /sys/../pciback/new_slot
echo "0000:0e.00.0" > /sys/../pciback/bind
?


I tried bot= h the sysfs methods suggested by the wiki, as well as trying to
hide the device via grub. Pcib= ack is compiled into the kernel (I can't say
I verified it, but it's definitely loaded = and doesn't show up on lsmod :P).

I didn't check my dmesg output when using sys= fs, as I just figured I was
doing something wrong as certain objects either didn't exist or w= ouldn't
accept i= nput via the ">" operator. =A0I can't remember precisely, = but I'd be
willing to go back and find ou= t if you like.

I basically ended up doi= ng "xl pci-assignable-add" to all of the functions
I needed. =A0In the case of th= e 6990, there are four, which for me are
0:d:0.0-1, and 0:e:0.0-1. =A0Two VGA controllers and t= heir respective HDMI
audio devices.

There are two of these cards in the system, a total of= 8 functions: four
VGA controllers and four HDMI = audio devices. =A0The four listed here are on
my "unused" card. =A0The AMD CCC does d= etect all four devices, so I assume
that the driver is bound to al= l of them by the time I get around to running
my xl commands.


There is no visible output in dm= esg from the attempt on the HDMI audio

device, but w= hen I run it against the VGA controller, I get this:


[55817.715309= ] pciback 0000:0e:00.0: seizing device

= [55817.737444] ------------[ cut here ]------------

[55817.737447] kernel BUG at drivers/pci/msi.c:34= 6!

[55817.737449] invalid opcode: 0000 [#1] PR= EEMPT SMP
[55817.737451] Modules linked= in: xt_physdev iptable_filter ip_tables

x_tables tun parport_pc ppdev lp parport bnep rfc= omm bluetooth rfkill crc16

cpufreq_stats binfmt_misc fuse= bridge stp llc ext2 loop snd_hda_codec_hdmi

= snd_hda_codec_realtek joydev mperf coretemp crc32c_intel fglrx(PO)

snd_hda_intel snd_hda_codec snd_usb_audio microco= de hid_generic mxm_wmi

snd_usbmidi_lib evdev psmouse = snd_seq_midi snd_seq_midi_event i2c_i801

pcspkr tpm_tis snd_hwdep tpm snd_rawmidi serio_raw snd_pcm i2c_core tpm_b= ios

snd_seq snd_timer snd_seq_device lpc_ich mfd_core= snd ehci_pci soundcore

snd_page_alloc wmi xhci_hcd bu= tton processor thermal_sys sg sr_mod cdrom

ext3 jbd mbcache dm_mirror dm_region_hash dm_log dm_mod sd_mod crc_t10d= if

usb_storage usbhid hid ahci libahci uhci_hcd ehci= _hcd usbcore usb_common

e1000e
=

[55817.737482] CPU 6

[55817.737484= ] Pid: 18055, comm: xl Tainted: P =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0O 3.8.11 #1=

Gigabyte Technology Co., Ltd. EX58-EXTREME/EX58-EXTREME

[55817.737485] RIP: e030:[<ffffffff811eab09>] = =A0[<ffffffff811eab09>]

free_msi_irqs+0x5d/0x11b
<= blockquote type=3D"cite">
[55817.737490] RSP: e02b:ffff88034211dd08 =A0EFLAGS: 00010282<= br>

[55817.737491] RAX: ffff880420bbd600 RBX: ffff= 88042096fa80 RCX:

0000000000000000

[55817.737492] RDX: 0000000000000000 RSI: 0000000000000091 RDI:<= br>

0000000000000011

[55817.737493] RBP: ffff880421f81000 R08: ffff88042096fa80 R09:<= br>

ffff88034211dce4

[55817.737494] R10: ffff88034211dd16 R11: 0000000000000000 R12:<= br>

ffff880421f81858

[55817.737495] R13: 0000000000000001 R14: 0000000000000000 R15:<= br>

0000000000000001

[55817.737498] FS: =A000007fa609475740(0000) GS:ffff88043a2c0000(0000)<= /span>

knlGS:0000000000000000

[55817.737499] CS: =A0e033 DS: 0000 ES: 0000 CR0: 000000008005003b

[55817.737500] CR2: ffffffffff600400 CR3:= 000000033a673000 CR4:

0000000000002660

[55817.737501] DR0: 0000000000000000 DR1: 0000000000000000 DR2:<= br>

0000000000000000

[55817.737503] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:<= br>

0000000000000400

[55817.737504] Process xl (pid: 18055, threadinfo ffff88034211c000, tas= k

ffff8804217b5ca0)

<= span>[55817.737504] Stack:

[55817.737505] =A000000000000000a2 ffff880421f810= 00 0000000000000000
=
ffff8803ca2ab6c0

[55817.737507] =A0ffff880421f81098 ffff880421f810f8 = ffff8803ca2abc00

ffffffff811eb21d

[55817.737509] =A0ffff880421f81000 ffffffff81240822 ffff880421f81098

ffff880421f81000

[55817.737510] Call Trace:

[55817.737513] =A0[<ffffffff811eb21d>] ? pc= i_disable_msi+0x28/0x41

[55817.737516] =A0[<fffffff= f81240822>] ? xen_pcibk_reset_device+0x3a/0xa0

[55817.737518] =A0[<ffffffff8123fd9f>] ? pcistub_init_device+0x= 167/0x19c
[55817.737521] =A0[<ffffff= ff81108661>] ? __kmalloc+0xd6/0xe2

[55817.737523] =A0[<ffffffff8123ff08>] ? pc= istub_probe+0x134/0x1b8

[55817.737525] =A0[<fffffff= f811df0f5>] ? local_pci_probe+0x37/0x5d

[55817.737527] =A0[<ffffffff811dff7c>] ? pci_device_probe+0xc2/0x= e3

[55817.737529] =A0[<ffffffff81277d71>] ? dr= iver_probe_device+0xa1/0x1ac

[55817.737532] =A0[<fffffff= f81276e38>] ? driver_bind+0x7e/0xc7

= [55817.737534] =A0[<ffffffff81165859>] ? sysfs_write_file+0xd3/0x10f<= /span>

[55817.737537] =A0[<ffffffff8110fb7d>] ? vf= s_write+0xa4/0xfe

[55817.737539] =A0[<fffffff= f813c22e5>] ? _raw_spin_lock+0xe/0x2a

[55817.737541] =A0[<ffffffff8110fcc8>] ? sys_write+0x58/0x92=

[55817.737543] =A0[<ffffffff813c7f29>] ? sy= stem_call_fastpath+0x16/0x1b

[55817.737544] Code: 8a 3b 45 = 31 f6 41 d0 ef 44 89 f9 45 89 ef 83 e1 07 41

= d3 e7 eb 1c 8b 7b 0c 44 01 f7 e8 59 74 eb ff 48 83 b8 90 00 00 00 00 = 74 04

<0f> 0b eb fe 41 ff c6 45 39 fe 7c df 48 8b= 5b >10 48 83 eb 10 48
=
[55817.737560] RIP =A0[<fff= fffff811eab09>] free_msi_irqs+0x5d/0x11b

<= span>[55817.737562] =A0RSP <ffff88034211dd08>

[55817.737563] ---[ end trace e1c5a8a903358804 ]-= --



Any ch= ance anyone could help me identify the source of this problem? =A0Can I

work around it with software, or do I need a diff= erent motherboard or video

card to make it work?


cc'ing Konrad and a couple of other people who might be able t= o take a

look at the BUG


That looks to be:

344 #ifdef CONFIG_GENERIC_HARDIRQS

345 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0for (i =3D= 0; i < nvec; i++)

346 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0BUG_ON(irq_has_action(entry->irq + i));
=

347 #endif

I have to say= I hadn't actually compiled the kernel with GENERIC_HARDIRQS
=
in a while.

I take it back, it looks as if my kernel has been co= mpiling with that
option.


Looking at the code the issue seems that the MSI is enabled when
the PCI device was assig= ned to xen-pciback. That looks like a bug
in the radeon driver.

And based o= n our config (thanks!) you could also do this on your Linux
command line:

xen-pciback.hide=3D(0e:00.0)

If you do tha= t and try to pass in the radeon device does it work?


Strangely, th= is was actually the second or third thing I tried... It's like
my system is ignoring it for= some reason. =A0I hid *all* of the devices I
wanted to use via grub... But = they weren't hidden. =A0I don't recall if I
=
tried it with my USB 3 controller, as *it* = worked just fine when yanking it
from Dom0 via xl.

What do you mean by hidden? Are you think= ing that by doing 'lspci' you wouldn't
see them= ? They will be visible in your dom0. It is just that the driver
(radeon) won't bind to them. You will see something like this (lo= ok for
pciback):

01:00.0 E= thernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (= rev 06)
=A0=A0=A0=A0=A0=A0=A0Subsystem: Intel Corporation PRO/1000 PT Dual P= ort Server Adapter
=A0=A0=A0=A0=A0=A0=A0Flags: fast devsel= , IRQ 16
=A0=A0=A0=A0=A0=A0=A0Memory at fe4a0000 (32-bit, = non-prefetchable) [disabled] [size=3D128K]
=A0=A0=A0=A0=A0=A0=A0Memory at fe480000 (32-bit, non-prefetchable) [= disabled] [size=3D128K]
=A0=A0=A0=A0=A0=A0=A0I/O ports at = e020 [disabled] [size=3D32]
=A0=A0=A0=A0=A0=A0=A0Expansion= ROM at fe460000 [disabled] [size=3D128K]
=A0=A0=A0=A0=A0=A0=A0Capabilities: [c8] Power Management version 2
=A0=A0=A0=A0=A0=A0=A0Capabilities: [d0] MSI: Enable- Count= =3D1/1 Maskable- 64bit+
=A0=A0=A0=A0=A0=A0=A0Capabilities:= [e0] Express Endpoint, MSI 00
=A0=A0=A0=A0=A0=A0=A0Capabilities: [100] Advanced Error Reporting
=A0=A0=A0=A0=A0=A0=A0Capabilities: [140] Device Serial Numbe= r 00-15-17-ff-ff-8f-18-a2
=3D=3D=3D=3D=3D=3D> Kernel dri= ver in use: pciback <=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
=A0=A0=A0=A0=A0=A0=A0Kernel modules: e1000e

When I say that they weren't hidden, while I d= idn't check with lspci -v, running xl pci-assignable-list shows that no= thing is available to pass to a DomU. =A0I have to xl pci-assignable-add ev= ery device I want to use regardless of whether or not it is hidden via my G= RUB command line. =A0Additionally, the Radeon driver was bound to the card = I hid via grub, and its HDMI audio device was also bound to snd-hda-intel (= I think) in spite of it also being in the grub command line. =A0

xl itself mentions that it is seizing devices from othe= rs drivers in order to bind them to pciback.=A0



I ended up on kernel 3.8.11 be= cause various other kernels I tried,
including 3.4.9 and something from the 3.7.x line both res= ulted in X
failing to start, but only whe= n booting Xen. =A0After playing kernel shuffle

X failing to start?

Blinking (or solid, I cant recall precisely) underscore-type cursor in= the upper left corner of the screen, and it appears to be at a BIOS-like t= ext-mode resolution. =A0

What= card at that point are you using? Is the radeon
or another? =A0How does it fail?

<= /div>
I tried with the Radeon 6990, and also with a Radeon 5850. =A0I t= ried with and without the Radeon driver, too, it didn't seem to make mu= ch difference :(

If you boot with 'drm.debug=3D= 255 debug loglevel=3D8' on your
command line what does = dmesg (or /var/log/messages) show? Can you attach that
plea= se.

I usually rebooted the system so my = dmesg was out of date by the time i get my hands on it. =A0I could try to S= SH in, which should work as the system responds to Ctrl-Alt-Del by rebootin= g after a few seconds, or grab a historical log.... =A0I'll report back= next week :)


Perhap= s you can also attach the lspci so I can get an idea of what
is what in your box.

The= best I have access to is an lspci -vtQ that I ran a while back:=A0http://pastebin.com/raw.php?i=3D4dGmneYi


<= br>
for a while, I've landed, late last = night, on 3.4.44, and it actually
resolved my MSI problem!

Funny en= ough, every kernel I've tried has been built with the config I
posted too, 3.4.44 included! = =A0If I was just "doing it wrong" with the
3.8.11 kernel, then the solution of "= use 3.4.44 instead" is acceptable for
me, but if I've truly hit = on some kind of kernel bug that bears resolving,
I still have the dpkg images that I built of a= ll the kernels in question
and can collect more data as n= eeded. =A0I'm rebooting a lot right now anyway.
=
;)

Still, I'= m troubled by my inability to hide devices via grub. =A0I just
expected it to work and am flabb= ergasted that it won't... =A0I'll send a copy
of my grub config if you like,= but I don't want to pollute the developers
list with an issue that's probably more app= ropriate for the users list. :)

cat /proc/cmdline and 'xl info'= would help.


Thanks so much for you= r time and help, Konrad! =A0I really, really appreciate
it!

Sure thing.

Cheers,
Andrew
--047d7b111c53e081d804dd554e0e-- --===============5639505168047323032== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5639505168047323032==--