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 1656362 - when <shareable/> removed from scsi hostdev xml, related chardev's unpriv_sgio not set back to zero.
Summary: when <shareable/> removed from scsi hostdev xml, related chardev's unpriv_sgi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: John Ferlan
QA Contact: yisun
URL:
Whiteboard:
Depends On: 1582424 1631733 1656360
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-05 10:38 UTC by yisun
Modified: 2020-11-06 04:11 UTC (History)
12 users (show)

Fixed In Version: libvirt-4.5.0-17.el8
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of: 1656360
Environment:
Last Closed: 2019-06-14 00:53:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 7 yisun 2019-01-08 10:57:58 UTC
Verified with:
kernel-4.18.0-58.el8.x86_64
libvirt-4.5.0-17.module+el8+2625+db702f9d.x86_64

1. having a scsi device on host:
[root@dell-per730-58 device]# lsscsi
...
[5:0:0:0]    disk    IBM      2145             0000  /dev/sdb 
...

[root@dell-per730-58 device]# pwd
/sys/block/sdb/device


2. add following xml to vm:
[root@dell-per730-58 device]# virsh dumpxml avocado-vt-vm1 | grep hostdev -A10
    <hostdev mode='subsystem' type='scsi' managed='no' sgio='unfiltered'>
      <source>
        <adapter name='scsi_host5'/>
        <address bus='0' target='0' unit='0'/>
      </source>
      <shareable/>
      <alias name='hostdev0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </hostdev>

3. start the vm and check the unpriv_sgio value for sdb
[root@dell-per730-58 device]# virsh start avocado-vt-vm1
Domain avocado-vt-vm1 started

[root@dell-per730-58 device]# cat unpriv_sgio 
1

4. remove the <shareable/> tag in hostdev xml, destroy and start the vm again
[root@dell-per730-58 device]# virsh destroy avocado-vt-vm1
Domain avocado-vt-vm1 destroyed

[root@dell-per730-58 device]# virsh edit avocado-vt-vm1
...
    <hostdev mode='subsystem' type='scsi' managed='no' sgio='unfiltered'>
      <source>
        <adapter name='scsi_host5'/>
        <address bus='0' target='0' unit='0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </hostdev>
...

[root@dell-per730-58 device]# virsh start avocado-vt-vm1
Domain avocado-vt-vm1 started

[root@dell-per730-58 device]# cat unpriv_sgio 
0
<===== changed back to 0 when <shareable/> removed, this is expected.


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