RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1254078 - SCSI INQUIRY command takes no effect in ppc64 be guest
Summary: SCSI INQUIRY command takes no effect in ppc64 be guest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: ppc64le
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: David Gibson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-17 06:42 UTC by Gu Nini
Modified: 2015-08-18 16:52 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-18 16:52:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gu Nini 2015-08-17 06:42:31 UTC
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 16:52:37 UTC
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.