From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLajy-0006aT-1g for qemu-devel@nongnu.org; Wed, 02 Nov 2011 09:20:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLajt-0000kj-Lq for qemu-devel@nongnu.org; Wed, 02 Nov 2011 09:20:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLajt-0000kY-Ey for qemu-devel@nongnu.org; Wed, 02 Nov 2011 09:20:21 -0400 Message-ID: <4EB1438F.4080602@redhat.com> Date: Wed, 02 Nov 2011 14:20:15 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1320236380-26180-1-git-send-email-pbonzini@redhat.com> <20111102130033.GB8549@redhat.com> In-Reply-To: <20111102130033.GB8549@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.0] virtio-blk: pass full status to the guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org 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 Paolo