qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Do you have a use for a tester of virtio-scsi with CD d


From: Thomas Schmitt
Subject: Re: [Qemu-devel] Do you have a use for a tester of virtio-scsi with CD drives ?
Date: Fri, 04 Nov 2011 14:03:03 +0100

Hi,

i wrote:
> > CD SAO gets stuck at SEND CUE SHEET.

Paolo Bonzini wrote:
> I wouldn't be surprised if they are bugs in either scsi-generic or the LSI
> emulation code.  They seem to occur when commands return less data than the
> guest driver has asked; with master I get a guest oops in the LSI driver,
> while the host pads the return data with zeros.  Your READ DISC STRUCTURE
> work for me with my (out-of-tree) vmw_pvscsi emulation.

Please give me instructions for dummies when it is time to
update my current slightly altered git clone, and to repeat
my tests.
(I have the disk space to create a completely new one, if
 this is desirable.)


> Is this okay to send to a blank CD with no prior command?  That is, can I
> simply change your SEND CUE SHEET dump to "sg_raw -s" to reproduce?

You will have to send a mode page 5 at least, which announces
write mode SAO. See MMC-3 6.3.5.

As usual, there is a 8 byte header, followed by the page.

  MODE SELECT
  55 10 00 00 00 00 00 00 3c 00 
  To drive: 60b
  00 00 00 00 00 00 00 00 05 32 42 c0 00 00 00 00 00 00 00 00
  00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Then it should be ok to send

  SEND CUE SHEET
  5d 00 00 00 00 00 00 00 20 00 
  To drive: 32b
  41 00 00 01 00 00 00 00 41 01 00 10 00 00 00 00 41 01 01 10
  00 00 02 00 41 aa 01 01 00 00 35 30 

--------------------------------------------------------------------

What would have come next:

Above cue sheet promises to the drive, that 4023 * 2048 bytes will
be written by WRITE(10) commands. It will stubbornly wait for all
of them to come. (Maybe you know how to talk the host kernel into
resetting it without rebooting.)

The first write command would have been
  WRITE(10)
  2a 00 ff ff ff 6a 00 00 10 00 
with 32 kiB of payload data. The funny LBA -150 is the start of
the pause track before the data track which starts at LBA 0.
See the notes at the foot of MMC-3 table 281.

>From then on there would be consequtive WRITE(10) commands up to
but not including LBA 3873 decimal.

Finally libburn would have sent
  SYNCHRONIZE CACHE
  35 02 00 00 00 00 00 00 00 00 
and waited for the drive to become ready again.


--------------------------------------------------------------------
Just for reference:
Below this point are only the complete SCSI logs of the real write run
and of the drive inquiry which happend before that write attempt.
--------------------------------------------------------------------

The attempted write run consisted of these commands.
The first mode page 5 (with TAO) is a result of libburn architecture.
The second one orders SAO.

SET CD SPEED
bb 00 ff ff 06 e4 00 00 00 00 00 00 
  1552 ms

MODE SELECT
55 10 00 00 00 00 00 00 3c 00 
To drive: 60b
00 00 00 00 00 00 00 00 05 32 41 c0 00 00 00 00 00 00 00 00
00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     0 ms

READ TRACK INFORMATION
52 01 00 00 00 ff 00 00 14 00 
>From drive: 20b
00 1a 01 01 00 00 4f 01 00 00 00 00 00 00 00 00 00 05 7d a7
     4 ms

MODE SELECT
55 10 00 00 00 00 00 00 3c 00 
To drive: 60b
00 00 00 00 00 00 00 00 05 32 42 c0 00 00 00 00 00 00 00 00
00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     4 ms

READ TRACK INFORMATION
52 01 00 00 00 ff 00 00 14 00 
>From drive: 20b
00 1a 01 01 00 00 4f 01 00 00 00 00 00 00 00 00 00 05 7d a7
     0 ms

START/STOP UNIT
1b 01 00 00 01 00 
    64 ms

TEST UNIT READY
00 00 00 00 00 00 
     0 ms

START/STOP UNIT
1b 00 00 00 01 00 
    12 ms

SEND CUE SHEET
5d 00 00 00 00 00 00 00 20 00 
To drive: 32b
41 00 00 01 00 00 00 00 41 01 00 10 00 00 00 00 41 01 01 10
00 00 02 00 41 aa 01 01 00 00 35 30 

This was the last command executed. After the sg_io_hdr.timeout
had elapsed, i saw the increase of host CPU from 1 % to 100 %.

--------------------------------------------------------------------

Before these command there were several commands for drive and
media inspection

INQUIRY
12 00 00 00 24 00 
>From drive: 36b
05 80 05 32 5b 00 00 00 54 53 53 54 63 6f 72 70 43 44 44 56
44 57 20 53 48 2d 53 32 32 33 42 20 53 42 30 32 
     0 ms

MODE SENSE
5a 00 2a 00 00 00 00 00 1e 00 
>From drive: 30b
00 4a 20 00 00 00 00 00 2a 42 3f 37 f1 7f 29 23 1b 90 01 00
08 00 16 0d 00 10 06 e4 06 e4 
     4 ms

MODE SENSE
5a 00 2a 00 00 00 00 00 4c 00 
>From drive: 76b
00 4a 20 00 00 00 00 00 2a 42 3f 37 f1 7f 29 23 1b 90 01 00
08 00 16 0d 00 10 06 e4 06 e4 00 01 00 00 00 00 06 e4 00 01
00 00 06 e4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     4 ms

GET CONFIGURATION
46 00 00 00 00 00 00 00 08 00 
>From drive: 8b
00 00 01 64 00 00 00 0a 
    20 ms

GET CONFIGURATION
46 00 00 00 00 00 00 01 68 00 
>From drive: 360b
00 00 01 64 00 00 00 0a 00 00 03 38 00 15 00 00 00 16 00 00
00 2b 00 00 00 1b 00 00 00 1a 00 00 00 14 00 00 00 13 00 00
00 12 00 00 00 11 00 00 00 10 00 00 00 0a 01 00 00 09 00 00
00 08 00 00 00 02 00 00 00 01 0b 08 00 00 00 07 01 00 00 00
00 02 07 04 00 00 00 00 00 03 07 04 3b 00 00 00 00 04 08 04
02 00 00 00 00 10 00 08 00 00 08 00 00 00 01 00 00 1d 00 00
00 1e 08 04 03 00 00 00 00 1f 04 04 01 00 01 00 00 20 04 0c
00 00 00 00 00 00 08 00 00 00 01 00 00 21 0d 08 3d 0f 00 01
07 00 00 00 00 23 05 08 00 00 00 00 00 00 00 00 00 24 04 04
80 00 00 00 00 26 00 00 00 27 00 04 00 00 00 00 00 2a 04 04
01 00 00 00 00 2b 00 04 01 00 00 00 00 2c 00 04 03 00 00 00
00 2d 09 04 1f 00 00 00 00 2e 05 04 7f 00 0d 00 00 2f 08 04
4e 00 00 00 00 33 00 08 00 00 00 02 01 10 00 00 00 3b 00 04
01 00 00 00 01 00 03 00 01 01 00 04 00 00 00 00 01 03 00 04
03 00 01 00 01 04 07 04 00 00 00 00 01 05 07 04 00 00 00 00
01 06 00 04 00 00 00 01 01 07 11 04 0f 00 00 00 01 08 03 10
51 39 31 34 36 47 42 53 41 30 38 32 33 32 30 30 01 0a 00 0c
46 44 43 00 53 54 43 00 54 4f 43 00 01 0b 00 04 00 00 00 01
    16 ms

GET PERFORMANCE
ac 00 00 00 00 00 00 00 00 00 03 00 
>From drive: 8b
00 00 00 00 00 00 00 00 
     0 ms

MODE SENSE
5a 00 01 00 00 00 00 00 0c 00 
>From drive: 12b
00 12 20 00 00 00 00 00 01 0a 00 80 
     0 ms

PREVENT/ALLOW MEDIA REMOVAL
1e 00 00 00 00 00 
     0 ms

START/STOP UNIT
1b 00 00 00 03 00 
     0 ms

TEST UNIT READY
00 00 00 00 00 00 
     0 ms

PREVENT/ALLOW MEDIA REMOVAL
1e 00 00 00 01 00 
     4 ms

START/STOP UNIT
1b 01 00 00 01 00 
  1644 ms

TEST UNIT READY
00 00 00 00 00 00 
     0 ms

START/STOP UNIT
1b 00 00 00 01 00 
    20 ms

INQUIRY
12 00 00 00 24 00 
>From drive: 36b
05 80 05 32 5b 00 00 00 54 53 53 54 63 6f 72 70 43 44 44 56
44 57 20 53 48 2d 53 32 32 33 42 20 53 42 30 32 
     0 ms

MODE SENSE
5a 00 2a 00 00 00 00 00 1e 00 
>From drive: 30b
00 4a 20 00 00 00 00 00 2a 42 3f 37 f1 7f 2b 23 1b 90 01 00
08 00 1b 90 00 10 06 e4 06 e4 
     4 ms

MODE SENSE
5a 00 2a 00 00 00 00 00 4c 00 
>From drive: 76b
00 4a 20 00 00 00 00 00 2a 42 3f 37 f1 7f 2b 23 1b 90 01 00
08 00 1b 90 00 10 06 e4 06 e4 00 01 00 00 00 00 06 e4 00 01
00 00 06 e4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
     4 ms

GET CONFIGURATION
46 00 00 00 00 00 00 00 08 00 
>From drive: 8b
00 00 01 64 00 00 00 0a 
    16 ms

GET CONFIGURATION
46 00 00 00 00 00 00 01 68 00 
>From drive: 360b
00 00 01 64 00 00 00 0a 00 00 03 38 00 15 00 00 00 16 00 00
00 2b 00 00 00 1b 00 00 00 1a 00 00 00 14 00 00 00 13 00 00
00 12 00 00 00 11 00 00 00 10 00 00 00 0a 01 00 00 09 00 00
00 08 00 00 00 02 00 00 00 01 0b 08 00 00 00 07 01 00 00 00
00 02 07 04 00 00 00 00 00 03 07 04 3b 00 00 00 00 04 08 04
02 00 00 00 00 10 00 08 00 00 08 00 00 00 01 00 00 1d 00 00
00 1e 08 04 03 00 00 00 00 1f 04 04 01 00 01 00 00 20 04 0c
00 00 00 00 00 00 08 00 00 00 01 00 00 21 0d 08 3d 0f 00 01
07 00 00 00 00 23 05 08 00 00 00 00 00 00 00 00 00 24 04 04
80 00 00 00 00 26 00 00 00 27 00 04 00 00 00 00 00 2a 04 04
01 00 00 00 00 2b 00 04 01 00 00 00 00 2c 00 04 03 00 00 00
00 2d 09 04 1f 00 00 00 00 2e 05 04 7f 00 0d 00 00 2f 08 04
4e 00 00 00 00 33 00 08 00 00 00 02 01 10 00 00 00 3b 00 04
01 00 00 00 01 00 03 00 01 01 00 04 00 00 00 00 01 03 00 04
03 00 01 00 01 04 07 04 00 00 00 00 01 05 07 04 00 00 00 00
01 06 00 04 00 00 00 01 01 07 11 04 0f 00 00 00 01 08 03 10
51 39 31 34 36 47 42 53 41 30 38 32 33 32 30 30 01 0a 00 0c
46 44 43 00 53 54 43 00 54 4f 43 00 01 0b 00 04 00 00 00 01
    20 ms

GET PERFORMANCE
ac 00 00 00 00 00 00 00 00 00 03 00 
>From drive: 8b
00 00 00 00 00 00 00 00 
     4 ms

MODE SENSE
5a 00 01 00 00 00 00 00 0c 00 
>From drive: 12b
00 12 20 00 00 00 00 00 01 0a 00 80 
     0 ms

MODE SENSE
5a 00 05 00 00 00 00 00 0a 00 
>From drive: 10b
00 3a 20 00 00 00 00 00 05 32 
     0 ms

GET CONFIGURATION
46 00 00 00 00 00 00 00 08 00 
>From drive: 8b
00 00 01 64 00 00 00 0a 
    20 ms

GET CONFIGURATION
46 00 00 00 00 00 00 01 68 00 
>From drive: 360b
00 00 01 64 00 00 00 0a 00 00 03 38 00 15 00 00 00 16 00 00
00 2b 00 00 00 1b 00 00 00 1a 00 00 00 14 00 00 00 13 00 00
00 12 00 00 00 11 00 00 00 10 00 00 00 0a 01 00 00 09 00 00
00 08 00 00 00 02 00 00 00 01 0b 08 00 00 00 07 01 00 00 00
00 02 07 04 00 00 00 00 00 03 07 04 3b 00 00 00 00 04 08 04
02 00 00 00 00 10 00 08 00 00 08 00 00 00 01 00 00 1d 00 00
00 1e 08 04 03 00 00 00 00 1f 04 04 01 00 01 00 00 20 04 0c
00 00 00 00 00 00 08 00 00 00 01 00 00 21 0d 08 3d 0f 00 01
07 00 00 00 00 23 05 08 00 00 00 00 00 00 00 00 00 24 04 04
80 00 00 00 00 26 00 00 00 27 00 04 00 00 00 00 00 2a 04 04
01 00 00 00 00 2b 00 04 01 00 00 00 00 2c 00 04 03 00 00 00
00 2d 09 04 1f 00 00 00 00 2e 05 04 7f 00 0d 00 00 2f 08 04
4e 00 00 00 00 33 00 08 00 00 00 02 01 10 00 00 00 3b 00 04
01 00 00 00 01 00 03 00 01 01 00 04 00 00 00 00 01 03 00 04
03 00 01 00 01 04 07 04 00 00 00 00 01 05 07 04 00 00 00 00
01 06 00 04 00 00 00 01 01 07 11 04 0f 00 00 00 01 08 03 10
51 39 31 34 36 47 42 53 41 30 38 32 33 32 30 30 01 0a 00 0c
46 44 43 00 53 54 43 00 54 4f 43 00 01 0b 00 04 00 00 00 01
    20 ms

READ DISC INFORMATION
51 00 00 00 00 00 00 00 22 00 
>From drive: 34b
00 20 10 01 01 01 01 00 ff 00 00 00 00 00 00 00 00 61 1a 41
00 4f 3b 4a 00 00 00 00 00 00 00 00 00 00 
     0 ms

MODE SELECT
55 10 00 00 00 00 00 00 3c 00 
To drive: 60b
00 00 00 00 00 00 00 00 05 32 02 00 00 00 00 00 00 00 00 00
00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     0 ms

READ TRACK INFORMATION
52 01 00 00 00 ff 00 00 14 00 
>From drive: 20b
00 1a 01 01 00 00 4f 01 00 00 00 00 00 00 00 00 00 05 7d a7
     4 ms

READ TRACK INFORMATION
52 01 00 00 00 ff 00 00 14 00 
>From drive: 20b
00 1a 01 01 00 00 4f 01 00 00 00 00 00 00 00 00 00 05 7d a7
     0 ms

READ TRACK INFORMATION
52 01 00 00 00 ff 00 00 14 00 
>From drive: 20b
00 1a 01 01 00 00 4f 01 00 00 00 00 00 00 00 00 00 05 7d a7
     0 ms

START/STOP UNIT
1b 01 00 00 00 00 
     4 ms

TEST UNIT READY
00 00 00 00 00 00 
   560 ms

--------------------------------------------------------------------

Have a nice day :)

Thomas




reply via email to

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