[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] How to present the vusb device entry in the xenstore






2013/6/18 George Dunlap <george.dunlap@xxxxxxxxxxxxx>
On 06/18/2013 12:20 PM, Bei Guan wrote:
Hi,

Thank you very much for your reply. I will reply inline.

2013/6/18 Ian Campbell <Ian.Campbell@xxxxxxxxxx
<mailto:Ian.Campbell@citrix.com>>


    On Tue, 2013-06-18 at 08:51 +0800, Bei Guan wrote:
     > Hi,
     >
     >
     > I'd like to use the pvusb device in xen-4.3 unstable. However, when I
     > use the command "xenstore-ls /local/domain/domId/device" in my VM,
     > there's no "vusb" device presented.

    Which toolstack are you using?

    Which kind of guest (PV or HVM or PVHVM) is it? Which kernels are you
    using in dom0 and domU?

    I'm not sure which (emulated USB device passthrough or full PV USB) you
    are referring to as "vusb".


I use the xl tools and the guest is FreeBSD (It's PVHVM). I think other
PVHVM DomUs are also the same. The dom0 is linux 2.6.32-5-xen-amd64 or
linux 3.9.1 x86_64 (both the same for me).
I just want to know how to make the USB frontend and backend drivers to
work correctly for a PVHVM DomU.
If the DomU uses the emulated USB devices presented by xen-qemu, the USB
frontend and backend drivers will not work. And, the usb devices for
DomU cannot be seen in the XenStore. Is it right?
It seem that I have never seen the usb device in DomU's XenStore
entries, even for PV and HVM.


I'd like to add a PVUSB front driver for FreeBSD, so I need to make sure
that the PVUSB device is added by DomU's XenBus driver and the PVUSB
backed driver in Dom0 works well.
However, it seems that the PVHVM DomU always uses the USB hardware
emulated by xen-qemu. So my PVUSB front driver cannot probe the PVUSB
device.


    AFAIK for xl in 4.3 only USB passthrough to HVM domains via device model
    emulation of the host controller is supported.

    Support for PVUSB is on the cards for 4.4 I think, although AIUI it is
    somewhat blocked on someone stepping up and taking responsibility for
    the PVUSB driver side of things.

Do you mean that before the Xen 4.4, there are no xen versions
supporting the the PVUSB frontend and backend dirvers?
If I want to use the PVUSB, I need to move on to Xen 4.4?

To use PVUSB you need:
1. A backend dom0 (or other driver domain) with usbback
2. A domU with usbfront
3. A toolstack that can connect them together.

It sounds like you're trying to implement #2 for FreeBSD -- that's great, but not strictly necessary if you're running in PVHVM mode.
Yes, I‘m trying to add a USB front driver and a SCSI device driver for FreeBSD. So, I think the first step is to make the PV USB backend dirver and PV SCSI backend driver to work well. And now, I focus on the USB front driver.

Thanks,
 

Unfortunately the only kernels that satisfy #1 at the moment, as far as we know, are the "classic Xen" kernels being forward-ported by SuSE. You should be able to "lsmod" and grep for "usbback" (or "xen" and see if there's anything with "usb" in it) to check if your kernel supports it or not.

Regarding #3, xend/xm can do it, but xl cannot yet.  (This is planned for 4.4).

I think the "third kind of pass-through" Ian may be talking about is hot-plug.  At the moment, xl does not support USB hot-plug for HVM guests; you have to specify all USB devices in the config file before booting.  (xm will support hot-plug for qemu-traditional I think, but not for qemu-xen, AFAIK.)

 -George



--
Best Regards,
Bei Guan
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.