Bug 1463892 - non-zero function on a slot accepted even though function 0 is unused
Summary: non-zero function on a slot accepted even though function 0 is unused
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Han Han
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-22 03:29 UTC by lijuan men
Modified: 2021-01-15 07:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-15 07:38:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lijuan men 2017-06-22 03:29:20 UTC
Description of problem:
any use of a non-0 function on a slot should be an error unless function 0 of that slot is also used

Version-Release number of selected component (if applicable):
libvirt-daemon-3.2.0-14.el7.x86_64
qemu-kvm-rhev-2.9.0-12.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.start a vm with 2 virtio disks using the xml:
 <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/RHEL-7.4-x86_64-latest.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/b.img'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/>
    </disk>

in the guest,only vdb uses the 08 slot and the function is non-0,no device uses the 08 slot with function=0

[root@lmen1 ~]# virsh start test
Domain test started


[root@lmen1 ~]# virsh dumpxml test | grep 0x08
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/>

2.check disks in guest, cannot find disk vdb
in the guest,
#lsblk
NAME          MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda           252:0    0  10G  0 disk 
├─vda1        252:1    0   1G  0 part /boot
└─vda2        252:2    0   9G  0 part 
  ├─rhel-root 253:0    0   8G  0 lvm  /
  └─rhel-swap 253:1    0   1G  0 lvm  [SWAP]


Actual results:
can start the guest,but can not find the disk

Expected results:
output some error info

Additional info:

Comment 2 Laine Stump 2017-06-22 15:05:24 UTC
Bug 1350391 has some context for this.

Comment 3 Laine Stump 2020-02-11 03:13:55 UTC
We have all the info needed to do this when we build the table of in-use PCI addresses before auto-assigning PCI addresses to devices that don't yet have an address.

Comment 6 RHEL Program Management 2021-01-15 07:38:44 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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