[PATCH v2 27/29] conf, qemu: add 'pnv-phb4' controller model name

Ján Tomko jtomko at redhat.com
Mon Feb 21 13:29:20 UTC 2022


On a Tuesday in 2022, Daniel Henrique Barboza wrote:
>Similar to the existing pnv-phb3 device, pnv-phb4 is also an
>implementation of pcie-root. No user doc is needed in this case since
>the user doesn't ideally set PCI model names manually.
>
>Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
>---
> docs/schemas/domaincommon.rng  |  1 +
> src/conf/domain_conf.c         |  2 +-
> src/conf/domain_conf.h         |  1 +
> src/qemu/qemu_domain_address.c | 14 +++++++++++++-
> src/qemu/qemu_validate.c       |  2 ++
> 5 files changed, 18 insertions(+), 2 deletions(-)
>
>diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
>index 116fedc19e..dce2548825 100644
>--- a/docs/schemas/domaincommon.rng
>+++ b/docs/schemas/domaincommon.rng
>@@ -2599,6 +2599,7 @@
>                     <value>i82801b11-bridge</value>
>                     <!-- implementations of "pcie-root" -->
>                     <value>pnv-phb3</value>
>+                    <value>pnv-phb4</value>
>                     <!-- implementations of "pcie-to-pci-bridge" -->
>                     <value>pcie-pci-bridge</value>
>                     <!-- implementations of "pcie-root-port" -->
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 0305c913d9..585e7d9dae 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -441,6 +441,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
>               "pnv-phb3-root-port",
>               "pnv-phb3",
>               "pnv-phb4-root-port",
>+              "pnv-phb4",
> );
>
> VIR_ENUM_IMPL(virDomainControllerModelSCSI,
>@@ -2456,7 +2457,6 @@ virDomainControllerIsPowerNVPHB(const virDomainControllerDef *cont)
>
>     name = cont->opts.pciopts.modelName;
>
>-    /* The actual device used for PHBs is pnv-phb3 */

This removal is suspicious. Better to not add the comment in the first
place.

>     if (name != VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3)
>         return false;
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220221/2129f23f/attachment-0001.sig>


More information about the libvir-list mailing list