Statistics
| Branch: | Revision:

root / hw / usb-msd.c @ 93148aa5

History | View | Annotate | Download (18 kB)

# Date Author Comment
3741715c 02/27/2012 04:40 pm Jan Kiszka

usb: Resolve warnings about unassigned bus on usb device creation

When creating an USB device the old way, there is no way to specify the
target bus. Thus the warning issued by usb_create makes no sense and
rather confuses our users.

Resolve this by passing a bus reference to the usbdevice_init handler...

01e95455 02/22/2012 02:29 pm Paolo Bonzini

scsi: pass residual amount to command_complete

With the upcoming sglist support, HBAs will not see any transfer_data
call and will not have a way to detect short transfers. So pass the
residual amount of data upon command completion.

Signed-off-by: Paolo Bonzini <>

7718564b 02/16/2012 01:25 am Anthony Liguori

Merge remote-tracking branch 'kraxel/usb.38' into staging

  • kraxel/usb.38: (28 commits)
    xhci: handle USB_RET_NAK
    xhci: remote wakeup support
    xhci: kill port arg from xhci_setup_packet
    xhci: stop on errors
    xhci: add trb type name lookup support....
83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

7f74a56b 02/10/2012 12:31 pm Gerd Hoffmann

usb: kill handle_packet callback

All drivers except usb-hub use usb_generic_handle_packet. The only
reason the usb hub has its own function is that it used to be called
with packets which are intended for downstream devices. With the new,
separate device lookup step this doesn't happen any more, so the need...

079d0b7f 02/10/2012 12:31 pm Gerd Hoffmann

usb: Set USBEndpoint in usb_packet_setup().

With the separation of the device lookup (via usb_find_device) and
packet processing we can lookup device and endpoint before setting up
the usb packet. So we can initialize USBPacket->ep early and keep it
valid for the whole lifecycle of the USBPacket. Also the devaddr and...

39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

ba02430f 02/03/2012 06:41 pm Anthony Liguori

usb: separate out legacy usb registration from type registration

Type registeration is going to get turned into a QOM call so decouple the
legacy support.

Signed-off-by: Anthony Liguori <>

62aed765 01/27/2012 06:50 pm Anthony Liguori

usb: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

1de14d43 01/13/2012 11:25 am Gerd Hoffmann

usb: track altsetting in USBDevice

Also handle {GET,SET}_INTERFACE in common code (usb-desc.c).

Signed-off-by: Gerd Hoffmann <>

a2e4d53e 01/06/2012 08:51 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    qemu-nbd: drop loop which can never loop
    Make python mandatory
    net/socket.c: Fix fd leak in net_socket_listen_init() error paths
    gdbstub: Fix fd leak in gdbserver_open() error path...
6a84cb1f 01/06/2012 05:07 pm Markus Armbruster

scsi virtio-blk usb-msd: Clean up device init error messages

Replace

error_report("DEVICE-NAME: MESSAGE");

by just

error_report("MESSAGE");

in block device init functions.

DEVICE-NAME is bogus in some cases: it's "scsi-disk" for device
scsi-hd and scsi-cd, "virtio-blk-pci" for virtio-blk-s390, and...

24a5bbe1 01/06/2012 01:36 pm Gerd Hoffmann

usb-storage: cancel I/O on reset

When resetting the usb-storage device we'll have to carefully cancel
and clear any requests which might be in flight, otherwise we'll confuse
the state machine.

Signed-off-by: Gerd Hoffmann <>

ce4e7e46 11/22/2011 11:33 am Paolo Bonzini

usb-msd: do not register twice in the boot order

USB mass storage devices are registered twice in the boot order.
To avoid having to keep the two paths in sync, pass the bootindex
property down to the scsi-disk device and let it register itself.

Signed-off-by: Paolo Bonzini <>...

59310659 11/21/2011 04:32 pm Gerd Hoffmann

usb-storage: don't try to send the status early.

Until recently all scsi commands sent to scsi-disk did either transfer
data or finished instantly. The correct implementation of
SYNCRONIZE_CACHE changed the picture though, and usb-storage needs
a fix to handle that case correctly.

414c4604 11/21/2011 03:08 pm Gerd Hoffmann

usb-storage: drop result from device state.

Signed-off-by: Gerd Hoffmann <>

92a114f6 11/21/2011 03:08 pm Gerd Hoffmann

usb-storage: fill status in complete callback.

Put status word into device state, fill it in command_complete, have
usb_msd_send_status just send it out.

Signed-off-by: Gerd Hoffmann <>

7b863f41 11/21/2011 03:08 pm Gerd Hoffmann

usb-storage: drop tag from device state.

scsi keeps track of the tag in SCSIRequest,
no need to store a separate copy.

Signed-off-by: Gerd Hoffmann <>

e04da7c3 11/21/2011 03:07 pm Gerd Hoffmann

usb-storage: move status debug message to usb_msd_send_status.

usb_msd_send_status can be called from different code paths, move the
debug message into the function to make sure it is printed
unconditionally.

Signed-off-by: Gerd Hoffmann <>

db80358a 11/01/2011 05:38 pm Roy Tam

usb: change VID/PID for usb-hub and usb-msd to prevent conflict

Some USB drivers, for example USBASPI.SYS, will skip different type of
device which has same VID/PID. The following patch helps preventing
usb-msd being skipped by the driver.

Signed-off-by: Roy Tam <>...

afd4030c 10/28/2011 08:25 pm Paolo Bonzini

scsi: move tcq/ndev to SCSIBusOps (now SCSIBusInfo)

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

7e0380b9 10/28/2011 08:25 pm Paolo Bonzini

scsi: allow arbitrary LUNs

This only requires changes in two places: in SCSIBus, we need to look
for a free LUN if somebody creates a device with a pre-existing scsi-id
but the default LUN (-1, meaning "search for a free spot"); in vSCSI,
we need to actually parse the LUN according to the SCSI spec....

d3ac1a87 10/13/2011 01:58 pm Gerd Hoffmann

usb-storage: fix NULL pointer dereference.

When a usb packet is canceled we need to check whenever we actually have
a scsi request in flight before we try to cancel it.

Signed-off-by: Gerd Hoffmann <>

fa879d62 09/06/2011 12:23 pm Markus Armbruster

block: Attach non-qdev devices as well

For now, this just protects against programming errors like having the
same drive back multiple non-qdev devices, or untimely bdrv_delete().
Later commits will add other interesting uses.

While there, rename BlockDriverState member peer to dev, bdrv_attach()...

c39ce112 08/12/2011 04:27 pm Paolo Bonzini

scsi: pass cdb already to scsi_req_new

Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.
Passing it to scsi_req_new will let scsi_req_new dispatch common requests
through different reqops.

Moving the memcpy to scsi_req_new is a hack that will go away as...

29c74f76 08/04/2011 04:51 pm Gerd Hoffmann

usb-storage: iovec support

Add full iovec support to usb-storage.

Signed-off-by: Gerd Hoffmann <>

4f4321c1 08/04/2011 04:51 pm Gerd Hoffmann

usb: use iovecs in USBPacket

Zap data pointer from USBPacket, add a QEMUIOVector instead.
Add a bunch of helper functions to manage USBPacket data.
Switch over users to the new interface.

Note that USBPacket->len was used for two purposes: First to
pass in the buffer size and second to return the number of...

e3745602 07/29/2011 05:39 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/migration.2' into staging

8e31bf38 07/23/2011 07:26 pm Matthew Fernandez

Correct spelling of licensed

Correct typos of "licenced" to "licensed".

Reviewed-by: Stefan Weil <>
Reviewed-by: Andreas F=E4rber <>
Signed-off-by: Matthew Fernandez <>
Signed-off-by: Anthony Liguori <>

f54b6563 07/20/2011 03:49 pm Gerd Hoffmann

usb storage: first migration support bits.

Tag vmstate as unmigratable for the time being,
to be removed when mgration support is finished.

Signed-off-by: Gerd Hoffmann <>

c5bf71a9 07/19/2011 04:38 pm Hannes Reinecke

scsi: Add 'hba_private' to SCSIRequest

'tag' is just an abstraction to identify the command
from the driver. So we should make that explicit by
replacing 'tag' with a driver-defined pointer 'hba_private'.
This saves the lookup for driver handling several commands...

c3a90cb1 06/23/2011 06:09 pm Markus Armbruster

usb-storage: Turn drive serial into a qdev property usb-storage.serial

It needs to be a qdev property, because it belongs to the drive's
guest part. Precedence: commit a0fef654 and 6ced55a5.

Bonus: info qtree now shows the serial number.

Signed-off-by: Markus Armbruster <>...

fa19bf83 06/23/2011 12:28 pm Hans de Goede

usb: Proper error propagation for usb_device_attach errors

Signed-off-by: Gerd Hoffmann <>

ed7ec840 05/31/2011 04:20 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/scsi.2' into staging

Conflicts:
hw/usb-msd.c

c6df7102 05/26/2011 01:14 pm Paolo Bonzini

scsi: split command_complete callback in two

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

aba1f023 05/26/2011 01:14 pm Paolo Bonzini

scsi: rename arguments to the new callbacks

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

fc4f0754 05/26/2011 01:14 pm Paolo Bonzini

scsi: do not call send_command directly

Move the common part of scsi-disk.c and scsi-generic.c to the SCSI layer.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

43a2b339 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_new

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

ad3376cc 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_continue

Signed-off-by: Paolo Bonzini <>
Cc: Christoph Hellwig <>

0c34459b 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_get_buf

... and remove some SCSIDevice variables or fields that now become unused.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

5c6c0e51 05/26/2011 01:14 pm Hannes Reinecke

scsi: Use 'SCSIRequest' directly

Currently the SCSIRequest structure is abstracted away and cannot accessed
directly from the driver. This requires the handler to do a lookup on
an abstract 'tag' which identifies the SCSIRequest structure.

With this patch the SCSIRequest structure is exposed to the driver. This...

94d3f98a 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce scsi_req_cancel

This is for when the request must be dropped in the void,
but still memory should be freed. To this end, the devices
register a second callback in SCSIBusOps.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>

cfdc1bb0 05/26/2011 01:14 pm Paolo Bonzini

scsi: introduce SCSIBusOps

There are more operations than a SCSI bus can handle, besides completing
commands. One example, which this series will introduce, is cleaning up
after a request is cancelled.

More long term, a "SCSI bus" can represent the LUNs attached to a...

eb5e680a 05/26/2011 12:55 pm Gerd Hoffmann

usb: move cancel callback to USBDeviceInfo

Remove the cancel callback from the USBPacket struct, move it over
to USBDeviceInfo. Zap usb_defer_packet() which is obsolete now.

Signed-off-by: Gerd Hoffmann <>

add75088 05/26/2011 12:55 pm Brad Hards

usb: update config descriptors to identify number of interfaces

Previously we relied on the .bNumInterfaces, but that won't always be
accurate after the introduction of grouped interfaces.

Signed-off-by: Brad Hards <>
Signed-off-by: Gerd Hoffmann <>

007fd62f 05/26/2011 12:55 pm Hans de Goede

usb: Pass the packet to the device's handle_control callback

This allows using the generic usb_generic_handle_packet function from
device code which does ASYNC control requests (such as the linux host
pass through code).

Signed-off-by: Hans de Goede <>

ebd669a1 05/26/2011 12:55 pm Gerd Hoffmann

usb-storage: don't call usb_packet_complete twice

usb_msd_copy_data() may cause a recursive call to
usb_msd_command_complete() which in turn may complete
the packet, setting s->packet to NULL in case it does.
Recheck s->packet before calling usb_packet_complete()...

ef0bdf77 05/04/2011 05:55 pm Gerd Hoffmann

usb: mass storage fix

Initialize scsi_len with zero when starting a new request, so any
stuff leftover from the previous request is cleared out. This may
happen in case the data returned by the scsi command doesn't fit
into the buffer provided by the guest....

13a9a0d3 05/04/2011 03:11 pm Gerd Hoffmann

usb: move complete callback to port ops

94843f66 04/16/2011 02:24 pm Brad Hards

usb: trivial spelling fixes

Signed-off-by: Brad Hards <>
Signed-off-by: Stefan Hajnoczi <>

cf8ce30d 02/02/2011 12:50 am Gleb Natapov

Add bootindex handling into usb storage device.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Gleb Natapov <>
Signed-off-by: Anthony Liguori <>

319ae529 01/31/2011 12:59 pm Markus Armbruster

blockdev: Fix drive_add for drives without media

Watch this:

(qemu) drive_add 0 if=none
(qemu) info block
none0: type=hd removable=0 [not inserted]
(qemu) drive_del none0
Segmentation fault (core dumped)

add_init_drive() is confused about drive_init()'s failure modes, and...

2d1fd261 01/24/2011 10:39 pm Stefan Hajnoczi

scsi: Allow scsi_bus_legacy_add_drive() to set removable bit

scsi-disk devices may wish to override the removable bit. Add support
for a qdev property on SCSI devices. This is will be used by usb-msd.

Signed-off-by: Stefan Hajnoczi <>...

6bb7b867 01/24/2011 10:39 pm Stefan Hajnoczi

usb-msd: Propagate removable bit to SCSI device

USB Mass Storage Devices sometimes have the RMB (removable) bit set in
the SCSI INQUIRY response. Thumbdrives tend to have the bit set whereas
hard disks do not.

Operating systems differentiate between removable devices and fixed...

ca0c730d 01/11/2011 06:15 pm Gerd Hoffmann

usb storage: high speed support

Add high speed support to the usb mass storage device. With this patch
applied the linux kernel recognises the usb storage device as highspeed
capable device and suggests to connect it to a highspeed port instead of
the uhci. Tested with both uhci and (not-yet submitted) ehci....

ab4797ad 01/11/2011 06:15 pm Gerd Hoffmann

usb storage: fix status reporting

Change usb_msd_send_status() to take a pointer to the status packet
instead of writing the status to s->usb_buf which might not point
to the correct location.

Signed-off-by: Gerd Hoffmann <>

fa7935c1 01/11/2011 06:15 pm Gerd Hoffmann

usb storage: handle long responses

The scsi layer may return us more data than the guests wants to have.
Handle this by just ignoring the extra bytes and calling the {read,write}_data callback to finish the request.

Seen happening in real life with some extended inquiry command....

41c6abbd 01/11/2011 04:56 pm Gerd Hoffmann

usb: move USB_REQ_SET_ADDRESS handling to common code

USB_REQ_SET_ADDRESS handling is identical in all emulated devices.
Move it to common code.

Signed-off-by: Gerd Hoffmann <>

a980a065 01/11/2011 04:56 pm Gerd Hoffmann

usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code

This patch adds fields to the USBDevice struct for the current
speed (hard-wired to full speed for now) and current device
configuration. Also a init function is added which inializes
these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION...

ed5a83dd 01/11/2011 04:56 pm Gerd Hoffmann

usb: move remote wakeup handling to common code

This patch moves setting and clearing the remote_wakeup feature
bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also
USB_REQ_GET_STATUS handling is moved to common code.

Signed-off-by: Gerd Hoffmann <>

81bfd2f2 01/11/2011 04:56 pm Gerd Hoffmann

usb storage: use new descriptor infrastructure.

Switch the usb storage driver over to the
new descriptor infrastructure.

Signed-off-by: Gerd Hoffmann <>

4a1e1bc4 01/11/2011 04:56 pm Gerd Hoffmann

usb storage: serial number support

If a serial number is present for the drive fill it into the usb
serialnumber string descriptor.

Signed-off-by: Gerd Hoffmann <>

2446333c 08/24/2010 06:22 pm Blue Swirl

Rearrange block headers

Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.

Signed-off-by: Blue Swirl <>

3329f07b 08/23/2010 01:11 am Gerd Hoffmann

QemuOpts: make most qemu_*_opts static

Switch tree to lookup-by-name using qemu_find_opts().
Also hook up virtfs options so qemu_find_opts works for them too.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

f8b6cc00 07/02/2010 02:18 pm Markus Armbruster

qdev: Decouple qdev_prop_drive from DriveInfo

Make the property point to BlockDriverState, cutting out the DriveInfo
middleman. This prepares the ground for block devices that don't have
a DriveInfo.

Currently all user-defined ones have a DriveInfo, because the only way...

18846dee 07/02/2010 02:18 pm Markus Armbruster

block: Catch attempt to attach multiple devices to a blockdev

For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo
happily creates two SCSI disks connected to the same block device.
It's all downhill from there.

Device usb-storage deliberately attaches twice to the same blockdev,...

fa66b909 07/02/2010 02:18 pm Markus Armbruster

scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers

None of its callers checks for failure. scsi_hot_add() can crash
because of that:

(qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1
scsi-generic: scsi generic interface too old
Segmentation fault (core dumped)...

14bafc54 07/02/2010 02:18 pm Markus Armbruster

blockdev: Clean up automatic drive deletion

We automatically delete blockdev host parts on unplug of the guest
device. Too much magic, but we can't change that now.

The delete happens early in the guest device teardown, before the
connection to the host part is severed. Thus, the guest part's...

666daa68 06/04/2010 04:20 pm Markus Armbruster

blockdev: Collect block device code in new blockdev.c

Anything that moves hundreds of lines out of vl.c can't be all bad.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

a803cb8e 06/04/2010 12:43 pm Markus Armbruster

blockdev: Hide QEMUMachine from drive_init()

To pave the way for moving it out of vl.c.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

f3571b1a 03/31/2010 07:16 pm Max Reitz

usb: class specific interface requests

Mass Storage Reset and Get Max LUN are class specific requests, but
they were not marked as such in hw/usb-msd.c, moved therefore
ClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.c
to hw/usb.h.
Furthermore there was a problem in hw/usb-ohci.c when using DEBUG...

e5322f76 03/17/2010 06:17 pm Arnaud Patard (Rtp)

hw/usb-msd: fix some usb requests

The usb-msd device emulation needs some small tweaks in the requests
emulations. For instance, the reset/maxlun requests are class/interface
specific so requests for them with the type class and recipient interface
bits sets have to be handled....

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

a4426488 03/16/2010 05:55 pm Markus Armbruster

block: Simplify usb_msd_initfn() test for "can read bdrv key"

The old test assumes that "hotplugged" implies "we have a current
monitor for reading the key". This is in fact true, but it's not
obviously true.

Aside: if it were false, we could pass a null pointer to...

d44168ff 02/25/2010 03:29 pm Paul Brook

Fix -usbdevice crash

If -usbdevice is used on a machine with no USB busses, usb_create
will fail and return NULL. Patch below handles this failure gracefully
rather than crashing when we try to init the device.

Signed-off-by: Paul Brook <>

428c149b 02/11/2010 12:53 am Christoph Hellwig

block: add topology qdev properties

Add three new qdev properties to export block topology information to
the guest. This is needed to get optimal I/O alignment for RAID arrays
or SSDs.

The options are:

- physical_block_size to specify the physical block size of the device,...
06384698 12/12/2009 03:59 pm Markus Armbruster

qdev: Separate USB product description from qdev name

Using the qdev name for the product description makes for inconvenient
qdev names.

Put the product description in new USBDeviceInfo member product_desc.
Make usb_qdev_init() use it. No user or guest visible change, since...

556cd098 12/12/2009 03:59 pm Markus Armbruster

qdev: Replace device names containing whitespace

Device names with whitespace require quoting in the shell and in the
monitor. Some of the offenders are also overly long. Some have a
more convenient alias, some don't.

The place for verbose device names is DeviceInfo member desc. The...

43b443b6 11/09/2009 04:43 pm Gerd Hoffmann

scsi: move scsi-disk.h -> scsi.h

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

b3e461d3 10/30/2009 03:39 pm Gerd Hoffmann

usb-storage: use qdev for -usbdevice

Hook up usb_msd_init.

Also rework handling of encrypted block devices,
move the code out vl.c.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

33e66b86 10/07/2009 04:54 pm Markus Armbruster

Check return value of qdev_init()

But do so only where it may actually fail. Leave the rest for the
next commit.

Patchworks-ID: 35167
Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

cb23117b 10/05/2009 05:32 pm Gerd Hoffmann

scsi: hotplug windup

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

56a14938 10/05/2009 05:32 pm Gerd Hoffmann

drive cleanup fixes.

Changes: * drive_uninit() wants a DriveInfo now. * drive_uninit() also calls bdrv_delete(),
so callers don't need to do that. * drive_uninit() calls are moved over to the ->exit()
callbacks, destroy_bdrvs() is zapped. * setting bdrv->private is not needed any more as the...

a8e662b5 10/05/2009 05:32 pm Gerd Hoffmann

usb: hook unplug into qdev, cleanups + fixes.

Hook into DeviceInfo->exit().

handle_destroy() must not free the state struct, this is handled
by the new usb_qdev_exit() function now.

qdev_free(usb_device) works now.

Fix usb hub to qdev_free() all connected devices on unplug....

ca9c39fa 10/05/2009 05:32 pm Gerd Hoffmann

switch scsi bus to inplace allocation.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

d52affa7 09/09/2009 10:57 pm Gerd Hoffmann

qdev/scsi: add scsi bus support to qdev, convert drivers.

  • Add SCSIBus. * Add SCSIDeviceInfo, move device callbacks here. * add qdev/scsi helper functions. * convert drivers.

Adding scsi disks via -device works now, i.e. you can do:

-drive id=sda,if=none,......
7fc2f2c0 09/09/2009 10:57 pm Gerd Hoffmann

qdev/scsi+usb: convert usb-storage to qdev.

Full coverage with properties and everything. You can add virtual usb
sticks this way now:

-drive if=none,id=pendrive,path=/some/where
-device usb-storage,drive=pendrive

-usbdevice disk:/path/to/image continues to work....

806b6024 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add usb bus support to qdev, convert drivers.

  • Add USBBus. * Add USBDeviceInfo, move device callbacks here. * Add usb-qdev helper functions. * Switch drivers to qdev.

TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch....

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

bb5fc20f 03/06/2009 01:01 am aliguori

monitor: Rework modal password input (Jan Kiszka)

Currently, waiting for the user to type in some password blocks the
whole VM because monitor_readline starts its own I/O loop. And this loop
also screws up reading passwords from virtual console.

Patch below fixes the shortcomings by using normal I/O processing also...

c0f4ce77 03/06/2009 01:01 am aliguori

monitor: Rework early disk password inquiry (Jan Kiszka)

Reading the passwords for encrypted hard disks during early startup is
broken (I guess for quiet a while now):
- No monitor terminal is ready for input at this point
- Forcing all mux'ed terminals into monitor mode can confuse other...

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

334c0241 08/22/2008 01:24 am aurel32

Add image format option for USB mass-storage devices

(fix CVE-2008-1945)

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5059 c046a42c-6fe2-441c-8c8c-71466251a162

8ccc2ace 12/10/2007 04:58 am ths

SCSI cleanup, by Laurent Vivier.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3797 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

3b46e624 09/17/2007 11:09 am ths

find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

2bac6019 04/30/2007 04:34 am balrog

Remove repeated code and enable encrypted SD cards and USB sticks images.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2750 c046a42c-6fe2-441c-8c8c-71466251a162

e126cf13 03/31/2007 09:23 pm ths

Fix usb hid and mass-storage protocol revision, by Juergen Keil.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2558 c046a42c-6fe2-441c-8c8c-71466251a162

a917d384 08/29/2006 07:52 am pbrook

SCSI TCQ support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2139 c046a42c-6fe2-441c-8c8c-71466251a162