Re: [PATCH 1.0] virtio-blk: pass full status to the guest

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

 



On 11/02/2011 02:00 PM, Michael S. Tsirkin wrote:
>  When SCSI passthrough is being used by the guest with virtio-blk, the
>  guest is not able to detect disk failures.  This is because the status
>  field is expected by the guest driver to include also the msg_status,
>  host_status and driver_status fields, but the device is only passing
>  down the SCSI status.
>
>  The patch fixes this, and also makes sure that the guest always sees a
>  CHECK_CONDITION status when there is valid sense data.

Do the bit offsets happen to be defined in some header?

Nope, the closest match is

#define msg_byte(result)    (((result) >> 8) & 0xff)
#define host_byte(result)   (((result) >> 16) & 0xff)
#define driver_byte(result) (((result) >> 24) & 0xff)

in Linux scsi/scsi.h

Also, Signed-off-by is missing?

Ugh.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux