On 10/02/13 10:17, Paolo Bonzini wrote:
Il 02/10/2013 17:12, Nathan Whitehorn ha scritto:
I'm having some trouble with the VSCSI emulation in the pSeries machine.
It seems that the emulated SCSI target device on the SRP IT_nexus
properly distributes SCSI commands to its children but does not report
them in response to a REPORT LUNS request. This happens because it
forwards REPORT LUNs to target 0 on its child bus instead of answering
the command itself.
How so? The SCSI emulation hijacks REPORT_LUNS and does not pass it
down to the device's alloc_req callback, but the request is still
processed as if it came to the device.
Can you give QEMU's command-line? Can you reproduce the same bug with
an x86 FreeBSD guest using virtio-scsi?
The issue is that VSCSI SRP has only one direct target port and then
uses hierarchical LUNs to pass requests further down the bus using the
LUN addressing method. My understanding of SAM5 is that the emulated
target device should report all of those sub-LUNs, on all sub-targets,
in response to a REPORT LUNS command addressed to LUN 0 on the only
direct target. Is that correct?