]> git.proxmox.com Git - mirror_qemu.git/commit
block/scsi: correctly emulate the VPD block limits page
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 17 Dec 2020 16:56:12 +0000 (18:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Jun 2021 15:17:09 +0000 (17:17 +0200)
commit06b80795ee25d23e69747b2cb435003c6db2a6ab
tree0314594458622130dc0699fbf65f3448c9df07ae
parente7d85d955a7a3405934a104f35228aae1d338a6d
block/scsi: correctly emulate the VPD block limits page

When the device doesn't support the VPD block limits page, we emulate it even
for SCSI passthrough.

As a part of the emulation we need to add it to the 'Supported VPD Pages'

The code that does this adds it to the page, but it doesn't increase the length
of the data to be copied to the guest, thus the guest never sees the VPD block
limits page as supported.

Bump the transfer size by 1 in this case.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20201217165612.942849-6-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-generic.c