[vbox-dev] VDRE USB

Martin Cerveny martin at c-home.cz
Mon May 13 19:46:54 GMT 2013


Hello.

I am trying to use VDRE USB API.
I registered USB (VRDECallbackIntercept(...,VRDE_CLIENT_INTERCEPT_USB,...) 
and implement VRDEUSBRequest() in poll mode.
I have many questions.

1) VRDEUSBRequest() is sometimes called for one client more than once at same time (from other thread with VRDE_USB_REQ_DEVICE_LIST).
    I must implement critical sections in function.
    Is it ok ?
    Can all VDRE functions be called from more than one thread ?

2) VDRE.h: Why is the name of type "VRDEUSBREQNEGOTIATEPARM" and not "VRDE_USB_REQ_NEGOTIATE_PARM" (as other PARM/RET types) ?

3) VDRE.h: What is "uint16_t idPort" in type "VRDEUSBDEVICEDESC" ?
    Port is non-unique identifier (for example 2 devices on port 1 on 2 different usb hubs).

4) VDRE.h: VRDE_USB_CAPS_FLAG_POLL
    Is it tested when I will send reap_urb totaly asynchronously without polling (eg. without VRDE_USB_CAPS_FLAG_POLL flag and VRDE_USB_REQ_REAP_URB requests) ?

5) BIOS in host does not support keyboard on USB. Is there any option to enable USB keyboard emulation in BIOS and use it before guest kernel boot (for example Grub/LiLo/F8-windows) ?

6) VDRE.h: How to encode "bcdUSB" and "bcdRev" in type VRDEUSBDEVICEDESC ?
    For example: If usb keyboard device descriptors "bcdUSB" is "0x0110" (eg. USB 1.10) the "bcdUSB" in type VRDEUSBDEVICEDESC should be also "0x0110" or "0x010a" or "0x006e" ?
    Does "bcdRev" equal to USB descriptor "bcdDevice" ?

7) VDRE.h: type VRDE_USB_REQ_QUEUE_URB_PARM:
    What is VRDE_USB_DIRECTION_SETUP type of direction ?
    (ctrl/setup messages is called VRDE_USB_DIRECTION_IN + VRDE_USB_TRANSFER_TYPE_MSG)

    What is VRDE_USB_TRANSFER_TYPE_CTRL type?
    (ctrl messages are called with VRDE_USB_TRANSFER_TYPE_MSG)

8) How is USB2.0 relevant over VDRE ?
    What happens if I connect USB2.0 device on remote USB2.0 controller and the VBox host/guest is without "USB2.0 additions" (eg. not EHCI in VBox) ?
    Is it possible to use "USB2.0 additions" and own VDRE ( "VBoxManage setproperty vrdeextpack OtherVDREpack" ) ?

9) Will be isochronous transfers implemented ?

10) If VDRE fails to receive packet VBox recovery usually goes to assert or crash.

11) What is USBProxyDevice-linux.cpp/usbProxyLinuxUrbSwapSetup() (x86 is LE) ?

Thank you for your answers, M.C>




More information about the vbox-dev mailing list