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

2022-02-21 Thread Ján Tomko

On a Tuesday in 2022, Daniel Henrique Barboza wrote:

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.

Signed-off-by: Daniel Henrique Barboza 
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Reviewed-by: Ján Tomko 

Jano


signature.asc
Description: PGP signature


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

2022-01-25 Thread Daniel Henrique Barboza
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.

Signed-off-by: Daniel Henrique Barboza 
---
 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 2b862ffb86..0305c913d9 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2476,7 +2476,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.34.1