[PATCH v3 26/29] domain_conf.c: add phb4-root-port to IsPowerNVRootPort()

Daniel Henrique Barboza danielhb413 at gmail.com
Wed Feb 23 13:19:49 UTC 2022


Make the virDomainControllerIsPowerNVRootPort() helper recognize
pnv-phb4-root-port as a PowerNV root port. This will spare us from
duplicating checks where the constraints of pnv-phb3-root-port also
applies for the pnv-phb4-root-port device.

Reviewed-by: Ján Tomko <jtomko at redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
---
 src/conf/domain_conf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 089237007a..c6b071c153 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2479,7 +2479,8 @@ virDomainControllerIsPowerNVRootPort(const virDomainControllerDef *cont)
 
     name = cont->opts.pciopts.modelName;
 
-    if (name != VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT)
+    if ((name != VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT) &&
+        (name != VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB4_ROOT_PORT))
         return false;
 
     return true;
-- 
2.35.1




More information about the libvir-list mailing list