From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdd8v-0006Nx-Ik for qemu-devel@nongnu.org; Thu, 12 Jul 2018 11:04:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdd8u-00009B-Oz for qemu-devel@nongnu.org; Thu, 12 Jul 2018 11:04:29 -0400 Date: Thu, 12 Jul 2018 17:04:17 +0200 From: Kevin Wolf Message-ID: <20180712150417.GF4541@localhost.localdomain> References: <20180711205813.22346-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 1/1] scsi-disk: Block Device Characteristics emulation fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Daniel Henrique Barboza , qemu-devel@nongnu.org, famz@redhat.com, qemu block Am 12.07.2018 um 16:53 hat Paolo Bonzini geschrieben: > On 11/07/2018 22:58, Daniel Henrique Barboza wrote: > > The current BDC VPD page (page 0xb1) is too short. This can be > > seen running sg_utils: > > > > $ sg_vpd --page=bdc /dev/sda > > Block device characteristics VPD page (SBC): > > Block device characteristics VPD page length too short=8 > > > > By the SCSI spec, the expected size of the SBC page is 0x40. > > There is no telling how the guest will behave with a shorter > > message - it can ignore it, or worse, make (wrong) > > assumptions. > > > > This patch fixes the emulation by setting the size to 0x40. > > This is the output of the previous sg_vpd command after > > applying it: > > > > $ sg_vpd --page=bdc /dev/sda -v > > inquiry cdb: 12 01 b1 00 fc 00 > > Block device characteristics VPD page (SBC): > > [PQual=0 Peripheral device type: disk] > > Medium rotation rate is not reported > > Product type: Not specified > > WABEREQ=0 > > WACEREQ=0 > > Nominal form factor not reported > > FUAB=0 > > VBULS=0 > > > > To improve readability, this patch also adds the VBULS value > > explictly and add comments on the existing fields we're > > setting. > > > > Signed-off-by: Daniel Henrique Barboza > > Kevin kindly agreed to take this through the block tree, so > > Acked-by: Paolo Bonzini Thanks, applied to the block branch. Kevin