- 15 10月, 2014 1 次提交
-
-
由 Gonglei 提交于
Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Because usb-storage rely on scsi-disk which is created in usb_msg_realize_storage(), so we should store the SCSIDevice pointer in MSDState struct. Only in this way, we can change the global boot_order_list when we want to change the bootindex during vm rebooting by calling object_property_set_int(Object(SCSIDevice),). Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 23 9月, 2014 4 次提交
-
-
由 Gonglei 提交于
Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gonglei 提交于
In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gonglei 提交于
Add "realize/unrealize" in USBDeviceClass, which has errp as a parameter. So all the implementations now use error_setg instead of error_report for reporting error. Note: this patch still keep "init" in USBDeviceClass, and call kclass->init in usb_device_realize(), avoid breaking git bisect. After realize all usb devices, will be removed. Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gonglei 提交于
When scsi_bus_legacy_add_drive() return NULL, meanwhile err will be not NULL, which will casue memory leak and missing error message. Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 22 9月, 2014 1 次提交
-
-
由 Markus Armbruster 提交于
usb_msd_init() calls qemu_opts_create() with a made-up ID and false fail_if_exists. If the ID already exists, it happily messes up those options, then fails drive_new(), because the BlockDriverState with that ID already exists, too. Reproducer: -drive if=none,id=usb0,format=raw -usbdevice disk:tmp.qcow2 Pass true fail_if_exists to qemu_opts_create(), and if it fails, try the next made-up ID. The reproducer now succeeds, and creates an usb-storage device with ID usb1. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 16 6月, 2014 1 次提交
-
-
由 Markus Armbruster 提交于
"Init" and "uninit" suggest the functions don't allocate / free storage. But they do. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 14 5月, 2014 1 次提交
-
-
由 Juan Quintela 提交于
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: NJuan Quintela <quintela@redhat.com> Acked-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 18 2月, 2014 1 次提交
-
-
由 Pantelis Koukousoulas 提交于
Replace magic constants in device bmAttributes with symbolic ones from Linux kernel ch9.h Signed-off-by: NPantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 06 11月, 2013 1 次提交
-
-
由 Stefan Hajnoczi 提交于
The qdev_free() function name is misleading since all the function does is unlink the device from its parent. The device is not necessarily freed. The device will be freed when its QObject refcount reaches zero. It is usual for the parent (bus) to hold the final reference but there are cases where something else holds a reference so "free" is a misleading name. Call object_unparent(obj) directly instead of having a qdev wrapper function. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 31 8月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
To be passed to qbus_create_inplace(). Use DEVICE() casts instead of direct parent field access. Reviewed-by: NWenchao Xia <xiawenc@linux.vnet.ibm.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 29 7月, 2013 1 次提交
-
-
由 Marcel Apfelbaum 提交于
The category will be used to sort the devices displayed in the command line help. Signed-off-by: NMarcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 7月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline() return an Error**. Prepare qdev initfns for QOM realize error model. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 24 6月, 2013 1 次提交
-
-
由 Gerd Hoffmann 提交于
This patch adds a serial property for all usb devices, which can be used to set the serial number of a usb device (as listed by lsusb -v) to a specific value. Applies to emulated devices only. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 04 5月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
This adds the possibility to create a scsi-bus with a specified name. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 09 4月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 06 4月, 2013 1 次提交
-
-
由 Kevin Wolf 提交于
usb-storage takes care to fetch the USB serial number from -drive options, but it neglected to pass its own 'serial' property to the scsi-disk it creates. With this patch, the 'serial' qdev property and the 'serial' option in -drive behave the same and correctly apply the serial number on both USB and SCSI level. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Acked-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 19 2月, 2013 1 次提交
-
-
由 Gerd Hoffmann 提交于
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 22 1月, 2013 2 次提交
-
-
由 Gerd Hoffmann 提交于
Basically the same as usb-storage, but without automatic scsi device setup. Also features support for up to 16 LUNs. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
This reverts commit a1cbfd55. Test isn't useless. scsi_req_enqueue() may finish the request (will actually happen for requests which don't trigger any I/O such as INQUIRY), then call usb_msd_command_complete() which in turn will set s->req to NULL after unref'ing it. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 17 1月, 2013 1 次提交
-
-
由 Markus Armbruster 提交于
scsi_req_new() never returns null, and scsi_req_enqueue() dereferences the pointer, so checking for null is useless. Spotted by Coverity. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 11 1月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Since 39bffca2 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 19 12月, 2012 4 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 09 11月, 2012 1 次提交
-
-
由 Hans de Goede 提交于
Since with the ehci and xhci controllers a single packet can be larger then maxpacketsize, it is possible for the result of a single packet to be both having transferred some data as well as the transfer to have an error. An example would be an input transfer from a bulk endpoint successfully receiving 1 or more maxpacketsize packets from the device, followed by a packet signalling halt. While already touching all the devices and controllers handle_packet / handle_data / handle_control code, also change the return type of these functions to void, solely storing the status in the packet. To make the code paths for regular versus async packet handling more uniform. This patch unfortunately is somewhat invasive, since makeing the qemu usb core deal with this requires changes everywhere. This patch only prepares the usb core for this, all the hcd / device changes are done in such a way that there are no functional changes. This patch has been tested with uhci and ehci hcds, together with usb-audio, usb-hid and usb-storage devices, as well as with usb-redir redirection with a wide variety of real devices. Note that there is usually no need to directly set packet->actual_length form devices handle_data callback, as that is done by usb_packet_copy() Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 11 9月, 2012 1 次提交
-
-
由 Gerd Hoffmann 提交于
Add usb3 descriptors to usb-storage, so it shows up as superspeed device when connected to xhci. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 07 8月, 2012 2 次提交
-
-
由 Gerd Hoffmann 提交于
Commit 59310659 is incomplete, we'll arrive in the scsi command complete callback in CSW state and must handle that case correctly. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 17 7月, 2012 1 次提交
-
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 20 6月, 2012 1 次提交
-
-
由 Crístian Viana 提交于
QEMU exposes its version to the guest's hardware and in some cases that is wrong (e.g. Windows prints messages about driver updates when you switch the QEMU version). There is a new field now on the struct QEmuMachine, hw_version, which may contain the version that the specific machine should report. If that field is set, then that machine will report that version to the guest. Signed-off-by: NCrístian Viana <vianac@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 07 6月, 2012 4 次提交
-
-
由 Gerd Hoffmann 提交于
With all scsi migration support bits in place the final step is pretty simple ;) Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Repace the running buffer pointer (scsi_buf) with a buffer offset field (scsi_off). The later is alot easier to live-migrate. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Factor out packet completion to a separate function which cares to get the MSDState->packet update right. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
We have the field twice, once in MSDState directly and one in the status word struct. Drop one. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 05 6月, 2012 1 次提交
-
-
由 Luiz Capitulino 提交于
This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their own error messages directly to stderr, no need to pass the Error object 2. The functions opts_parse(), qemu_opts_from_qdict() and qemu_chr_parse_compat() make use of the error information and they can be called from HMP or QMP. In this case, to allow for incremental conversion, we propagate the error up using qerror_report_err(), which keeps the QError semantics Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-By: NLaszlo Ersek <lersek@redhat.com>
-
- 26 4月, 2012 2 次提交
-
-
由 Gerd Hoffmann 提交于
This patch adds a function which creates unique serial numbers for usb devices and puts it into use. Windows guests tend to become unhappy if they find two identical usb devices in the system. Effects range from non-functional devices (with yellow exclamation mark in device manager) to BSODs. Handing out unique serial numbers to devices fixes this. With this patch applied almost all emulated devices get a generated, unique serial number. There are two exceptions: * usb-storage devices will prefer a user-specified serial number and will only get a generated number in case the serial property is unset. * usb-hid devices keep the fixed serial number "42" as it is used to signal "remote wakeup actually works". See commit 7b074a22Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Gerd Hoffmann 提交于
Little fix for usb packet handling on i/o cancelation. The usb packet pointer (s->packet) is cleared at the wrong place: The scsi request cancel handler does it. When a usb packet is canceled the usb-storage emulation canceles the scsi request if present. In most cases there is one, so usually s->packet is cleared as needed even with the code sitting at the wrong place. If there is no scsi request in flight s->packet is not cleared though. The usb-storage emulation will then try to complete an usb packet which is not in flight any more and thereby trigger an assert() in the usb core. Fix this by clearing s->packet at the correct place, which is the usb packet cancel header. Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 10 4月, 2012 1 次提交
-
-
由 Luiz Capitulino 提交于
It currently uses qerror_report(), but next commit will convert the drive_del command to the QAPI and this requires using error_set(). One particularity of qerror_report() is that it knows when it's running on monitor context or command-line context and prints the error message accordingly. error_set() doesn't do this, so we have to be careful not to drop error messages. qdev_unplug() has three kinds of usages: 1. It's called when hot adding a device fails, to undo anything that has been done before hitting the error 2. It's called by function monitor functions like device_del(), to unplug a device 3. It's used by xen_platform.c in a way that doesn't _seem_ to be in monitor context Only item 2 can print an error message to the user, this commit maintains that. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-