
On Thu, Jan 20, 2022 at 10:52:20 -0300, Daniel Henrique Barboza wrote:
The 'chip-id' attribute indicates which chip/socket that owns the PowerNV pcie-root controller.
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> --- docs/formatdomain.rst | 4 ++++ docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 15 +++++++++++++++ src/conf/domain_conf.h | 1 + 4 files changed, 25 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index acd9020830..d38c566650 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3896,6 +3896,10 @@ generated by libvirt. :since:`Since 1.2.19 (QEMU only).` ``index`` pci-root controllers for pSeries guests use this attribute to record the order they will show up in the guest. :since:`Since 3.6.0` +``chip-id`` + pcie-root controllers for powernv domains use this attribute to indicate the
``powernv``
+ chip that will own the controller. A single chip can hold multiple pcie-root + controllers. :since:`Since 8.1.0`
This doesn't clarify what a 'chip' is.
For machine types which provide an implicit PCI bus, the pci-root controller with index=0 is auto-added and required to use PCI devices. pci-root has no
[...]
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index be8dc82ccf..d1cda8c3f5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c
[...]
@@ -9624,6 +9625,16 @@ virDomainControllerDefParseXML(virDomainXMLOption *xmlopt, virReportError(VIR_ERR_XML_ERROR, _("Invalid target index '%i' in PCI controller"), def->opts.pciopts.targetIndex); + + if ((rc = virXMLPropInt(targetNodes[0], "chip-id", 0, VIR_XML_PROP_NONE, + &def->opts.pciopts.chipId, + def->opts.pciopts.chipId)) < 0)
Misaligned line.
+ return NULL; + + if ((rc == 1) && def->opts.pciopts.chipId == -1) + virReportError(VIR_ERR_XML_ERROR, + _("Invalid target chip-id '%i' in PCI controller"), + def->opts.pciopts.chipId); } } else if (ntargetNodes > 1) { virReportError(VIR_ERR_XML_ERROR, "%s",
With docs and alignment fixed: Reviewed-by: Peter Krempa <pkrempa@redhat.com>