summaryrefslogtreecommitdiffstats
path: root/scripts/qapi
diff options
context:
space:
mode:
authorDaniel Henrique Barboza2018-07-11 22:58:13 +0200
committerKevin Wolf2018-07-12 18:24:08 +0200
commit740842c9656cd5dbc9ccf2ea0c3a74f0ba35144a (patch)
tree287034eb3b138ac6a726ff2ae9d94332d5c43c0e /scripts/qapi
parentiotests: add test 226 for file driver types (diff)
downloadqemu-740842c9656cd5dbc9ccf2ea0c3a74f0ba35144a.tar.gz
qemu-740842c9656cd5dbc9ccf2ea0c3a74f0ba35144a.tar.xz
qemu-740842c9656cd5dbc9ccf2ea0c3a74f0ba35144a.zip
scsi-disk: Block Device Characteristics emulation fix
The current BDC VPD page (page 0xb1) is too short. This can be seen running sg_utils: $ sg_vpd --page=bdc /dev/sda Block device characteristics VPD page (SBC): Block device characteristics VPD page length too short=8 By the SCSI spec, the expected size of the SBC page is 0x40. There is no telling how the guest will behave with a shorter message - it can ignore it, or worse, make (wrong) assumptions. This patch fixes the emulation by setting the size to 0x40. This is the output of the previous sg_vpd command after applying it: $ sg_vpd --page=bdc /dev/sda -v inquiry cdb: 12 01 b1 00 fc 00 Block device characteristics VPD page (SBC): [PQual=0 Peripheral device type: disk] Medium rotation rate is not reported Product type: Not specified WABEREQ=0 WACEREQ=0 Nominal form factor not reported FUAB=0 VBULS=0 To improve readability, this patch also adds the VBULS value explictly and add comments on the existing fields we're setting. Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions