Bug 1483816
Summary: | Schema for the 'target' field in <controller model='pci-bridge'> should not accept 'chassis' and 'port' parameters for 'q35' machine type | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | jiyan <jiyan> |
Component: | libvirt | Assignee: | Andrea Bolognani <abologna> |
Status: | CLOSED ERRATA | QA Contact: | Meina Li <meili> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.4 | CC: | abologna, dyuan, dzheng, hhan, jdenemar, jgao, jiyan, lmen, xuzhang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-4.3.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 09:49:58 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
jiyan
2017-08-22 03:21:39 UTC
Patches posted upstream. https://www.redhat.com/archives/libvir-list/2017-December/msg00154.html v3 patches posted upstream. https://www.redhat.com/archives/libvir-list/2018-February/msg00996.html Fixes merged upstream. commit 97727e060cdfffa5abc8dca32b50cfd26d0c2ca1 Author: Andrea Bolognani <abologna> Date: Tue Feb 20 15:24:29 2018 +0100 qemu: Validate PCI controller options (chassis and port) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit 6fef5bf301b414e9b7a824311fec63fabb50dfac Author: Andrea Bolognani <abologna> Date: Tue Feb 20 15:21:11 2018 +0100 qemu: Validate PCI controller options (chassisNr) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit c651cdbce64022a0d6858e57bbbe671078a7b626 Author: Andrea Bolognani <abologna> Date: Wed Feb 21 10:17:56 2018 +0100 qemu: Validate PCI controller options (numaNode) This change catches an invalid use of the option in our test suite. https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit 5bd8764ee087f8fe417db8d80d51e2d4cd57dc6e Author: Andrea Bolognani <abologna> Date: Tue Feb 20 15:12:37 2018 +0100 qemu: Validate PCI controller options (busNr) This change catches an invalid use of the option in our test suite. https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit 932b6e1afc242d909193eb54f05a2e10bd6e78d7 Author: Andrea Bolognani <abologna> Date: Tue Feb 20 15:07:15 2018 +0100 qemu: Validate PCI controller options (pcihole64) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit dd8a8f1df3b5dc7c877ef454d9f93206cdc2cec0 Author: Andrea Bolognani <abologna> Date: Tue Feb 20 15:01:05 2018 +0100 qemu: Validate PCI controller options (targetIndex) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit 68b1491e89452f8bc1b696e478ff0165ffa6d114 Author: Andrea Bolognani <abologna> Date: Tue Feb 20 14:38:19 2018 +0100 qemu: Validate PCI controller options (index) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> commit 5a8b8b3f000537e0b119fe4168dd708a66c79408 Author: Andrea Bolognani <abologna> Date: Tue Feb 20 14:47:55 2018 +0100 qemu: Validate PCI controller options (modelName) https://bugzilla.redhat.com/show_bug.cgi?id=1483816 Signed-off-by: Andrea Bolognani <abologna> Reviewed-by: Laine Stump <laine> Verified on libvirt-4.5.0-2.el7.x86_64 Test steps: 1. chassis - edit <target chassis='4' port='0x48'/> in pci controller of guest xml 1) error: unsupported configuration: Option 'chassis' is not valid for PCI controller with index '1', model 'dmi-to-pci-bridge' and modelName 'i82801b11-bridge' Failed. Try again? [y,n,i,f,?]: 2)The same expected results with model 'pci-bridge''pcie-expander-bus''pcie-switch-upstream-port' 3)The same expected results with port attribute. 4)Only valid for model 'pcie-root-port' and 'pcie-switch-downstream-port' 2. chassisNr - edit <target chassisNr='2'/> in pci controller of guest xml 1)Option 'chassisNr' is not valid for PCI controller ... model 'pcie-expander-bus''pcie-root-port''pcie-switch-upstream-port''pcie-switch-downstream-port'. 2)Only valid for model 'pci-bridge'. 3. numaNode - edit <target> <node>0</node> </target> in pci controller of guest xml 1) Option 'numaNode' is not valid for PCI controller ... model 'dmi-to-pci-bridge' and modelName 'i82801b11-bridge''pci-bridge''pcie-root-port''pcie-switch-upstream-port''pcie-switch-downstream-port'. 2)Only valid for model 'pcie-expander-bus'. 4. busNr - edit <target busNr='254'/> in pci controller of guest xml 1)Option 'busNr' is not valid for PCI controller ... model 'dmi-to-pci-bridge''pci-bridge''pcie-root-port''pcie-switch-upstream-port''pcie-switch-downstream-port'. 2)Only valid for model 'pcie-expander-bus'. 5. pcihole64 - edit <pcihole64 unit='KiB'>2</pcihole64> in pci controller of guest xml 1) pcihole64 element missing in guest xml. 2) Only valid for model 'pcie-root'. 6. index - edit index of other pci controller except pcie-root to '0' error: XML error: The PCI controller with index='0' must be model='pcie-root' for this machine type / XML error: Multiple 'pci' controllers with index '0' 7. modelName As above test, modelName have been set automatically. For example: Option 'busNr' is not valid for PCI controller with index '2', model 'pci-bridge' and modelName 'pci-bridge' Additional info: Also test on pcie-to-pci-bridge controller, the behavior of both above options is expected. # virsh edit rhel7 error: unsupported configuration: Option 'chassis' is not valid for PCI controller with index '7', model 'pcie-to-pci-bridge' and modelName 'pcie-pci-bridge' Failed. Try again? [y,n,i,f,?]: error: unsupported configuration: Option 'numaNode' is not valid for PCI controller with index '7', model 'pcie-to-pci-bridge' and modelName 'pcie-pci-bridge' Failed. Try again? [y,n,i,f,?]: error: unsupported configuration: Option 'busNr' is not valid for PCI controller with index '7', model 'pcie-to-pci-bridge' and modelName 'pcie-pci-bridge' 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/RHSA-2018:3113 Excuse me , i found a similar problem that may be associated with this bug. Can you help me check if it is the same problem if you have time. Step to reproduce: 1.Prepare the pcie-root-port xml: <controller type='pci' index='9' model='pcie-root-port'/> 2.Cold plug a pcie-root-port controller to a q35 guest: # virsh attach-device q35 /tmp/pcie-root-port.xml --config Then will get the error like : :internal error: Required option 'modelName' is not set for PCI controller with index '9', model 'pcie-root-port' and modelName 'none' 3.But when i edit it in the guest xml like: <controller type='pci' index='8' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='8' port='0x15'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/> </controller> <controller type='pci' index='9' model='pcie-root-port'/> Then i can start the guest successfully. So i want to confirm that are there any problem when i cold-plug the controller ? (In reply to gaojianan from comment #10) > Excuse me , i found a similar problem that may be associated with this bug. > Can you help me check if it is the same problem if you have time. Sorry for taking so long to reply! It totally got buried in my inbox until just now :( > Step to reproduce: > 1.Prepare the pcie-root-port xml: > <controller type='pci' index='9' model='pcie-root-port'/> > > 2.Cold plug a pcie-root-port controller to a q35 guest: > # virsh attach-device q35 /tmp/pcie-root-port.xml --config > Then will get the error like : > :internal error: Required option 'modelName' is not set for PCI controller > with index '9', > model 'pcie-root-port' and modelName 'none' > > 3.But when i edit it in the guest xml like: > <controller type='pci' index='8' model='pcie-root-port'> > <model name='pcie-root-port'/> > <target chassis='8' port='0x15'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x02' > function='0x5'/> > </controller> > <controller type='pci' index='9' model='pcie-root-port'/> > > Then i can start the guest successfully. > So i want to confirm that are there any problem when i cold-plug the > controller ? The issue you're hitting is unrelated to the bug report at hand, but it's a bug indeed: what you're trying to do should be possible. It looks like we're failing to fill in reasonable values when 'virsh attach-device' is used, even though the same XML will work for 'virsh define' or 'virsh edit'. Can you please file a separate bug for this issue? |