From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1.0] virtio-blk: pass full status to the guest Date: Wed, 02 Nov 2011 14:20:15 +0100 Message-ID: <4EB1438F.4080602@redhat.com> References: <1320236380-26180-1-git-send-email-pbonzini@redhat.com> <20111102130033.GB8549@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27325 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753213Ab1KBNUV (ORCPT ); Wed, 2 Nov 2011 09:20:21 -0400 In-Reply-To: <20111102130033.GB8549@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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