Bug 1254078 - SCSI INQUIRY command takes no effect in ppc64 be guest
SCSI INQUIRY command takes no effect in ppc64 be guest
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
ppc64le Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: David Gibson
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-17 02:42 EDT by Gu Nini
Modified: 2015-08-18 12:52 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-18 12:52:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gu Nini 2015-08-17 02:42:31 EDT
Description of problem:
When execute the SCSI INQUIRY related command 'sg_inq /dev/xxx' or 'sg_dd if=/dev/xxx blk_sgio=1 bs=512 count=1' inside the ppc64 be guest, it takes no effect, i.e. there is not any output for the commands, while there is no the problem for ppc64 le guest

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-304.el7.ppc64le
Guest kernel: 3.10.0-304.el7.ppc64
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-16.el7.ppc64le

How reproducible:
100%


Steps to Reproduce:
1. Create a scsi_debug disk in the host:
#modprobe scsi_debug lbpu=1 lbpws=1
#lsscsi
......
[0:2:4:0]    disk    IBM      IPR-0   5DBA7D00       /dev/sde 
[0:3:0:0]    no dev  IBM      57D7001SISIOA    0150  -        
[1:0:0:0]    disk    Linux    scsi_debug       0004  /dev/sdf

2. Start a be guest with the scsi_debug disk and set 'scsi=on':

-drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/dev/sdf,format=raw -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,addr=09,scsi=on

3. Inside the guest, install 'sg3-utils', then issue following SCSI INQUIRY related commands for the scsi_debug disk:
#ll /dev/vd*
[root@dhcp106-242 ~]# ll /dev/vd*
brw-rw----. 1 root disk 252,  0 Aug 17 02:22 /dev/vda
brw-rw----. 1 root disk 252,  1 Aug 17 02:22 /dev/vda1
brw-rw----. 1 root disk 252,  2 Aug 17 02:22 /dev/vda2
brw-rw----. 1 root disk 252,  3 Aug 17 02:22 /dev/vda3
brw-rw----. 1 root disk 252, 16 Aug 17 02:22 /dev/vdb
[root@dhcp106-242 ~]# sg_inq /dev/vdb
[root@dhcp106-242 ~]# sg_dd if=/dev/vdb blk_sgio=1 bs=512 count=1
[root@dhcp106-242 ~]#

4. Quit the guest, and restart the guest with the scsi_debug disk but set 'scsi=off' similar to step2

5. Inside the guest, issue SCSI INQUIRY related commands for the scsi_debug disk similar to step3


Actual results:
In both steps 3 and 5, there isn't any output for the 2 SCSI INQUIRY related commands

Expected results:
The SCSI INQUIRY related commands should take effect as that in the host and le guest:
[root@ibm-p8-rhevm-10 home]# sg_inq /dev/sdf
standard INQUIRY:
  PQual=0  Device_type=0  RMB=0  version=0x05  [SPC-3]
  [AERC=0]  [TrmTsk=0]  NormACA=0  HiSUP=0  Resp_data_format=2
  SCCS=0  ACC=0  TPGS=0  3PC=0  Protect=0  [BQue=0]
  EncServ=0  MultiP=1 (VS=0)  [MChngr=0]  [ACKREQQ=0]  Addr16=0
  [RelAdr=0]  WBus16=0  Sync=0  Linked=1  [TranDis=0]  CmdQue=1
  [SPI: Clocking=0x0  QAS=0  IUS=0]
    length=96 (0x60)   Peripheral device type: disk
 Vendor identification: Linux   
 Product identification: scsi_debug      
 Product revision level: 0004
 Unit serial number: 4000
[root@ibm-p8-rhevm-10 home]# 
[root@ibm-p8-rhevm-10 home]# 
[root@ibm-p8-rhevm-10 home]# sg_dd if=/dev/sdf blk_sgio=1 bs=512 count=1
a%c
   !�8U�1+0 records in
1+0 records out

Additional info:
Comment 2 David Gibson 2015-08-18 12:52:37 EDT
The virtio block device won't respond to SCSI INQUIRY commands because it is not a SCSI device.  If you want SCSI INQUIRY you'll need to use either the virtio-scsi or spapr-vscsi interfaces.

Note You need to log in before you can comment on or make changes to this bug.