<div dir="ltr"><div>Okaaaaay... I am much more confused now. I haven't tracked down the host issue I reported, but....<br></div><div><br>The VM issue appears to be unrelated not to the USB. I removed the USB PCI card, and could reproduce the 'lock up'. Perhaps it is related to the radeon card? If I leave windows to boot for like 10 minutes (an accidental discovery), it will eventually startup. The HDMI audio device reports code 10. The kernel logs are a bit funky too:<br><br>[ 3648.842842] virbr0: port 2(vnet0) entered disabled state<br>[ 3648.844097] device vnet0 left promiscuous mode<br>[ 3648.844120] virbr0: port 2(vnet0) entered disabled state<br>[ 3649.270209] irq 17: nobody cared (try booting with the "irqpoll" option)<br>[ 3649.270212] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 4.0.4-301.fc22.x86_64 #1<br>[ 3649.270213] Hardware name: ASUS All Series/Z87M-PLUS, BIOS 1107 11/04/2014<br>[ 3649.270214]  0000000000000000 b3369ae444567343 ffff88063ed03e18 ffffffff81782644<br>[ 3649.270216]  0000000000000000 ffff880620f0ea8c ffff88063ed03e48 ffffffff810f6e27<br>[ 3649.270217]  ffffffff81cb8140 ffff880620f0ea00 0000000000000000 0000000000000011<br>[ 3649.270219] Call Trace:<br>[ 3649.270220]  <IRQ>  [<ffffffff81782644>] dump_stack+0x45/0x57<br>[ 3649.270228]  [<ffffffff810f6e27>] __report_bad_irq+0x37/0xd0<br>[ 3649.270230]  [<ffffffff810f71c8>] note_interrupt+0x258/0x2a0<br>[ 3649.270232]  [<ffffffff810f4693>] handle_irq_event_percpu+0x133/0x1a0<br>[ 3649.270233]  [<ffffffff810f473b>] handle_irq_event+0x3b/0x60<br>[ 3649.270235]  [<ffffffff810f7759>] handle_fasteoi_irq+0x79/0x120<br>[ 3649.270238]  [<ffffffff81016514>] handle_irq+0x74/0x140<br>[ 3649.270241]  [<ffffffff810bc57a>] ? atomic_notifier_call_chain+0x1a/0x20<br>[ 3649.270243]  [<ffffffff8178ba1f>] do_IRQ+0x4f/0xf0<br>[ 3649.270246]  [<ffffffff8178976d>] common_interrupt+0x6d/0x6d<br>[ 3649.270246]  <EOI>  [<ffffffff81618b7d>] ? cpuidle_enter_state+0x5d/0x170<br>[ 3649.270249]  [<ffffffff81618b6d>] ? cpuidle_enter_state+0x4d/0x170<br>[ 3649.270251]  [<ffffffff81618cc7>] cpuidle_enter+0x17/0x20<br>[ 3649.270253]  [<ffffffff810df3c4>] cpu_startup_entry+0x314/0x430<br>[ 3649.270255]  [<ffffffff8111283c>] ? clockevents_register_device+0xbc/0x130<br>[ 3649.270258]  [<ffffffff8104a9b5>] start_secondary+0x1a5/0x1f0<br>[ 3649.270259] handlers:<br>[ 3649.270267] [<ffffffffa06dbad0>] azx_interrupt [snd_hda_controller]<br>[ 3649.270267] Disabling IRQ #17<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 10:28 AM, Brett Foster <span dir="ltr"><<a href="mailto:fosterb@edgeandvertex.org" target="_blank">fosterb@edgeandvertex.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Howdy,<br><br>I ran a couple more tests and I think I see the problem. It is remarkably similar to what I saw on the reset-affected Radeon cards. If i start windows and shutdown windows properly - usb works great. If I start windows and force stop. It fails. Unlike previous manifestations, this time it fails at the windows boot screen. BUT it gets worse...<br><br></div><div>If the host is restarted (warm reset?), the host will be unable to boot. The log spits out some gibberish related to USB then halts. It's not a kernel panic. It looks like both windows or linux drivers get stuck in a way that leaves the system half alive and half dead. The host responds to CTRL-ALT-DELETE, however it will only partially shutdown before getting stuck again. The host must be physically powered down (i.e. AC removed) before the host will operate properly.<br><br></div><div>I am tempted to look in to the linux xhci driver to see why it doesn't fail gracefully.<br><br></div><div>Thoughts?<span class="HOEnZb"><font color="#888888"><br></font></span></div></div></div><span class="HOEnZb"><font color="#888888"><div><br></div>Brett<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 8:15 AM, francesco dicarlo <span dir="ltr"><<a href="mailto:evilsephiroth@gmail.com" target="_blank">evilsephiroth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Well, I'm intereted in this issue too. Buying an additional pci usb card and don't want to get stuck in the same situation...</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-01 12:35 GMT+01:00 Blank Field <span dir="ltr"><<a href="mailto:ihatethisfield@gmail.com" target="_blank">ihatethisfield@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Reply to the list. Use reply all button.</p>
<p dir="ltr">I have no idea how to sort out your issue:(</p>
<div class="gmail_quote">On Nov 1, 2015 8:56 AM, "Brett Foster" <<a href="mailto:fosterb@edgeandvertex.org" target="_blank">fosterb@edgeandvertex.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Just to follow up -- the comment in the source code is this:<br><br><span>// After Chip Hardware Reset wait until the Controller Not Ready (CNR) flag</span><br><span>// in the USBSTS is '0' before writing any xHC Operational or Runtime registers.</span><span></span><br></div><br></div><div>I assume the card is getting stuck in a CNR state. Maybe it's another one of those improperly implemented reset situations.<br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 31, 2015 at 10:42 PM, Brett Foster <span dir="ltr"><<a href="mailto:fosterb@edgeandvertex.org" target="_blank">fosterb@edgeandvertex.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div>Neat. So I enabled the logging and we get this....<br> <br><div><div><div><div><div><div>XhcCreateUsb3Hc: Capability length 0x20
<br>XhcCreateUsb3Hc: HcSParams1 0x8000820
<br>XhcCreateUsb3Hc: HcSParams2 0x24000011
<br>XhcCreateUsb3Hc: HcCParams 0x14051C7
<br>XhcCreateUsb3Hc: DBOff 0x800
<br>XhcCreateUsb3Hc: RTSOff 0x600
<br>XhcCreateUsb3Hc: UsbLegSupOffset 0x0
<br>XhcCreateUsb3Hc: DebugCapSupOffset 0x50
<br>XhcSetBiosOwnership: called to set BIOS ownership
<br>XhcResetHC!<br>ASSERT /home/jenkins/workspace/edk2/rpmbuild/rpm/BUILD/edk2.git/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c(2032): !((((BOOLEAN)(((XhcReadOpReg ((Xhc), (0x0004))) & ((0x00000800))) == ((0x00000800))))))<br><br></div><div>I feel like this issue is going to be much harder to debug than it is worth. Full log is attached.<br></div><div><br></div></div></div></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 11:42 PM, Blank Field <span dir="ltr"><<a href="mailto:ihatethisfield@gmail.com" target="_blank">ihatethisfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Add isa debug console to your script:<br>
-global isa-debugcon.iobase=0x402 \<br>
-debugcon file:"debug.log"<br>
OVMF will print out verbose debug messages to $(pwd)/debug.log</p>
<div class="gmail_quote"><div><div>On Oct 31, 2015 6:27 AM, "Brett Foster" <<a href="mailto:fosterb@edgeandvertex.org" target="_blank">fosterb@edgeandvertex.org</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div>Hi all,<br><br></div>So I've been fumbling my way through setting up a virtual machine with GPU pass through. I was able to get UEFI + ATI R5 230 to windows 8.1 installer. Great... now I wanted to add a PCI USB 3.0 card to the VM. When I do, the VM locks up at the main OVMF screen that says "TianoCore" and so many bytes of system memory tested.<br><br></div><div>Unlike the GPU I found I couldn't figure out great way to prevent the standard linux drivers from picking up the device before being able to map to vfio-pci. So I unbind the device when booting:<br><br>echo 0000:04:00.0 > /sys/bus/pci/drivers/xhci_hcd/unbind<br></div><div><br>Thoughts?<br><br></div><div>Kernel: 4.0.4-301.fc22.x86_64<br></div><div>Qemu: qemu-2.3.0-3.fc22<br><br></div>The only seemingly relevant messages in the kernel log are:<br>[ 6209.596712] vfio-pci 0000:05:00.1: enabling device (0400 -> 0402)<br>[ 6209.619946] vfio-pci 0000:04:00.0: enabling device (0400 -> 0402)<br><div><br>The card is on its own group:<br>/sys/kernel/iommu_groups/13/devices/0000:04:00.005:00.0 VGA compatible controller [0300]: <br>The GPU is on these groups:<br>/sys/kernel/iommu_groups/14/devices/0000:05:00.0<br>/sys/kernel/iommu_groups/14/devices/0000:05:00.1<br><br>04:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller [1912:0014] (rev 03) (prog-if 30 [XHCI])<br>    Subsystem: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller [1912:0014]<br>    Flags: bus master, fast devsel, latency 0, IRQ 19<br>    Memory at f7200000 (64-bit, non-prefetchable) [size=8K]<br>    Capabilities: <access denied><br>    Kernel driver in use: vfio-pci<br>Advanced Micro Devices, Inc. [AMD/ATI] Caicos PRO [Radeon HD 7450] [1002:677b] (prog-if 00 [VGA controller])<br>    Subsystem: ASUSTeK Computer Inc. Device [1043:3025]<br>    Flags: bus master, fast devsel, latency 0, IRQ 16<br>    Memory at e0000000 (64-bit, prefetchable) [size=256M]<br>    Memory at f7120000 (64-bit, non-prefetchable) [size=128K]<br>    I/O ports at c000 [size=256]<br>    Expansion ROM at f7100000 [disabled] [size=128K]<br>    Capabilities: <access denied><br>    Kernel driver in use: vfio-pci<br>    Kernel modules: radeon<br><br>05:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series] [1002:aa98]<br>    Subsystem: ASUSTeK Computer Inc. Device [1043:aa98]<br>    Flags: bus master, fast devsel, latency 0, IRQ 17<br>    Memory at f7140000 (64-bit, non-prefetchable) [size=16K]<br>    Capabilities: <access denied><br>    Kernel driver in use: vfio-pci<br>    Kernel modules: snd_hda_intel<br><br><br></div></div>
<br></div></div>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div>
<br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>