-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail to assign pci device at start of usbvm #1544
Comments
What's that about the RMRR? |
Appears to be some new shit: |
Not even using autostart at boot?
We have a way to set rdm_policy=relaxed, bundled with |
Yes, the VM had autostart at boot and the systemd service had failed for this reason. How do I determine which devices share the RMRR? I couldn't find anything in my logs. |
Holy shit, setting |
I don't know, but guess it is the other USB controller (or USB2.0/USB3.0). If you assign both/all of them to the same VM, you'll see the same address in xen log (assuming you set |
Wait, spoke too soon. The VM never ran qrexec-daemon. |
It now says in the hypervisor log "It's risky to assign blah blah". |
libxl log:
|
Did it crashed just after startup (state "c" on |
Yes. It's state crashed. I just checked. Assigning all USB devices to the same VM worked to fix the problem. This sucks. Now I don't have my mouse. |
Note that assigning all USB PCI devices did NOT help start the VM. Even with pci_strictreset set to false. It just killed my mouse. |
I will try rebooting now. BRB. |
The VM crash at startup is generally a problem with starting VM with PCI devices after some system uptime, memory is much fragmented then. It is independent of previous problem (which is solved with pci_strictreset). |
Alright, excellent. My USB VM has now received the assignment of the two USB PCI devices I intended to isolate (the Bluetooth and camera devices). I still keep the ability to use my mouse. This is GREAT. Thanks for the Improvement: it really should be somehow autodetected whether it is necessary or not. |
It is set for USB VM by salt formula by default. |
Yes, that's true, but it would not be the default for a manually created USB VM, which was my case, and I bet the case in many cases. A smart default lower in the stack would reduce the support load. |
The proper solution would be to have PCI group assignment supported by Xen. This way it would detect whether it is really risky to assign particular devices to the VM. |
Agreed. |
Summary:
|
Quick update: I assigned two of my USB PCI devices (out of three) to a USB VM. That caused hangs and reboots to happen around once each day. They stopped happening as soon as I decided never to power on that VM again. I still have yet to try adding all three USB PCI devices to the USB VM (doing so would disable all USB ports on this machine) We'll see if that causes hangs. |
The |
I found my problem. It was a mouse whose receiver stopped working properly, and started causing lockups and hard reboots whenever it was plugged, irrespective of which VMs it was assigned to. The mouse is now in the trash. PCI strict reset did work for starting the VM though. |
There is a strange issue related to some Logitech receivers: #1689 . I can confirm it indeed happens, but no idea why. I'd rather blame some kernel driver, not the device itself. |
I am getting this error too, with pci_strictreset set to false, on a clean install of R3.2 on a Lenovo Yoga 12 which previously had R3.1 working with a usbvm. Disabling USB3 in the bios seemed to work, upgrading the BIOS as mentioned in this thread https://groups.google.com/forum/#!msg/qubes-users/Z6bEMZTjiz4/FbV6T-l_AQAJ did not seem to make a difference. |
The Logitech device issue is no longer a problem in modern kernels. |
I'm seeing this with no external USB devices connected. |
Probably well known memory fragmentation issue - PV VM with PCI device needs few megs of physically continuous memory for DMA purpose. You can free some by getting it away from dom0: |
Let me try. But if this works, this really should be documented somewhere! |
Nope, it did not work at all. |
Ok, lets try harder: |
On 10/28/2016 10:40 PM, Marek Marczykowski-Górecki wrote:
A reboot fixed it.
|
Same experience. I needed to to Maybe some file to review to determine memory fragmentation, and where the VM memory is getting allocated, for next time? Or some way to determine what made the VM crash? |
This bug report has seen no activity in a very long time, and it is not assigned to any current release milestone. It looks like it was left open by mistake, so I'm closing it now. However, if anyone is still affected by this bug on a currently-supported release, please leave a comment, and we'll be happy to reopen this. Thank you. |
R4.0 kernel-latest=5.17.7 current-testing: Just ran into the "failed to get contiguous memory for dma from xen" in sys-net-dm after shutting down all networking VMs and trying to start them again. Several retries failed. I saved all my work, shut down everything but dom0 and sys-net started w/o issue. Pretty sure this happened one other time recently as well, can't prove it though. Next time it happens I'll try the xl mem-set 0 (smaller size) approach. B |
I'm no longer using Qubes, but it looks like a workable next step here would be to take the effort to find what device file (and possibly kernel parameters) display the physical memory mapping of the system. Then this can be reviewed on next occurrence to verify that the instance is memory fragmentation, see if shrinking dom0 resolves it, and possibly discern a minimum contiguous block needed by the device. It's likely possible to remap memory to resolve this confidently, but might need implementation by a dev. |
Just a reminder that, for bug reports, the milestone designates the earliest supported release in which the bug is known to exist, not when we plan to fix it. |
This is from 2015 and I have not been able to repro this since. |
Closing as "cannot reproduce" (we were unable to reproduce this issue). If anyone believes this is a mistake, or if anyone can reproduce the issue, please leave a comment, and we'll be happy to reopen this. Thank you. |
I'm experiencing a weird error starting a usbvm:
Restarting libvirtd only aggravates the issue:
Weird errors in libxl log:
The hypervisor log says:
The text was updated successfully, but these errors were encountered: