Jump to: navigation, search

Difference between revisions of "Nova/USB device&USB controller"

(Technical verification)
(Technical verification)
Line 17: Line 17:
 
     <controller type='usb' index='2' model='piix3-uhci'/>
 
     <controller type='usb' index='2' model='piix3-uhci'/>
 
     <controller type='usb' index='1' model='ehci'/>
 
     <controller type='usb' index='1' model='ehci'/>
 +
 
     (2)Sample of host usb device pass-through
 
     (2)Sample of host usb device pass-through
 
     <hostdev mode='subsystem' type='usb'>
 
     <hostdev mode='subsystem' type='usb'>
    <source>
+
    <source>
      <vendor id='0x136b'/>
+
    <vendor id='0x136b'/>
      <product id='0x0003'/>
+
    <product id='0x0003'/>
      <address bus='2' device='2'/>
+
    <address bus='2' device='2'/>
    </source>
+
    </source>
    <address type='usb' bus='1' port='1'/>
+
    <address type='usb' bus='1' port='1'/>
 
     </hostdev>
 
     </hostdev>
 +
 
     (3)Sample of emulated usb disk
 
     (3)Sample of emulated usb disk
 
       <disk type='file' device='disk'>
 
       <disk type='file' device='disk'>

Revision as of 10:12, 27 February 2014

USB device and USB controller Features

Background

Currently, nova has already supported pci-passthrough, but still dosen't support usb-passthrough. In fact usb device is a kind of necessary device in some user scenarios in private cloud.

Use case

1. When i transfer money online, i need a usb-key provided by bank for authentication.

2. When i start a erp software, i need a usb-key provided by software provider for authentication.

3. I need a usb data disk for transferring business data.

Technical verification

1. Test case

   Attach different number of usb devices to different type of usb controllers.

2. Xml definition

   (1)Sample of usb controller:
   <controller type='usb' index='2' model='piix3-uhci'/>
   <controller type='usb' index='1' model='ehci'/>
   (2)Sample of host usb device pass-through
   <hostdev mode='subsystem' type='usb'>
     <vendor id='0x136b'/>
     <product id='0x0003'/>
     <address bus='2' device='2'/>
   <address type='usb' bus='1' port='1'/>
   </hostdev>
   (3)Sample of emulated usb disk
     <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <target dev='sdb' bus='usb'/>
      <address type='usb' bus='1' port='1'/>
    </disk>

3. The test results

Proposed solution