mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 18:45:16 +00:00
conf: Use the correct limit for the number of PHBs
I mistakenly thought pSeries guests supported 32 PHBs, but it turns out they only support 31. Validate the target index accordingly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1479647 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
c9d75d655a
commit
64357c3f93
@ -5083,10 +5083,10 @@ virDomainControllerDefValidate(const virDomainControllerDef *controller)
|
|||||||
/* Only validate the target index if it's been set */
|
/* Only validate the target index if it's been set */
|
||||||
if (opts->targetIndex != -1) {
|
if (opts->targetIndex != -1) {
|
||||||
|
|
||||||
if (opts->targetIndex < 0 || opts->targetIndex > 31) {
|
if (opts->targetIndex < 0 || opts->targetIndex > 30) {
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
_("PCI controller target index '%d' out of "
|
_("PCI controller target index '%d' out of "
|
||||||
"range - must be 0-31"),
|
"range - must be 0-30"),
|
||||||
opts->targetIndex);
|
opts->targetIndex);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
</os>
|
</os>
|
||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||||
<!-- QEMU only supports 32 PHBs with target index in the range 0-31,
|
<!-- QEMU only supports 31 PHBs with target index in the range 0-30,
|
||||||
so attempting to use target index 32 should fail -->
|
so attempting to use target index 31 should fail -->
|
||||||
<controller type='pci' model='pci-root'>
|
<controller type='pci' model='pci-root'>
|
||||||
<target index='32'/>
|
<target index='31'/>
|
||||||
</controller>
|
</controller>
|
||||||
<controller type='usb' model='none'/>
|
<controller type='usb' model='none'/>
|
||||||
<memballoon model='none'/>
|
<memballoon model='none'/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user