Bug 1329090
Summary: | Provide proper error when setting pcie-switch-upstream-port controller's index >=257 | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Yang Yang <yanyang> |
Component: | libvirt | Assignee: | Laine Stump <laine> |
Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 7.3 | CC: | dyuan, mzhan, rbalakri, xuzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-3.2.0-1.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 17:09:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Yang Yang
2016-04-21 07:59:18 UTC
We do check the boundaries of chassis_nr, but that happens when parsing user input. We haven't been bounds-checking chassis_nr when the number is auto-generated. A side note: on one hand, we apparently want to support > 256 downstream ports, but on the other hand each downstream port requires a chassis_nr, and we want chassis_nr (which is limited to 1-256) to be unique (see Bug 1349227). So which do we try to satisfy? Actually we should just limit the max for PCI controller index to 256, since index is a proxy for the controller's bus number, and that is an 8 bit value. Patch posted upstream: https://www.redhat.com/archives/libvir-list/2017-March/msg01258.html Fixed upstream: commit 272f18563179d7372ce0a11b4425a0497cf70e93 Author: Laine Stump <laine> Date: Sun Mar 26 20:47:17 2017 -0400 conf: validate that PCI controller index is < 256 Verified on libvirt-3.2.0-3.el7.x86_64. 1. Cold plug pcie-switch-upstream-port controllers to VM, index up to 256. # cat /tmp/upstream.xml <controller type='pci' index='INDEX' model='pcie-switch-upstream-port'/> # for i in $(seq 6 2 256);do sed "s/INDEX/$i/g" /tmp/upstream.xml > /tmp/xx.xml sudo virsh attach-device q35-upstream /tmp/xx.xml --config done You will get a error when the index reaches 256: error: unsupported configuration: PCI controller index 256 too high, maximum is 255 Failed. Try again? [y,n,i,f,?]: Or you can use 'virsh edit' to add the index to 256: # virsh edit q35-upstream error: unsupported configuration: PCI controller index 256 too high, maximum is 255 Failed. Try again? [y,n,i,f,?]: Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1846 |