From nobody Sun Feb 8 01:30:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1642686841343447.47682680324203; Thu, 20 Jan 2022 05:54:01 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-628-Z51gD4Q1MFWSWbmE8h7JdQ-1; Thu, 20 Jan 2022 08:53:55 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3637E1018720; Thu, 20 Jan 2022 13:53:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13CCE7E2C5; Thu, 20 Jan 2022 13:53:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D21454A707; Thu, 20 Jan 2022 13:53:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20KDrlwc010061 for ; Thu, 20 Jan 2022 08:53:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5FFF5141DC2D; Thu, 20 Jan 2022 13:53:47 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5AB701402408 for ; Thu, 20 Jan 2022 13:53:47 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 382461C00F68 for ; Thu, 20 Jan 2022 13:53:47 +0000 (UTC) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-673-43Kjab4FMwuzGLDUSKq7aQ-2; Thu, 20 Jan 2022 08:53:45 -0500 Received: by mail-ot1-f46.google.com with SMTP id x31-20020a056830245f00b00599111c8b20so7640804otr.7 for ; Thu, 20 Jan 2022 05:53:44 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id a26sm1574102oiy.26.2022.01.20.05.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 05:53:44 -0800 (PST) X-MC-Unique: Z51gD4Q1MFWSWbmE8h7JdQ-1 X-MC-Unique: 43Kjab4FMwuzGLDUSKq7aQ-2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0IF88ph5GTlPPjFNf1I47rcwuQme2fmqtST2VoRSDc0=; b=FLBh1ID/0MWCryqy4VvDG1hbEN1PctJcEVmpnN5VK5tRKAWG8ew/odiB/agQRwZU5y zVI3t6+P1GzwuURUcaY5i6c72cdo5U8Zn2BE1gtd5uQvlOcxORfCJ2PAvNjmO9VXgOX0 POnJcaW2C+JZrYs1sZK+7e7OVHgZ9vB/dXCOl4Mx0txW5pThhDYBSh+RCWAt3NaAATh3 rD4CcE5loRX5wdpbFYf7aLohrX9FMWNyYHJmyhGsAFssGHobfMHejMRczi8+wrV26Z82 RNkVMLbkZG+uwTqmeGk/MXhGvmN1hdiFWnILyjyUPCgWMhj1e/8O41KY8C0GlBiT13t4 lcdg== X-Gm-Message-State: AOAM530B6/0lnXFOLVhiaajhi3gwPwaIR2onRKvG61Mfqm7Bo2UoVMsu 7cUhxhu4hXAG0VVtZf1sf5LpvI1ya7g= X-Google-Smtp-Source: ABdhPJx+ehQaWuiKb+/crtkhPErEHelPclqu6jfkpBCUWGFiR0zCqS/ChSBcmSzC4YiZlzl0K3SAmA== X-Received: by 2002:a9d:5384:: with SMTP id w4mr15058985otg.321.1642686824550; Thu, 20 Jan 2022 05:53:44 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 32/33] qemu: add 'modelName' value for pnv-phb4 device Date: Thu, 20 Jan 2022 10:52:35 -0300 Message-Id: <20220120135236.719924-33-danielhb413@gmail.com> In-Reply-To: <20220120135236.719924-1-danielhb413@gmail.com> References: <20220120135236.719924-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-loop: libvir-list@redhat.com Cc: fbarrat@linux.ibm.com, danielhb413@gmail.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1642686842189100003 Content-Type: text/plain; charset="utf-8" Use the 'modelName' attribute for the pnv-phb4 pcie-root device. Update the virDomainControllerIsPowerNVPHB() helper as well so this device receives the same handling the existing pnv-phb3 has. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 4 ++-- src/qemu/qemu_domain_address.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8e7808ac9b..1c2b182c03 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2456,8 +2456,8 @@ virDomainControllerIsPowerNVPHB(const virDomainContro= llerDef *cont) =20 name =3D cont->opts.pciopts.modelName; =20 - /* The actual device used for PHBs is pnv-phb3 */ - if (name !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3) + if ((name !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3) && + (name !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB4)) return false; =20 return true; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index f8b5da8b55..73dafdfda9 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2424,6 +2424,18 @@ virDomainControllerGetPowerNVRootPortName(virDomainD= ef *def) } =20 =20 +static virDomainControllerPCIModelName +virDomainControllerGetPowerNVPHBName(virDomainDef *def) +{ + if (STREQ(def->os.machine, "powernv8")) + return VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3; + else if (STREQ(def->os.machine, "powernv9")) + return VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB4; + + return VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE; +} + + static void qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDef *cont, virDomainDef *def, @@ -2476,7 +2488,7 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainC= ontrollerDef *cont, break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: if (qemuDomainIsPowerNV(def)) - *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3; + *modelName =3D virDomainControllerGetPowerNVPHBName(def); break; case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: --=20 2.34.1