From nobody Sun Feb 8 16:05:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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.129.124]) by mx.zohomail.com with SMTPS id 164268686411549.41126004645423; Thu, 20 Jan 2022 05:54:24 -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-621-eb8Gop3HMvat4TY45EYrzw-1; Thu, 20 Jan 2022 08:54:19 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 71602101F035; Thu, 20 Jan 2022 13:54:14 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4437410A3BCF; Thu, 20 Jan 2022 13:54:14 +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 0468318218BB; Thu, 20 Jan 2022 13:54:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20KDrFdx008917 for ; Thu, 20 Jan 2022 08:53:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id AC6F8202660C; Thu, 20 Jan 2022 13:53:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A7240200B426 for ; Thu, 20 Jan 2022 13:53:13 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 9726C3C15112 for ; Thu, 20 Jan 2022 13:53:13 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-144-ggIB_T5TOpS4-dWn1uqZYA-2; Thu, 20 Jan 2022 08:53:11 -0500 Received: by mail-oi1-f169.google.com with SMTP id g205so8952076oif.5 for ; Thu, 20 Jan 2022 05:53:11 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id a26sm1574102oiy.26.2022.01.20.05.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 05:53:11 -0800 (PST) X-MC-Unique: eb8Gop3HMvat4TY45EYrzw-1 X-MC-Unique: ggIB_T5TOpS4-dWn1uqZYA-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=1qZJ0FdyKoRwgO/wWxdl12xJKTCti2H55mvYue0LRl4=; b=yus+ztAzF2bGzCeAvasRa5JDcuaNFtZN4ur6SyQ0G6Z8NUatqQO6vzIgIVaS7ea3ht lqMwmhYSeDy9Vgq3LTWB8CRNkKLQ5gLz6fxo8rFkaeqFa4qs7n5cPTGH7m5b/Cy62uV+ cJ9LMqsRJYLw+zJkV0Ij/eKKFQatzp54+3Hxg33qotpeREk7ONWW2+MwzMJf06nM/fxq nkuKBEtaZAqdDB6nhTqghR68Wv8wJ+mJedfPpP3J/48mnFJfYkjalRp9DhJkwOqjSFeB EBkAl9gqoIc9LNEIrO4TjRHo30tdcfOc6zmgokH2Tr0wHWpLtbdhW9pdsjkehR3eFh9u swTw== X-Gm-Message-State: AOAM531nSDOcOkt7EzgaloT/N5OT5u3dSDEGLrkYgG4KwWoYqjgka39c Cbbz0p1xJ75SJPPFFeoke/AXiJhK44c= X-Google-Smtp-Source: ABdhPJxkcF23wH+jHd8jsm8bsJAO5E7VapJpsRg6/2VxOjcrW9K/pep6TaBL173+xo5D2p3nUJV41g== X-Received: by 2002:aca:f07:: with SMTP id 7mr7515690oip.143.1642686791397; Thu, 20 Jan 2022 05:53:11 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 12/33] qemu: add 'modelName' value for pnv-phb3-root-port device Date: Thu, 20 Jan 2022 10:52:15 -0300 Message-Id: <20220120135236.719924-13-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.78 on 10.11.54.4 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.84 on 10.5.11.22 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: 1642686865033100001 Content-Type: text/plain; charset="utf-8" Use the 'modelName' attribute for the pnv-phb3-root-port device. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 5 +++++ src/qemu/qemu_validate.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 18fc34d049..c62b9b4230 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2420,6 +2420,11 @@ qemuDomainPCIControllerSetDefaultModelName(virDomain= ControllerDef *cont, *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDG= E; break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: + if (qemuDomainIsPowerNV(def)) { + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_R= OOT_PORT; + break; + } + /* Use generic PCIe Root Ports if available, falling back to * ioh3420 otherwise */ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT)) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index bdb7c6f1e6..a5c11c3a9c 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3598,10 +3598,18 @@ qemuValidateDomainDeviceDefControllerPCI(const virD= omainControllerDef *cont, =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_I= OH3420 && - pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= CIE_ROOT_PORT) { + pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= CIE_ROOT_PORT && + pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= NV_PHB3_ROOT_PORT) { virReportControllerInvalidValue(cont, model, modelName, "model= Name"); return -1; } + + if (pciopts->modelName =3D=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME= _PNV_PHB3_ROOT_PORT && + !qemuDomainIsPowerNV(def)) { + virReportControllerInvalidValue(cont, model, modelName, "model= Name"); + return -1; + } + break; =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: --=20 2.34.1