]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-scsi: work around bug in old BIOSes
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 Nov 2014 13:00:02 +0000 (14:00 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 7 Jan 2015 20:43:28 +0000 (14:43 -0600)
commit0c80570170eb9c489657df5b85e3d3104952ce0e
tree250cd5c6a4551e1204bcf9c72f8d923b6f2000a2
parent14b51b6718c304d3051aceeb11664736a38cd272
virtio-scsi: work around bug in old BIOSes

Old BIOSes left some padding by mistake after the req_size/resp_size.
New QEMU does not like it, thinking it is a bidirectional command.

As a workaround, we can check if the ANY_LAYOUT bit is set; if not, we
always consider the first buffer as the virtio-scsi request/response,
because, back when QEMU did not support ANY_LAYOUT, it expected the
payload to start at the second element of the iovec.

This can show up during migration.

Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 55783a5521a3b1f93ee6a072e414a27c6cfa15f0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/virtio-scsi.c