qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1.0] virtio-blk: pass full status to the guest
Date: Wed, 02 Nov 2011 14:20:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

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 <address@hidden>

Paolo



reply via email to

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