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: Wed, 02 Nov 2011 23:08:10 +0100

Hi,

i forgot to address this concern:

Paolo Bonzini wrote:
> The page length is indeed 18 for IDE and 20 for SCSI.  I made some changes
> to that page recently, but left the 18 because I feared causing regression.
> But if that is a bug, we can probably fix it in 1.0.

The SCSI client is supposed to announce a maximum desired amount of
reply data with MODE SENSE. I see this Allocation Length in use
inside hw/ide/atapi.c:cmd_mode_sense()

      if (buf[0] == GPCMD_MODE_SENSE_10) {
          max_len = ube16_to_cpu(buf + 7);
      } else {
          max_len = buf[4];
      }
      ...
      ide_atapi_cmd_reply(s, 28, max_len);

and

  static void ide_atapi_cmd_reply(IDEState *s, int size, int max_size)
  {
      if (size > max_size)
         size = max_size;

So no driver or application should get overwhelmed by two bytes more
of size, if it correctly submitted its own desired number as Allocation
Length of the commands MODE SENSE(6) or MODE SENSE(10).


Have a nice day :)

Thomas




reply via email to

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