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

lsusb doesn't work in AppVMs #521

Closed
marmarek opened this Issue Mar 8, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 14 Apr 2012 12:34 UTC
On both 3.0.4. and 3.2.7 I get the following:

[user](root@rflab)# lsusb
unable to initialize libusb: -99

No matter whether there is, or there is no, USB controller assigned to the AppVM...

Interestingly a net or proxy VMs do not exhibit such behaviour...?!

Migrated-From: https://wiki.qubes-os.org/ticket/521

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 14 Apr 2012 13:04 UTC
Ok, this seems to be caused by the lack of ehci_hcd kernel module. When this module is unloaded in the usbvm, it displays the same error.

Now, the interesting part is, that in a normal AppVM (to which I assigned to USB controllers, exactly the same ones as I also assigned to my UsbVM) I get the following (always!):

[   30.560041] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   30.560409] ehci_hcd 0000:00:00.0: device not available (can't reserve [0xf162a000-0xf162a3ff](mem))
[   30.560565] ehci_hcd 0000:00:01.0: device not available (can't reserve [0xf1629000-0xf16293ff](mem))

However, the very same USB controllers, always work fine when I assign them to the UsbVM! (Of course, I made sure to wait for one VM to shutdown correctly, and only then started another one).

What is the difference?

Member

marmarek commented Mar 8, 2015

Comment by joanna on 14 Apr 2012 13:04 UTC
Ok, this seems to be caused by the lack of ehci_hcd kernel module. When this module is unloaded in the usbvm, it displays the same error.

Now, the interesting part is, that in a normal AppVM (to which I assigned to USB controllers, exactly the same ones as I also assigned to my UsbVM) I get the following (always!):

[   30.560041] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   30.560409] ehci_hcd 0000:00:00.0: device not available (can't reserve [0xf162a000-0xf162a3ff](mem))
[   30.560565] ehci_hcd 0000:00:01.0: device not available (can't reserve [0xf1629000-0xf16293ff](mem))

However, the very same USB controllers, always work fine when I assign them to the UsbVM! (Of course, I made sure to wait for one VM to shutdown correctly, and only then started another one).

What is the difference?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 14 Apr 2012 13:05 UTC
Yes, I disabled memory balancing for the AppVM (it gets 800MB).

Member

marmarek commented Mar 8, 2015

Comment by joanna on 14 Apr 2012 13:05 UTC
Yes, I disabled memory balancing for the AppVM (it gets 800MB).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 14 Apr 2012 13:12 UTC
Ok, solved it! The problem was that the AppVM had maxmem > mem -- and for PV domains with devices assined we need to ensure that maxmem = mem!

Member

marmarek commented Mar 8, 2015

Comment by joanna on 14 Apr 2012 13:12 UTC
Ok, solved it! The problem was that the AppVM had maxmem > mem -- and for PV domains with devices assined we need to ensure that maxmem = mem!

@marmarek marmarek closed this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by marmarek on 17 Apr 2012 01:06 UTC
Hmm... USB devices (especially lsusb) works for me in AppVM with:

  • memory: 400 MB
  • maxmem: 2GB
  • as in default: enabled dynamic memory management (aka 'meminfo-writer')
  • 2 usb controllers assigned (1.1 and 2.0)
  • current memory: 530 MB
Member

marmarek commented Mar 8, 2015

Comment by marmarek on 17 Apr 2012 01:06 UTC
Hmm... USB devices (especially lsusb) works for me in AppVM with:

  • memory: 400 MB
  • maxmem: 2GB
  • as in default: enabled dynamic memory management (aka 'meminfo-writer')
  • 2 usb controllers assigned (1.1 and 2.0)
  • current memory: 530 MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment