qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] Bug with REPORT LUNS in IBM VSCSI


From: Nathan Whitehorn
Subject: Re: [Qemu-ppc] Bug with REPORT LUNS in IBM VSCSI
Date: Fri, 04 Oct 2013 07:50:08 -0500
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/04/13 04:55, Nikunj A Dadhania wrote:
Nathan Whitehorn <address@hidden> writes:

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?
What I see in slof code wrt the above in board-qemu/slof/vio-vscsi.fs:


\ We use SRP luns of the form 8000 | (bus << 8) | (id << 5) | lun
\ in the top 16 bits of the 64-bit LUN

Thats the reason I suppose you would not find anything at 0.



Zero is also a legitimate choice (and works). Per the SRP and SCSI standards, all other LUNs are supposed to be reported by a REPORT LUNs to LUN zero or the "REPORT LUNs" well-known LUN -- SRP doesn't have any concept of "bus" and "id". QEMU's emulation seems to violate the standard in this respect, however. I don't have any actual pSeries hardware handy at the moment, but I would assume that it does do REPORT LUNs correctly given the Linux VSCSI target code I have seen.
-Nathan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]