- 09 8月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Leaving the aiocb to a non-NULL value leads to an assertion failure when rerror/werror are set to stop or enospc, and the operation is retried. scsi-disk checks that the aiocb member is NULL before filling it. This patch correctly resets the aiocb to NULL values everywhere, and adds the dual assertion that the aiocb was non-NULL before calling bdrv_acct_done. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 03 8月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
Reported-by: NGerhard Wiesinger <lists@wiesinger.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Ronnie Sahlberg 提交于
The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be placed in the power condition defined in Table 558. If this field has a value other than 0h then the Start and LoEj bits shall be ignored. Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 27 7月, 2012 4 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Linux will not use these, but a very similar mechanism will be used to report the condition via virtio-scsi events. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
When a device is resized, we will report a unit attention condition for CAPACITY DATA HAS CHANGED. However, we should ensure that this condition does not override a more important unit attention condition. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Support for the LOEJ bit of the START/STOP UNIT command right now is limited to CD-ROMs. This is wrong, since removable hard disks (in the real world: SD card readers) also support it in pretty much the same way. Without the LOEJ bit, START/STOP UNIT does nothing for all devices. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 7月, 2012 14 次提交
-
-
由 Ronnie Sahlberg 提交于
Add sense code for DATA_PROTECT/WRITE_PROTECTED and return this error for any WRITE*/WRITE_VERIFY* calls if the device is readonly=on, i.e. write-protected Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Ronnie Sahlberg 提交于
Improve the tests for the LBA to cover more cases. For the 16 byte opcodes, the lba is a uint64, so we need to check is to make sure that we do not wrap. For example if an opcode would specify the LBA:0xffffffffffffffff and LEN:2 then lba+len would wrap to 1. Also verify that ALL requested blocks are available, not just the first one. Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Ronnie Sahlberg 提交于
The QEMU SCSI emulation does not support protection information, so any READ/WRITE/VERIFY commands that has the protect bits set to non-zero should fail with ILLEGAL_REQUEST/INVALID_FIELD_IN_CDB From SCSI SBC : If the logical unit does not support protection information, then the device server should terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB. Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> [ Rebase after scsi_dma_reqops introduction - Paolo ] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Finally, this uses the "plumbing" in the previous patch to add support for toggling the WCE bit of the caching mode page. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This adds the bulk of the parsing code for MODE SELECT, including breaking out changes to different mode pages, and checking that only changeable values are modified. In order to report errors correctly two passes are made through the parameters; the first only looks for errors, the second actually applies the changes to the mode page. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The changeable values were not all-zeros for this mode page, fix it. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This will make offsets the same when implementing MODE SELECT. This is because MODE SELECT has to deal with both 2-byte and 4-byte headers. Unfortunately, this means that the offsets are now off by two compared to the descriptions in the SCSI specs, which include the header. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This adds the implementation of write_data for the emulated command case. The first time through it asks for more data, the second time it finishes the processing of the command. MODE SELECT and MODE SELECT(10) can now be re-enabled, but they will not do much. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The previous patch only separated the send_command callback. Use different implementations also for read_data and write_data. The latter is still unreachable, so it aborts for now. read_data passes the data buffer that was prepared and completes the command. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Only checks for present medium were still done in scsi_send_command for emulated commands. So move those to scsi_disk_emulate_command and return different SCSIReqOps depending on the kind of command. Checks for present medium can be done unconditionally for the scsi_disk_dma_reqops case. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
We want to use separate SCSIReqOps for emulated commands needing an allocated buffer vs. those that are zerocopy when the HBA supports S/G lists. Ensure that all of the former are in scsi_disk_emulate_command. Commands that do not have any parameters are more similar to emulated commands, so also move them, even if they do I/O. Finally, MODE SELECT and MODE SELECT(10) are broken because we do not yet support passing parameter data _to_ emulated commands, so disable them. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
By making discard asynchronous, we can reuse all the error handling code that is used for other commands. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Dmitry Fleytman 提交于
This patch adds two new properties vendor and product to SCSI disks. These options let the user customize the inquiry data returned by the disk. Signed-off-by: NYan Vugenfirer <yan@ravellosystems.com> Signed-off-by: NDmitry Fleytman <dmitry.fleytman@ravellosystems.com> [ Use vendor and product property names, avoid "if" statements. - PB ] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
scsi-block is a passthrough device and does not allow customization of vendor, product, removable, DPOFUA, block size or any other piece of information. Thus, drop DEFINE_SCSI_DISK_PROPERTIES() from the list of qdev properties. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 17 7月, 2012 6 次提交
-
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Geometry needs to be qdev properties, because it belongs to the disk's guest part. Maintain backward compatibility exactly like for serial: fall back to DriveInfo's geometry, set with -drive cyls=... Do this only for scsi-hd. scsi-disk is legacy. scsi-cd doesn't have a geometry. scsi-block should get geometry from the host disk. Bonus: info qtree now shows the geometry. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Best to use the same type, to avoid unwanted truncation or sign extension. BlockConf can't use plain int for cyls, heads and secs, because integer properties require an exact width. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
hd_geometry_guess() picks geometry and translation. Callers can get the geometry directly, via parameters, but for translation they need to go through the block layer. Add a parameter for translation, so it can optionally be gotten just like geometry. In preparation of purging translation from the block layer, which will happen later in this series. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible, except it was put into block.c. Device-specific functionality should be kept in device code, not the block layer. Move it to hw/hd-geometry.c, and make stylistic changes required to keep checkpatch.pl happy. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 02 7月, 2012 3 次提交
-
-
由 Paolo Bonzini 提交于
This command is not necessary for CD-ROM and DVD-ROM, but some versions of udev trip on its absence. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The last four bytes of the thin provisioning page were cut out. Signed-off-by: NPaolo Bonzini <pbonzini@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>
-
- 15 6月, 2012 1 次提交
-
-
由 Markus Armbruster 提交于
Use the appropriate interface instead. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 07 6月, 2012 1 次提交
-
-
由 Gerd Hoffmann 提交于
usb-storage can't handle requests in one go as the data transfer can be splitted into lots of usb packets. Because of that there can be normal in-flight requests at savevm time and we need to handle that. With other scsi hba's this happens only in case i/o is stopped due to errors and there are pending requests which need to be restarted (req->retry = true). So, first we need to save req->retry and then handle the req->retry = false case. Write requests are handled fine already. For read requests we have to save the buffer as we will not restart the request (and thus not refill the buffer) on the target host. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 07 5月, 2012 4 次提交
-
-
由 Paolo Bonzini 提交于
Optional inquiry information is declared obsolete in the latest versions of the standard; invalid CDBs or unsupported VPD pages are supported can be diagnosed with trace_scsi_inquiry. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
The requirements on the INQUIRY buffer size are not in my copy of SPC (SPC-4 r27) and not observed by LIO. Rip them out. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Linux expects REQ_FUA to be advertised only if WRITE+FUA is faster than WRITE+SYNCHRONIZE CACHE, so we should not set the DPOFUA bit. However, it is useful to have it for testing purposes, so add a qdev property to set it. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
It is pointless to add a uint32_t field for every new feature. Since we will need a new feature soon, convert accesses to "removable" to look at bit 0 only. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 04 5月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Recently introduced FUA support also gave us a use-after-free of the BlockAcctCookie within a SCSIDiskReq, due to unbalanced reference counting. The patch fixes this by making scsi_do_read look like a combination of scsi_*_complete + scsi_*_data. It does both a ref (like scsi_read_data) and an unref (like scsi_flush_complete). Reported-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 4月, 2012 1 次提交
-
-
由 Ronnie Sahlberg 提交于
Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> [Actually, we should report it only if discard_granularity is nonzero. Older SBC drafts assigned 0 to thin provisioning and 1 to thick (resource-provisioned, they call it). Newer drafts assign respectively 1 and 2 - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-