From nobody Mon May 13 05:20:47 2024 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 1645622563193632.853110172243; Wed, 23 Feb 2022 05:22:43 -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-193-Alh01qWKPbio3E5DJMqP0w-1; Wed, 23 Feb 2022 08:22:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C141800422; Wed, 23 Feb 2022 13:22:35 +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 DFA3F7C02A; Wed, 23 Feb 2022 13:22:34 +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 AF98F1809CB3; Wed, 23 Feb 2022 13:22:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKAUh029692 for ; Wed, 23 Feb 2022 08:20:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7E697400E136; Wed, 23 Feb 2022 13:20:10 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79B23400E135 for ; Wed, 23 Feb 2022 13:20:10 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 62DBB2A8E471 for ; Wed, 23 Feb 2022 13:20:10 +0000 (UTC) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-384-7nthWRY2ON-4YJdbABpTCA-1; Wed, 23 Feb 2022 08:20:08 -0500 Received: by mail-ot1-f51.google.com with SMTP id l20-20020a0568302b1400b005af8c95bbe4so2029657otv.1 for ; Wed, 23 Feb 2022 05:20:08 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:02 -0800 (PST) X-MC-Unique: Alh01qWKPbio3E5DJMqP0w-1 X-MC-Unique: 7nthWRY2ON-4YJdbABpTCA-1 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=h3INNCyYav3Qe7vmy4eHaNbxVvOd5lHSDXig1yEQ/WQ=; b=HH72jpIIp5Xf12fOZHPR91BaFUZLxMP/kxgzBa4lZdmeaTqGFnmpDc74CnioBPdCYC shdsHOY4oinCSOiM9lmnJOsPoWY9LFy1l5SH9KkEUTEsXPkToi2lCzyWmvTDyZ1KY5wE 1gKvE3RLXsg0Yuccur85oiFWfaaKDCTisWPMYZKPkd+07tl/OscVBSa9E85qh9LW4fvi veSVxK7cxWQzN4vA8WQ5eYEsE2Tghursf/c/QxbiSkwKLrGBs1zWxQgx0FZPyNXLgzFj lfMUfJDGaZ6ppaKpKDA9dkbK+FiM1JF2FmUq1fWxYVsH95R7qnIaq3XEsp0MNVyZvEzt hFDA== X-Gm-Message-State: AOAM533/smERogYiaD36d3c7TfdMRenBK6YkaBzm1I99vXHN/3zPsBNK nQmGF2ETZ255qfCzn3wylfJMglbaKx0= X-Google-Smtp-Source: ABdhPJxeoIXKTtr1Eac+JLQP/TR8UiF9Bvz4MQmDCJgz3PpZMAceA1fPSm1VCpvO44QiHvoLezMEEQ== X-Received: by 2002:a9d:b93:0:b0:5af:82ec:574e with SMTP id 19-20020a9d0b93000000b005af82ec574emr2173283oth.209.1645622403003; Wed, 23 Feb 2022 05:20:03 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 01/29] qemu_domain.c: add PowerNV machine helpers Date: Wed, 23 Feb 2022 10:19:24 -0300 Message-Id: <20220223131952.922228-2-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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.14 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622565394100003 The PowerNV (Power Non-Virtualized) QEMU ppc64 machine is the emulation of a bare-metal IBM Power host. It follows the OPAL (OpenPower Abstration Layer) API/ABI, most specifically Skiboot [1]. For now, libvirt has support for the pSeries QEMU machine, which is the emulation of a logical partition (guest) that would run on top of a bare-metal system. This patch introduces the helpers that are going to be used to add a basic support for PowerNV domains in libvirt. Given that there are quite a few similarities in how pSeries and PowerNVv should be handled, we're also adding a 'qemuDomainIsPowerPC' helper that will be used in those instances. [1] https://open-power.github.io/skiboot/doc/overview.html Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 36 ++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 4 ++++ 2 files changed, 40 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index acc76c1cd6..bacde142f8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8759,6 +8759,42 @@ qemuDomainIsPSeries(const virDomainDef *def) } =20 =20 +bool +qemuDomainIsPowerNV(const virDomainDef *def) +{ + if (STRPREFIX(def->os.machine, "powernv")) + return true; + + return false; +} + + +/* + * PowerNV and pSeries domains shares a lot of common traits. This + * helper avoids repeating "if (pseries || powernv)" everywhere this + * is applicable. + */ +bool +qemuDomainIsPowerPC(const virDomainDef *def) +{ + return qemuDomainIsPSeries(def) || qemuDomainIsPowerNV(def); +} + + +/* + * Similar to qemuDomainIsPowerPC(). Usable when the caller doesn't + * have access to a virDomainDef pointer. + */ +bool +qemuDomainMachineIsPowerPC(const char *machine, const virArch arch) +{ + if (STRPREFIX(machine, "powernv")) + return true; + + return qemuDomainMachineIsPSeries(machine, arch); +} + + bool qemuDomainIsMipsMalta(const virDomainDef *def) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index be56b5dbb3..f64608660c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -764,6 +764,8 @@ bool qemuDomainMachineIsARMVirt(const char *machine, const virArch arch); bool qemuDomainMachineIsPSeries(const char *machine, const virArch arch); +bool qemuDomainMachineIsPowerPC(const char *machine, + const virArch arch); bool qemuDomainMachineHasBuiltinIDE(const char *machine, const virArch arch); =20 @@ -773,6 +775,8 @@ bool qemuDomainIsS390CCW(const virDomainDef *def); bool qemuDomainIsARMVirt(const virDomainDef *def); bool qemuDomainIsRISCVVirt(const virDomainDef *def); bool qemuDomainIsPSeries(const virDomainDef *def); +bool qemuDomainIsPowerNV(const virDomainDef *def); +bool qemuDomainIsPowerPC(const virDomainDef *def); bool qemuDomainIsMipsMalta(const virDomainDef *def); bool qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622562380724.0381504831473; Wed, 23 Feb 2022 05:22:42 -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-134-FgtevIXsMb2MDkxT_ZqWbw-1; Wed, 23 Feb 2022 08:22:39 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE45F1883521; Wed, 23 Feb 2022 13:22:34 +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 9004B832B9; Wed, 23 Feb 2022 13:22:34 +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 4B6EC44A59; Wed, 23 Feb 2022 13:22:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDK7XF029663 for ; Wed, 23 Feb 2022 08:20:07 -0500 Received: by smtp.corp.redhat.com (Postfix) id 65AB940D2962; Wed, 23 Feb 2022 13:20:07 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 619A040D1B9F for ; Wed, 23 Feb 2022 13:20:07 +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 49ECD802E5B for ; Wed, 23 Feb 2022 13:20:07 +0000 (UTC) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-345-rw2ghOQhNZCZsYMSv1yQ3w-1; Wed, 23 Feb 2022 08:20:05 -0500 Received: by mail-ot1-f43.google.com with SMTP id k22-20020a9d4b96000000b005ad5211bd5aso10054788otf.8 for ; Wed, 23 Feb 2022 05:20:05 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:04 -0800 (PST) X-MC-Unique: FgtevIXsMb2MDkxT_ZqWbw-1 X-MC-Unique: rw2ghOQhNZCZsYMSv1yQ3w-1 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=xtu/FQfOjdl9obhxdpSlzWAWrLb+Wql6gU+gDgUKuO4=; b=sgDT9vLrlhRWefkToSxlWF/uXhnXNvTRaVukb53iFPjEB5KkYqLAhQjktFbvgE+DfW s6JURNWGL/Heeu3S0t5m4ZJv4Syp1t4xACC5OaT9Ep4XqBhS2ZqGzVyQZXHBdCnobbZY OaqcEpbkg4bvNGFO6yw0qwSk8qEF0P0gCDraxbwvCFuAbZINO2INYkcZxKE7YGB5hB+b oK0FH4S5gO/sl/0Sfm73pE2j423DFcZ+Mii80r0lm+80xRLKuMdLk+WZRlYKqjf9fc4u 1IynuGTuIiCYRngc54aPMdia92jYKYhW6TWxTukgFvOk8N8fCYUS2v0ospM4K3r2sHzi NRAw== X-Gm-Message-State: AOAM532eWP0q3/w9pAwahuT9+qJd1R9Jvh+/P/IZHUrPjtDvQdGl0aYK poYdzLkzD511noDJ01LxUgWuzAHSfcs= X-Google-Smtp-Source: ABdhPJzagIvbX25IcRmAze4rn3t6Rh7eEQLq8qZVhpPXcVsoKnqPO80uM221r71+Al0ldp0VPYCOJA== X-Received: by 2002:a05:6830:3490:b0:5af:894e:c5b9 with SMTP id c16-20020a056830349000b005af894ec5b9mr2011526otu.328.1645622404605; Wed, 23 Feb 2022 05:20:04 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 02/29] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps Date: Wed, 23 Feb 2022 10:19:25 -0300 Message-Id: <20220223131952.922228-3-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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.15 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622564124100001 Both pSeries and PowerNV machines don't have floppy device support. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 529e9ceaf5..28e7820d0e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6190,8 +6190,8 @@ virQEMUCapsFillDomainDeviceDiskCaps(virQEMUCaps *qemu= Caps, VIR_DOMAIN_DISK_DEVICE_CDROM, VIR_DOMAIN_DISK_DEVICE_LUN); =20 - /* PowerPC pseries based VMs do not support floppy device */ - if (!qemuDomainMachineIsPSeries(machine, qemuCaps->arch)) { + /* PowerPC domains do not support floppy device */ + if (!qemuDomainMachineIsPowerPC(machine, qemuCaps->arch)) { VIR_DOMAIN_CAPS_ENUM_SET(disk->diskDevice, VIR_DOMAIN_DISK_DEVICE_= FLOPPY); VIR_DOMAIN_CAPS_ENUM_SET(disk->bus, VIR_DOMAIN_DISK_BUS_FDC); } --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622572617836.0276988217582; Wed, 23 Feb 2022 05:22:52 -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-5-1beSas7pM-WWRMcI5w05Gw-1; Wed, 23 Feb 2022 08:22:47 -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 30F3F501F0; Wed, 23 Feb 2022 13:22:39 +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 0F0831064240; Wed, 23 Feb 2022 13:22:39 +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 D233E44A5E; Wed, 23 Feb 2022 13:22:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDK8CL029673 for ; Wed, 23 Feb 2022 08:20:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 939C2400E136; Wed, 23 Feb 2022 13:20:08 +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 8F5DA400E135 for ; Wed, 23 Feb 2022 13:20:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 78A8A3C174D7 for ; Wed, 23 Feb 2022 13:20:08 +0000 (UTC) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-193-_0S6zL3NPBqpBD7UQY_b9A-1; Wed, 23 Feb 2022 08:20:06 -0500 Received: by mail-ot1-f47.google.com with SMTP id j8-20020a056830014800b005ad00ef6d5dso11951669otp.0 for ; Wed, 23 Feb 2022 05:20:06 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:05 -0800 (PST) X-MC-Unique: 1beSas7pM-WWRMcI5w05Gw-1 X-MC-Unique: _0S6zL3NPBqpBD7UQY_b9A-1 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=e1/UE88PIrjkbiD2+YOdhcx1q6xos+kuJHzEZ7TQD0U=; b=gVlT+XaPSYw4+KUQvT3x5OWC5rj+efvbYBR7ykGzeL+FUSysiJpKKA9o6OPwb2FBH8 Ic3leAyYn4jKPBRyRH4H/HRw+VmwJn2v4xjygbxT+bUSCHVHfqWTrlIZvfJVAY11CZj0 /BSwtUPzGuYE2e+XDji+o8Odum8fSv21+PYiu1raDccU4ExnATC/t0arKrtbicWMIv29 HLDozUs2eqDVsrK309R95D0Kypb5vDHqK8JTz2XjZTP+d9tgX/tidce30x2ws9TQDuIT yl4rIdXUOJS3tLU3LAO7TZWAEigxG4l5+sYsYvocmlD41miVAWGsT3g1QbcPeIvn6UUM QJNw== X-Gm-Message-State: AOAM533MnU9bdvjAVM25OHLuQyKXXv2qN+SLFwmrBvHMqiPJs+aeSmv+ yodVM8p0kFl/Mmgf36vL3NTeYJwm3C8= X-Google-Smtp-Source: ABdhPJyS9aH77gpHebSpCqKlADC16iPk3TEQSb5lBJWXDGz9scMfq8M3YRTPVQRbRtbSVYoqD6Eerw== X-Received: by 2002:a9d:73da:0:b0:5ad:268f:474b with SMTP id m26-20020a9d73da000000b005ad268f474bmr9444820otk.371.1645622405853; Wed, 23 Feb 2022 05:20:05 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 03/29] qemu_domain: turn qemuDomainMachineIsPSeries() static Date: Wed, 23 Feb 2022 10:19:26 -0300 Message-Id: <20220223131952.922228-4-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622573455100007 The function is now unused outside of qemu_domain.c. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index bacde142f8..0352cad985 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8657,7 +8657,7 @@ qemuDomainMachineIsRISCVVirt(const char *machine, =20 /* You should normally avoid this function and use * qemuDomainIsPSeries() instead. */ -bool +static bool qemuDomainMachineIsPSeries(const char *machine, const virArch arch) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index f64608660c..be35e11625 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -762,8 +762,6 @@ virDomainChrDef *qemuFindAgentConfig(virDomainDef *def); * doesn't have "Machine" in the name instead. */ bool qemuDomainMachineIsARMVirt(const char *machine, const virArch arch); -bool qemuDomainMachineIsPSeries(const char *machine, - const virArch arch); bool qemuDomainMachineIsPowerPC(const char *machine, const virArch arch); bool qemuDomainMachineHasBuiltinIDE(const char *machine, --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622584572857.6911280141682; Wed, 23 Feb 2022 05:23:04 -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-524-LqS93xEoM76romDxEH2JtA-1; Wed, 23 Feb 2022 08:23:01 -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 BC3511091DB8; Wed, 23 Feb 2022 13:22:52 +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 9C9161062255; Wed, 23 Feb 2022 13:22:52 +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 6F2BA55344; Wed, 23 Feb 2022 13:22:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKFYP029717 for ; Wed, 23 Feb 2022 08:20:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 39BBE53CF; Wed, 23 Feb 2022 13:20:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 354B1776C for ; Wed, 23 Feb 2022 13:20:09 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 A68C6185A7BA for ; Wed, 23 Feb 2022 13:20:09 +0000 (UTC) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-193-MXfQtR-7N2mebRh-5KTDWQ-2; Wed, 23 Feb 2022 08:20:07 -0500 Received: by mail-ot1-f47.google.com with SMTP id j8-20020a056830014800b005ad00ef6d5dso11951669otp.0 for ; Wed, 23 Feb 2022 05:20:07 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:07 -0800 (PST) X-MC-Unique: LqS93xEoM76romDxEH2JtA-1 X-MC-Unique: MXfQtR-7N2mebRh-5KTDWQ-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=9fYXkarVINkGOPsL09GYXEkThVbcMs9ON2us7lwHUaQ=; b=mh32WgHc5HzL+n1eOmCbcyetzwscovILUnN3+h1q8XLHD68XGpSoz/oIGp+caw5egm J6YjSKpN1cKJaTyeq0/W1dkbo2jkxzAebE7g11G3qdAcYD4HsmwOHEqOcBJBOqbEKs+J Kbc5/j4eHqM6Vs6AglPt0Mx6dx3gUjYrFCORWkTsbSXKOBqo9muixjT95Hh1qpfm0P50 roq+beLo+njFEQTiq7ALWQ4ng8boJX3HUfHuheYgxH+EeiIs5Gl8bcv5hWbwPocl4FUd aOQCSlCmz2UFgt016as1CmrirtltXXgPCV0GNBFVe2Vqoripql6QTXd7mUIx0lI6xBru a2lw== X-Gm-Message-State: AOAM53034xn4i5IHs+efD59HN+yTn+BTrvxH+geIqP+XS8XWXorj5MWp N0Drb6Dg/dPMyd31oxPvGvHa8uCsGrs= X-Google-Smtp-Source: ABdhPJy1pWDcYx6gL3X+Bcpx3z2l16F2DTRFIMsyiOGa7tw2H2Um4PjItNtAnkvBuuStg3w0/+rvoQ== X-Received: by 2002:a05:6830:1f5b:b0:5a2:2ec7:4ea4 with SMTP id u27-20020a0568301f5b00b005a22ec74ea4mr10055320oth.206.1645622407253; Wed, 23 Feb 2022 05:20:07 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 04/29] qemu_validate.c: use qemuDomainIsPowerPC() in qemuValidateDomainChrDef() Date: Wed, 23 Feb 2022 10:19:27 -0300 Message-Id: <20220223131952.922228-5-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622585584100011 Both PowerNV and pSeries machines don't support parallel ports. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f27e480696..f90348c324 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -2012,7 +2012,7 @@ qemuValidateDomainChrDef(const virDomainChrDef *dev, return -1; =20 if (dev->deviceType =3D=3D VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL && - (ARCH_IS_S390(def->os.arch) || qemuDomainIsPSeries(def))) { + (ARCH_IS_S390(def->os.arch) || qemuDomainIsPowerPC(def))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("parallel ports are not supported")); return -1; --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622578368293.1558076885125; Wed, 23 Feb 2022 05:22:58 -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-398-rwL8V_9WN2inkHUcrBlYHg-1; Wed, 23 Feb 2022 08:22:53 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8F4BF8015F9; Wed, 23 Feb 2022 13:22:44 +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 672BB7D3D9; Wed, 23 Feb 2022 13:22:44 +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 3243E44A62; Wed, 23 Feb 2022 13:22:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKB2i029697 for ; Wed, 23 Feb 2022 08:20:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 97E99400E135; Wed, 23 Feb 2022 13:20:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93D4040D2962 for ; Wed, 23 Feb 2022 13:20:11 +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 7C2D1800883 for ; Wed, 23 Feb 2022 13:20:11 +0000 (UTC) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-AOgN-TaIOXyaDCD5O5VU5w-1; Wed, 23 Feb 2022 08:20:09 -0500 Received: by mail-oi1-f175.google.com with SMTP id k2so14431292oia.2 for ; Wed, 23 Feb 2022 05:20:09 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:08 -0800 (PST) X-MC-Unique: rwL8V_9WN2inkHUcrBlYHg-1 X-MC-Unique: AOgN-TaIOXyaDCD5O5VU5w-1 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=WuLtYZRJFmUC19hm95iC6VLrQnAG4DvmKcM50SLh2sM=; b=RPlnBtoWNtWovB1cntb1VXBM979PVcnyo3MUznFYvugWreIAu9pUDgqVchDWiCj76e bru6QnhU02yaJQfdfziooIRh8dQZC3TBU+YjtFFk6mA1mO+a5ETeQaEkNQH0JcZsc5N9 FPj5fbrSDXqhVJ0o+Ik08DdgGa9J1sNM0L6hTHbVIvj61ZaNus6TD1sQPN5FvkxSqP4u 6zT/0x853i8nszDVD70EoCbGvMcAOI1eCzvpykBt8FsLLRfyZPacb0wLd1qjzLmc8Esf cDXQvEZQZsaHXunUCDwwcr9aE9Jn1g101vZJmTFYozByZ61k2rFJuGHyz4erlDJCBAOO QM6w== X-Gm-Message-State: AOAM533/qyS0NHMk8sJw91WvC9746od/M8JH5N5LiHHw6Y+U/c9kreE6 W/2z+YbBHFRyvKmnRKxGolYn6JlfdpM= X-Google-Smtp-Source: ABdhPJxzPU74WH1WpTT+GUURrk5bonCon6sZn2QYtDkD4lJwpNSAQuM62eBR91pSzBYSayMfg1oImw== X-Received: by 2002:a05:6808:30a3:b0:2d5:2019:97ac with SMTP id bl35-20020a05680830a300b002d5201997acmr4305733oib.40.1645622408575; Wed, 23 Feb 2022 05:20:08 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 05/29] qemu_domain.c: define ISA as default PowerNV serial Date: Wed, 23 Feb 2022 10:19:28 -0300 Message-Id: <20220223131952.922228-6-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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.16 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622579521100001 The PowerNV machines uses ISA as the default serial type. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0352cad985..c81c63369c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5187,6 +5187,8 @@ qemuDomainChrDefPostParse(virDomainChrDef *chr, chr->targetType =3D VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SYSTEM; } else if (ARCH_IS_S390(def->os.arch)) { chr->targetType =3D VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SCLP; + } else if (qemuDomainIsPowerNV(def)) { + chr->targetType =3D VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA; } } =20 --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622581281126.83745283520466; Wed, 23 Feb 2022 05:23: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-18-7DJkinjIO2SfQJStGyKYGw-1; Wed, 23 Feb 2022 08:22:56 -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 9523B50201; Wed, 23 Feb 2022 13:22:47 +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 78F0584975; Wed, 23 Feb 2022 13:22:47 +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 4C1B21807D6D; Wed, 23 Feb 2022 13:22:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKC4i029702 for ; Wed, 23 Feb 2022 08:20:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id A0EF9C080A6; Wed, 23 Feb 2022 13:20:12 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C844C0809C for ; Wed, 23 Feb 2022 13:20:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 83F91185A7A4 for ; Wed, 23 Feb 2022 13:20:12 +0000 (UTC) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-102-ZNDuDdHrO-6WbmSOtoHHog-1; Wed, 23 Feb 2022 08:20:10 -0500 Received: by mail-oi1-f172.google.com with SMTP id l25so12540649oic.13 for ; Wed, 23 Feb 2022 05:20:10 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:09 -0800 (PST) X-MC-Unique: 7DJkinjIO2SfQJStGyKYGw-1 X-MC-Unique: ZNDuDdHrO-6WbmSOtoHHog-1 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=dsptcxoGqFbYi11TUJ7aiDrO9UPwGQl4x+VsaUcazY0=; b=Y4PqHnOXMQgSnRy7qNRpier5oe276jfmKO9ntRsu9RStcbkzDRvmO5mBxcuhGEgHAI R/n8f/8s/Vufq/88hTBoef3mKdGYMzIZcJSk4jgy+piWa2g3s54eadmq3GsEhelZo+J7 o0KGP+GlUEdhcne/G9U1K59+rxD+GsgY/VQLm8RkSJY6jPSPcE9Tnk/jzSYIwCL+baSQ JzNwCJn8mKcFvhrgH8KyY7PZShfXwvrpvOIY2uzFz/zEfh1fjtd6MrpDoXWhU5TjQ9di UW+6MjgVVTuQ2GRndDZpU6P6EesvqkoCh+5IUiYx1/LB16fhWXROtAXH3xZ+jPjeP4P7 EqXQ== X-Gm-Message-State: AOAM530MdzU9CKX2c3UKdFopfw5hr21wsXTMY2obJbOHzLKaEOj9xwFR 0jrpMNKF8RBMfOPynp2d7atn9BlWvyY= X-Google-Smtp-Source: ABdhPJwyoCBqk8GWKcAhjfHlUM46WUkXo6NQBfAEl6tv/1//HV6ZpuyFfHCi87vrfXRqmdglieDtOA== X-Received: by 2002:a05:6808:d54:b0:2ca:d439:1cdb with SMTP id w20-20020a0568080d5400b002cad4391cdbmr4653080oik.79.1645622409927; Wed, 23 Feb 2022 05:20:09 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 06/29] qemu_validate.c: enhance 'machine type not supported' message Date: Wed, 23 Feb 2022 10:19:29 -0300 Message-Id: <20220223131952.922228-7-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.8 X-loop: libvir-list@redhat.com Cc: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622583481100007 Add 'virt type' to allow for an easier time debugging. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_validate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f90348c324..ad8f0f94ff 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1101,8 +1101,9 @@ qemuValidateDomainDef(const virDomainDef *def, =20 if (!virQEMUCapsIsMachineSupported(qemuCaps, def->virtType, def->os.ma= chine)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Emulator '%s' does not support machine type '%s'= "), - def->emulator, def->os.machine); + _("Emulator '%s' does not support machine type '%s'= for virt type '%s'"), + def->emulator, def->os.machine, + virDomainVirtTypeToString(def->virtType)); return -1; } =20 --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 164562258255588.58590130711639; Wed, 23 Feb 2022 05:23:02 -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-313-aXgu_pGkPraHale55GUKkg-1; Wed, 23 Feb 2022 08:22:59 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51CE6501E1; Wed, 23 Feb 2022 13:22:50 +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 2D6162B44A; Wed, 23 Feb 2022 13:22: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 ED78A1807D6F; Wed, 23 Feb 2022 13:22:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKES0029712 for ; Wed, 23 Feb 2022 08:20:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2000F1121332; Wed, 23 Feb 2022 13:20:14 +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 1B6AE112131E for ; Wed, 23 Feb 2022 13:20:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (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 040133C174C9 for ; Wed, 23 Feb 2022 13:20:14 +0000 (UTC) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-355-AQKhHHH4PfKP8cpgZxF7Lg-1; Wed, 23 Feb 2022 08:20:12 -0500 Received: by mail-ot1-f45.google.com with SMTP id k9-20020a056830242900b005ad25f8ebfdso11912145ots.7 for ; Wed, 23 Feb 2022 05:20:12 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:11 -0800 (PST) X-MC-Unique: aXgu_pGkPraHale55GUKkg-1 X-MC-Unique: AQKhHHH4PfKP8cpgZxF7Lg-1 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=qHIPjfr1PxFlPgHBoyd3jLvYmUDPsXQd/63Jnq8RCsM=; b=YAfVfaXZCG+4mxpimH7d3hpIXs6GXPm9dR4dL3btr9u9aNdjNl88r3oSC8hYRfyMIi imnv+QsX/rAoAapMY12eHC+gDtdOw6NPnN4wHgVxt8uQ9nB2CrhLXIrECviZWiC+8cbP 7H2aVNrFYgXbmXAC0YcdqoEeQwoVPmllcf0vzm2aIPlZcDjNoYYH9jXp17pSSnw+7/cn 4W1EYHCCIiO2tda42slq4Fx4eA3fD8IvJ+5733NTXylxd+gCosRLsZ/gpaOSEV16Gs8+ 67BjgRJ20q3RS6pMqHJ8fGeUn57JnSoxK0f8ayG63DUdzmPlrCaPcwBEv+tnJcC9US6a 5szg== X-Gm-Message-State: AOAM531ofAIaVcyqMSw8EcqtDUb8onx7VtfhY2D+rLmbjlIcuTtObVD5 Soh9sL8dxMesxgsPuVwTz03nsx9/vr0= X-Google-Smtp-Source: ABdhPJxKKHORsXSC0pP/LrkFf6AS0U1yOcshpndojJbASUj9THJ1aGKbnQq2M65/s02KSiAxmGbt2w== X-Received: by 2002:a9d:7441:0:b0:5af:223d:fe0e with SMTP id p1-20020a9d7441000000b005af223dfe0emr5331557otk.299.1645622411412; Wed, 23 Feb 2022 05:20:11 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 07/29] qemu_domain.c: disable default devices for PowerNV machines Date: Wed, 23 Feb 2022 10:19:30 -0300 Message-Id: <20220223131952.922228-8-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.3 X-loop: libvir-list@redhat.com Cc: 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.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622583482100008 PowerNV domains will support pcie-root devices as PHBs, in a similar fashion as pSeries domains supports the spapr-pci-host-bridge as a pci-root model. Set 'addPCIRoot' to false since we'll not be using this buses in this machine. 'addDefaultMemballoon' is also set to false since the balloon driver wasn't really tested with the PowerNV kernel. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c81c63369c..4cf030c485 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3684,6 +3684,15 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, * add the definition if not already present */ if (qemuDomainIsPSeries(def)) addPanicDevice =3D true; + + if (qemuDomainIsPowerNV(def)) { + addPCIRoot =3D false; + addDefaultUSB =3D false; + addDefaultUSBKBD =3D false; + addDefaultUSBMouse =3D false; + addDefaultMemballoon =3D false; + } + break; =20 case VIR_ARCH_ALPHA: --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622565114696.5732201611958; Wed, 23 Feb 2022 05:22:45 -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-187-1PN-Zp23NYehS-TlhXaVRw-1; Wed, 23 Feb 2022 08:22:40 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 31B6D1006AA5; Wed, 23 Feb 2022 13:22:35 +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 0F73D797E8; Wed, 23 Feb 2022 13:22:35 +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 D50A31809CB4; Wed, 23 Feb 2022 13:22:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKFRO029718 for ; Wed, 23 Feb 2022 08:20:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 814281121334; Wed, 23 Feb 2022 13:20: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 7CCA7112131E for ; Wed, 23 Feb 2022 13:20:15 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 670BC3C174CD for ; Wed, 23 Feb 2022 13:20:15 +0000 (UTC) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-TFvLJQHgPK6cLWts-xigHw-1; Wed, 23 Feb 2022 08:20:13 -0500 Received: by mail-oi1-f179.google.com with SMTP id p15so18210018oip.3 for ; Wed, 23 Feb 2022 05:20:13 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:12 -0800 (PST) X-MC-Unique: 1PN-Zp23NYehS-TlhXaVRw-1 X-MC-Unique: TFvLJQHgPK6cLWts-xigHw-1 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=05N++iOs54u45th/0IHq1XY4zRgqDgV+V6/wGsP74SA=; b=1fAflOW5tbses/NKB/9GvC35T9k/JTZ1nvzWDU9rhtYysyhVivYw5kgGPBNye7srH+ DtNOByTKpHDfF7BT0UQhh9gaqss4Iom072mU3PwxnuSiA7mvVJ387tqQcWdUhHp7aeYP gvuMomf003RfF2mmY+S3uSpTWsmDKi6yrtGkQrhL9khRJgks5eYDvZwR0KvtrEsFafsu SQbDQRdVayZ5o3GLBQ2Fucs0VIlc96Sk24FbB5P47u2GeXBTkxPMKX5YyfziGXQDaIsc XGzs9bpx7w3DZ6IChi7K0w5u2IJQmbkSDmwMOBPkpl08hD35dM0IH9SsfqTmbSeRcaeA JQRA== X-Gm-Message-State: AOAM532jeQKdVh9rVNRjaSJ9t29pfA8EIEfPHL53cRccH/CvAVyIw4Sf PFuJY4LcTtswPyxKMlvt+o9E+QYmgRw= X-Google-Smtp-Source: ABdhPJwFZaIpuMim71EmjlmJzXLsvwdiIMJRWg8ShwWG7ZV6OGYu//R5ZZErBk9njmAxGAJoiHK5Ag== X-Received: by 2002:a05:6808:178b:b0:2cd:85b4:f217 with SMTP id bg11-20020a056808178b00b002cd85b4f217mr4315537oib.107.1645622412852; Wed, 23 Feb 2022 05:20:12 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 08/29] tests: add basic PowerNV8 test Date: Wed, 23 Feb 2022 10:19:31 -0300 Message-Id: <20220223131952.922228-9-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.3 X-loop: libvir-list@redhat.com Cc: 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.11 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622567393100005 We're now able to boot a simple PowerNV8 domain in libvirt. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- .../powernv8-basic.ppc64-latest.args | 33 +++++++++++++++++++ tests/qemuxml2argvdata/powernv8-basic.xml | 16 +++++++++ tests/qemuxml2argvtest.c | 2 ++ .../powernv8-basic.ppc64-latest.xml | 31 +++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 5 files changed, 84 insertions(+) create mode 100644 tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args create mode 100644 tests/qemuxml2argvdata/powernv8-basic.xml create mode 100644 tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml diff --git a/tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args b/test= s/qemuxml2argvdata/powernv8-basic.ppc64-latest.args new file mode 100644 index 0000000000..c9616ded13 --- /dev/null +++ b/tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args @@ -0,0 +1,33 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine powernv8,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpnv.ram= \ +-accel tcg \ +-cpu POWER8 \ +-m 2048 \ +-object '{"qom-type":"memory-backend-ram","id":"pnv.ram","size":2147483648= }' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid b20fcfe3-4a0a-4039-8735-9e024256e0f7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-usb \ +-chardev pty,id=3Dcharserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/powernv8-basic.xml b/tests/qemuxml2argv= data/powernv8-basic.xml new file mode 100644 index 0000000000..a92fc1282c --- /dev/null +++ b/tests/qemuxml2argvdata/powernv8-basic.xml @@ -0,0 +1,16 @@ + + QEMUGuest1 + b20fcfe3-4a0a-4039-8735-9e024256e0f7 + 2097152 + 1 + + hvm + + + /usr/bin/qemu-system-ppc64 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ce475df466..a4dcac4d95 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2175,6 +2175,8 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("seclabel-multiple"); DO_TEST_PARSE_ERROR_NOCAPS("seclabel-device-duplicates"); =20 + DO_TEST_CAPS_ARCH_LATEST("powernv8-basic", "ppc64"); + DO_TEST("pseries-basic", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_DEVICE_SPAPR_VTY); diff --git a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml b/tes= ts/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml new file mode 100644 index 0000000000..cb9b3cf86f --- /dev/null +++ b/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml @@ -0,0 +1,31 @@ + + QEMUGuest1 + b20fcfe3-4a0a-4039-8735-9e024256e0f7 + 2097152 + 2097152 + 1 + + hvm + + + + POWER8 + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 052950b86f..da55b3368f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -662,6 +662,8 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_EGD); DO_TEST_CAPS_LATEST("virtio-rng-builtin"); =20 + DO_TEST_CAPS_ARCH_LATEST("powernv8-basic", "ppc64"); + DO_TEST("pseries-nvram", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_DEVICE_NVRAM); --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 164562256983951.9212961688487; Wed, 23 Feb 2022 05:22:49 -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-295-UhpOtADIPQqqlmvyVGORWw-1; Wed, 23 Feb 2022 08:22:45 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 364D48145FF; Wed, 23 Feb 2022 13:22:39 +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 132BB7A525; Wed, 23 Feb 2022 13:22:39 +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 D42AB44A5F; Wed, 23 Feb 2022 13:22:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKGq8029728 for ; Wed, 23 Feb 2022 08:20:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9D886492D4F; Wed, 23 Feb 2022 13:20:16 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98FF1492D4D for ; Wed, 23 Feb 2022 13:20:16 +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 80A3A85A5BC for ; Wed, 23 Feb 2022 13:20:16 +0000 (UTC) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-532-d56dj2wAOj2bhksilFGfXw-2; Wed, 23 Feb 2022 08:20:14 -0500 Received: by mail-oi1-f179.google.com with SMTP id p15so18210018oip.3 for ; Wed, 23 Feb 2022 05:20:14 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:14 -0800 (PST) X-MC-Unique: UhpOtADIPQqqlmvyVGORWw-1 X-MC-Unique: d56dj2wAOj2bhksilFGfXw-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=0ZUwk/rhuWdncF1gCoT/4y6kzTIosA6ZxhlVjgx8Qls=; b=x15BESu+Y7x0JalPI5mF6Al6dkq9jKgTT9h/TsNfOPIyG6OLIFgGuTb8ZHipDQLZAl a60OFSiWG20yi4FvkedjytS2quC1JTeN/Ovsut3dkXROAfGcTWWEFz2jfccKTZ8bAKx0 ACZR7RiqLwfp7L4TgIs2iYNY6hrUtHgYDgi2FMYXgyApkoE2DWSU4K241AilH7M2pH/O 28wZS/WMQXUivPPHVXf9z6v8fC77I+DU50qzOreTmUKTdA9fX7cx2YwxQgNAFfqlVkf/ 60j+f658qo8ZMostN31/5sGa/kwIUwzcuPamIlkqEFZpsY4JhGkvR47wsjhvT5oqsjZ/ x/ow== X-Gm-Message-State: AOAM533XztgFynQkcv7HQG09myuSmv88E9CR4/UwZHVbbzk4NagHyJFD Z8gDCCCDy9CKLa+8LWpjok5aQ4mcT/4= X-Google-Smtp-Source: ABdhPJzPGMgkNMB3DAxquM6pg6zAsGeLR55MfqojdnOZYkYsEKt4qGDD29nszRYBBvX4Ad08lMu2Yg== X-Received: by 2002:a05:6808:1b27:b0:2d5:38fc:26f with SMTP id bx39-20020a0568081b2700b002d538fc026fmr4621389oib.42.1645622414384; Wed, 23 Feb 2022 05:20:14 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 09/29] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3 Date: Wed, 23 Feb 2022 10:19:32 -0300 Message-Id: <20220223131952.922228-10-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.9 X-loop: libvir-list@redhat.com Cc: 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.11 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622571436100003 QEMU_CAPS_DEVICE_PNV_PHB3 indicates binary support for the pnv-phb3 device, the pcie-root controller for PowerNV8 domains, and also the pnv-phb3-root-port device, its pcie-root-port device. This capability is present in QEMU since 5.0.0 but these devices are user-creatable only after QEMU 6.2.0. This means that probing it as default will be misleading for users. Instead, let's use virQEMUCapsInitQMPVersionCaps() to check for the adequate QEMU version and arch, clearing the capability if necessary. Suggested-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 11 +++++++++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + 6 files changed, 18 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 28e7820d0e..dbd9065a99 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -665,6 +665,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-mem-pci.prealloc", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PC= I_PREALLOC */ "calc-dirty-rate", /* QEMU_CAPS_CALC_DIRTY_RATE */ "dirtyrate-param.mode", /* QEMU_CAPS_DIRTYRATE_MODE */ + + /* 425 */ + "pnv-phb3", /* QEMU_CAPS_DEVICE_PNV_PHB3 */ ); =20 =20 @@ -1401,6 +1404,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-vga-gl", QEMU_CAPS_VIRTIO_VGA_GL }, { "s390-pv-guest", QEMU_CAPS_S390_PV_GUEST }, { "virtio-mem-pci", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, + { "pnv-phb3", QEMU_CAPS_DEVICE_PNV_PHB3 }, }; =20 =20 @@ -5243,6 +5247,13 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps) */ if (qemuCaps->version < 5002000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_ENABLE_FIPS); + + /* PowerNV pnv-phb devices weren't user creatable up to + * QEMU 6.2.0. The version value set here was taken from a + * binary post 6.2.0 release that has user creatable pnv-phb + * support. */ + if (qemuCaps->version <=3D 6002000 && ARCH_IS_PPC64(qemuCaps->arch)) + virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_PNV_PHB3); } =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index f6188b42de..47845fbc59 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -641,6 +641,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_CALC_DIRTY_RATE, /* accepts calc-dirty-rate */ QEMU_CAPS_DIRTYRATE_MODE , /* calc-dirty-rate accepts mode parameter */ =20 + /* 425 */ + QEMU_CAPS_DEVICE_PNV_PHB3, /* devices pnv-phb3 and pnv-phb3-root-port = */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index 070d0f2982..adaa13f6e1 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -186,6 +186,7 @@ + 5000000 0 42900241 diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index e050514fc1..4c3526f499 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -190,6 +190,7 @@ + 5002000 0 42900243 diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_6.2.0.ppc64.xml index 9fe9c27d14..7dfe86ba30 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -201,6 +201,7 @@ + 6002000 0 42900244 diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.0.0.ppc64.xml index 5d7f283a73..57c5ead7a4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -202,6 +202,7 @@ + 6002050 0 42900243 --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622590671490.10407481253935; Wed, 23 Feb 2022 05:23:10 -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-626-HiIzkJm-PfKZlRCNUIGJYA-1; Wed, 23 Feb 2022 08:23:06 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 116381006AAC; Wed, 23 Feb 2022 13:23:01 +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 DF3482B3C2; Wed, 23 Feb 2022 13:23:00 +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 AEF611807D7B; Wed, 23 Feb 2022 13:23:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKMHT029775 for ; Wed, 23 Feb 2022 08:20:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9B9432166B2D; Wed, 23 Feb 2022 13:20:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96BC52166B4C for ; Wed, 23 Feb 2022 13:20:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 253FD10726A6 for ; Wed, 23 Feb 2022 13:20:18 +0000 (UTC) Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-102-4YFmYTlGNIW9qU-SGXzy-g-2; Wed, 23 Feb 2022 08:20:16 -0500 Received: by mail-oo1-f45.google.com with SMTP id i10-20020a4aab0a000000b002fccf890d5fso22201698oon.5 for ; Wed, 23 Feb 2022 05:20:16 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:15 -0800 (PST) X-MC-Unique: HiIzkJm-PfKZlRCNUIGJYA-1 X-MC-Unique: 4YFmYTlGNIW9qU-SGXzy-g-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=sOKv028TgfHmN0MMZ9FinLLltTwr9Vvd43qMYScO75Q=; b=xz83sou+k98FQX6BELA7o4I1Gvd0JBxZYfp5mAAxYp55d1jchCYMYP4kvAEbViLP9Q 21pSQ7ecna0t4Eq1//L4YrI4rub6VKTbUIL9sRbpUBCDPKZGNu+X56SixaqJlAwh7yvq gp5W/fw2GsghN853v9TQiG2xc6MwMaJQLflhAAPqdy4nniti2kjXMRe007UN7ZXDT2CP nIZ/yZuRQT69HIJ0ocJZJlAtjbfbIU+GoPhMLoOHSJYbGVz1azJiDyk/8oARs2ABYvKX 6CZ/8QNVMui5S85U9A95TqQmYmtk0uecw2IEb5RSQd1krf4tpn3ey417QZ22K835SW4E ZsMA== X-Gm-Message-State: AOAM532CFMFRgNGv9Z6xQFXTD04JAhRcfdbfYsyduWBjUKDOUFLC3vn+ 1zG5kZVIEAwLK3xMAOSiNL1fqfyLTe0= X-Google-Smtp-Source: ABdhPJxyQNAEp481xIiCuZdSaDYOgI+BGsB/YxZHpfIVypNHIosasvC629A4Gzj6wRUE7KIEErtEpQ== X-Received: by 2002:a05:6870:a404:b0:cc:fa24:ca80 with SMTP id m4-20020a056870a40400b000ccfa24ca80mr3812012oal.215.1645622415898; Wed, 23 Feb 2022 05:20:15 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 10/29] conf, qemu: add 'pnv-phb3-root-port' PCI controller model name Date: Wed, 23 Feb 2022 10:19:33 -0300 Message-Id: <20220223131952.922228-11-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.6 X-loop: libvir-list@redhat.com Cc: 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.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622591515100025 Apart from being usable only with pnv-phb3 PCIE host bridges (to be added soon), this device acts as a regular pcie-root-port but with a specific model name. No doc changes in formatdomain.rst were made because the PCI model name isn't something that users are supposed to be setting or changing. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_domain_address.c | 5 +++++ src/qemu/qemu_validate.c | 12 +++++++++++- 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 964b0c9e2f..ad9432ea3d 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2602,6 +2602,7 @@ ioh3420 pcie-root-port + pnv-phb3-root-port x3130-upstream diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 34fec887a3..b4f13c4b98 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -438,6 +438,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName, "pcie-root-port", "spapr-pci-host-bridge", "pcie-pci-bridge", + "pnv-phb3-root-port", ); =20 VIR_ENUM_IMPL(virDomainControllerModelSCSI, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 9fcf842ee7..60be338541 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -646,6 +646,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDGE, + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT, =20 VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST } virDomainControllerPCIModelName; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index dd0680f57f..56491e04fe 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2421,6 +2421,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 ad8f0f94ff..37dcebaca3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3433,6 +3433,8 @@ virValidateControllerPCIModelNameToQEMUCaps(int model= Name) return QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDGE: return QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE; + case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT: + return QEMU_CAPS_DEVICE_PNV_PHB3; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE: return 0; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST: @@ -3600,10 +3602,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.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622586017939.3234870857972; Wed, 23 Feb 2022 05:23:06 -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-19-F3w-4-p2NvGE1ko5iyFaKg-1; Wed, 23 Feb 2022 08:23:01 -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 494881091DA4; Wed, 23 Feb 2022 13:22:55 +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 29ACE1064175; Wed, 23 Feb 2022 13:22:55 +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 EC20B55351; Wed, 23 Feb 2022 13:22:54 +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 21NDKKoc029746 for ; Wed, 23 Feb 2022 08:20:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 54BEC141DEF9; Wed, 23 Feb 2022 13:20:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 50CE7141DEC1 for ; Wed, 23 Feb 2022 13:20:20 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 37665800B24 for ; Wed, 23 Feb 2022 13:20:20 +0000 (UTC) Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-0V2NBe3dMpmQ6TtxMA3G4w-2; Wed, 23 Feb 2022 08:20:18 -0500 Received: by mail-oi1-f175.google.com with SMTP id k2so14431292oia.2 for ; Wed, 23 Feb 2022 05:20:17 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:17 -0800 (PST) X-MC-Unique: F3w-4-p2NvGE1ko5iyFaKg-1 X-MC-Unique: 0V2NBe3dMpmQ6TtxMA3G4w-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=LOU6TFUVLrgOxNiG7tm0hPbnPDPy7KRGp9Frwfi+tLc=; b=kYc2yz+Mektai8H3DAJUTNsAF/4LjW9JWQWohzY5UGDNQQ6VsJ1tQtcHuNVDy6EcBr 0xkknWlu6X+nSJ4mXGScyCzTshqd3V0p9eM1TMMZe1SvnUQgWzy7BNu9Nshc3ovdva/2 kEEDXg7zu9hJZRodPGkj/RhgUw22sI8IOkWN6XacuEMHe3WAhwyauCdLet1o+IFJtlwA m0Rct0Ip6NwqSd8ttaxW3XMSLpCsl3VwvvEVkOQ2ymMhY3U2NpHCq/QMjdipnx0H6sTv VbPfDRpcp9Ong5rNbLazjeHri7yCjCEd46XuYdp5qXar+4iWXoK4SC95gzuhfSN7982C hvZQ== X-Gm-Message-State: AOAM530pEooWyCxZiBdDZpcvApMLr3C7LX1Dwl01GCO4wVkYBTwtJxTg Nvzrh3Zw6M3KReAyjMfd0GYRntgOfLk= X-Google-Smtp-Source: ABdhPJxOYnX7wn8xtBcAXm22xzvkRTCkEHqd1cKVua+nn5Iw+evd2ERRzPPxuWKsOolnzDAF9IqmUg== X-Received: by 2002:aca:5c04:0:b0:2ce:6ee7:2cfc with SMTP id q4-20020aca5c04000000b002ce6ee72cfcmr4479997oib.298.1645622417307; Wed, 23 Feb 2022 05:20:17 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 11/29] conf, qemu: add 'pnv-phb3' PCI controller model name Date: Wed, 23 Feb 2022 10:19:34 -0300 Message-Id: <20220223131952.922228-12-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622587587100017 Add support for the pcie-root implementation that PowerNV8 domains uses, pnv-phb3. It consists of a PCI model name that isn't supposed to be changed by users, so no doc changes in formatdomain.rst were made. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- docs/schemas/domaincommon.rng | 2 ++ src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_domain_address.c | 3 +++ src/qemu/qemu_validate.c | 8 ++++++-- tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml | 4 +++- 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ad9432ea3d..f472055700 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2597,6 +2597,8 @@ pci-bridge i82801b11-bridge + + pnv-phb3 pcie-pci-bridge diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b4f13c4b98..06d1294797 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -439,6 +439,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName, "spapr-pci-host-bridge", "pcie-pci-bridge", "pnv-phb3-root-port", + "pnv-phb3", ); =20 VIR_ENUM_IMPL(virDomainControllerModelSCSI, diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 60be338541..6848b3a81f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -647,6 +647,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDGE, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT, + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3, =20 VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST } virDomainControllerPCIModelName; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 56491e04fe..fb0b74fa57 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2450,6 +2450,9 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainC= ontrollerDef *cont, *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_= HOST_BRIDGE; break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + if (qemuDomainIsPowerNV(def)) + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3; + break; case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: break; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 37dcebaca3..f15ac545b0 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3435,6 +3435,8 @@ virValidateControllerPCIModelNameToQEMUCaps(int model= Name) return QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT: return QEMU_CAPS_DEVICE_PNV_PHB3; + case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3: + return QEMU_CAPS_DEVICE_PNV_PHB3; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE: return 0; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST: @@ -3563,7 +3565,8 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, break; =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: - if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_N= ONE) { + if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_N= ONE && + !qemuDomainIsPowerNV(def)) { virReportControllerInvalidOption(cont, model, modelName, "mode= lName"); return -1; } @@ -3645,7 +3648,8 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, break; =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: - if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_N= ONE) { + if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_N= ONE && + !qemuDomainIsPowerNV(def)) { virReportControllerInvalidValue(cont, model, modelName, "model= Name"); return -1; } diff --git a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml b/tes= ts/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml index cb9b3cf86f..ebbc0653ca 100644 --- a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml +++ b/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml @@ -17,7 +17,9 @@ destroy /usr/bin/qemu-system-ppc64 - + + + --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622589469518.387451016272; Wed, 23 Feb 2022 05:23:09 -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-269-bBM40DPzP2K8Jpd6aUpBsA-1; Wed, 23 Feb 2022 08:23:05 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5DC331006AB0; Wed, 23 Feb 2022 13:22:58 +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 38E66838C5; Wed, 23 Feb 2022 13:22:58 +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 0B32A55353; Wed, 23 Feb 2022 13:22:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKLW6029767 for ; Wed, 23 Feb 2022 08:20:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9478441136ED; Wed, 23 Feb 2022 13:20:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 57EEB41136EB for ; Wed, 23 Feb 2022 13:20:21 +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 3FC632A8E467 for ; Wed, 23 Feb 2022 13:20:21 +0000 (UTC) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-T9XEI_zWPeiPov8fdsNPqw-1; Wed, 23 Feb 2022 08:20:19 -0500 Received: by mail-oi1-f180.google.com with SMTP id ay7so18173358oib.8 for ; Wed, 23 Feb 2022 05:20:19 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:18 -0800 (PST) X-MC-Unique: bBM40DPzP2K8Jpd6aUpBsA-1 X-MC-Unique: T9XEI_zWPeiPov8fdsNPqw-1 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=fNz2kuVa9G28GsqooTgXwv+u3YCnEJq5/tTSGz/EdNc=; b=drJOcG/wDSilIbWLSJbEdVUzuWOjfy2fK+IlLIsWmvBoJyeDxdGe+H2j4pjuvDvElW 5WAdwKbXe8XNn7+jqsSZyi0pJxjD0CjJRt+bxkdP391/5yKh7xFmMFiFl8KcG+G4n1g6 E6sIv4sthtnQu2CqzDD95dcZkn1Vfk0mC8/r2YkhedEU5iWiZ8nLZuXl4cr76hUMRG2i 28Ndf+SZ8LIraZUTI7IOIiLL4DNhQ6SGIyYQ+nB57NZ3qptgjY1F+oSG9VT12gVzZyJW vlTcGA3M1G0u3faPO6ctz83dbz8voozWW2cEHtGymWBoTeumxlHKSq7Tom1+jeQ5nfHT rpcQ== X-Gm-Message-State: AOAM531MZw9tnIcGmqGXjiu7Kt3H8Trxw9rvIkAIunplXfoXNtiBgWVb /2PD3Fp6Fh6p+q4o02FSglExChD1KqY= X-Google-Smtp-Source: ABdhPJyYpb9Vn/VA2UJGZ2pQ7dCYIPRWUABN/U/tKCqv87DKAqQLlK9VSvoTgkaUtP86jmDXTBOwRg== X-Received: by 2002:aca:1807:0:b0:2cf:216:3d5b with SMTP id h7-20020aca1807000000b002cf02163d5bmr4635758oih.18.1645622418682; Wed, 23 Feb 2022 05:20:18 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 12/29] domain_conf.c: fix identation in virDomainControllerDefParseXML() Date: Wed, 23 Feb 2022 10:19:35 -0300 Message-Id: <20220223131952.922228-13-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.1 X-loop: libvir-list@redhat.com Cc: 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622591526100026 The identation of VIR_DOMAIN_CONTROLLER_TYPE_PCI elements are in the same level as the parent 'if (def->type =3D=3D ...TYPE_PCI)' clause, and the closing bracket of this 'if' looks like a misplaced bracket of the 'targetIndex' clause that comes right before it. Reviewed-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 56 +++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 06d1294797..955bb36d9f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9571,40 +9571,40 @@ virDomainControllerDefParseXML(virDomainXMLOption *= xmlopt, ntargetNodes =3D virXPathNodeSet("./target", ctxt, &targetNodes); if (ntargetNodes =3D=3D 1) { if (def->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI) { - if (virXMLPropInt(targetNodes[0], "chassisNr", 0, VIR_XML_PROP_NON= E, - &def->opts.pciopts.chassisNr, - def->opts.pciopts.chassisNr) < 0) - return NULL; + if (virXMLPropInt(targetNodes[0], "chassisNr", 0, VIR_XML_PROP= _NONE, + &def->opts.pciopts.chassisNr, + def->opts.pciopts.chassisNr) < 0) + return NULL; =20 - if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_NONE, - &def->opts.pciopts.chassis, - def->opts.pciopts.chassis) < 0) - return NULL; + if (virXMLPropInt(targetNodes[0], "chassis", 0, VIR_XML_PROP_N= ONE, + &def->opts.pciopts.chassis, + def->opts.pciopts.chassis) < 0) + return NULL; =20 - if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE, - &def->opts.pciopts.port, - def->opts.pciopts.port) < 0) - return NULL; + if (virXMLPropInt(targetNodes[0], "port", 0, VIR_XML_PROP_NONE, + &def->opts.pciopts.port, + def->opts.pciopts.port) < 0) + return NULL; =20 - if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NONE, - &def->opts.pciopts.busNr, - def->opts.pciopts.busNr) < 0) - return NULL; + if (virXMLPropInt(targetNodes[0], "busNr", 0, VIR_XML_PROP_NON= E, + &def->opts.pciopts.busNr, + def->opts.pciopts.busNr) < 0) + return NULL; =20 - if (virXMLPropTristateSwitch(targetNodes[0], "hotplug", - VIR_XML_PROP_NONE, - &def->opts.pciopts.hotplug) < 0) - return NULL; + if (virXMLPropTristateSwitch(targetNodes[0], "hotplug", + VIR_XML_PROP_NONE, + &def->opts.pciopts.hotplug) < 0) + return NULL; =20 - if ((rc =3D virXMLPropInt(targetNodes[0], "index", 0, VIR_XML_PROP= _NONE, - &def->opts.pciopts.targetIndex, - def->opts.pciopts.targetIndex)) < 0) - return NULL; + if ((rc =3D virXMLPropInt(targetNodes[0], "index", 0, VIR_XML_= PROP_NONE, + &def->opts.pciopts.targetIndex, + def->opts.pciopts.targetIndex)) < 0) + return NULL; =20 - if ((rc =3D=3D 1) && def->opts.pciopts.targetIndex =3D=3D -1) - virReportError(VIR_ERR_XML_ERROR, - _("Invalid target index '%i' in PCI controller"= ), - def->opts.pciopts.targetIndex); + if ((rc =3D=3D 1) && def->opts.pciopts.targetIndex =3D=3D -1) + virReportError(VIR_ERR_XML_ERROR, + _("Invalid target index '%i' in PCI control= ler"), + def->opts.pciopts.targetIndex); } } else if (ntargetNodes > 1) { virReportError(VIR_ERR_XML_ERROR, "%s", --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622593760703.9568605941829; Wed, 23 Feb 2022 05:23:13 -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-386-5G-UFOyWMAuzbCYZFrcg3g-1; Wed, 23 Feb 2022 08:23:11 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B4D51883527; Wed, 23 Feb 2022 13:23:06 +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 E3A60838BC; Wed, 23 Feb 2022 13:23:05 +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 B5EFF55357; Wed, 23 Feb 2022 13:23:05 +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 21NDKPtx029783 for ; Wed, 23 Feb 2022 08:20:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id C44EF202660C; Wed, 23 Feb 2022 13:20:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE3692026990 for ; Wed, 23 Feb 2022 13:20:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 A7BED10726A4 for ; Wed, 23 Feb 2022 13:20:22 +0000 (UTC) Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-067w53F7MdyU2-Q-7mX9cg-1; Wed, 23 Feb 2022 08:20:21 -0500 Received: by mail-oo1-f48.google.com with SMTP id y15-20020a4a650f000000b0031c19e9fe9dso19234355ooc.12 for ; Wed, 23 Feb 2022 05:20:20 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:19 -0800 (PST) X-MC-Unique: 5G-UFOyWMAuzbCYZFrcg3g-1 X-MC-Unique: 067w53F7MdyU2-Q-7mX9cg-1 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=S7qQh4KKkYY2dAzzOyMVbH5gQ5dsELHNB89oAXOojCQ=; b=bLl5kHgMTl7M+GymTdJ5FOSpbd6x3DPT7TnUVF5A1TzMRAavxbv/hu0k0NeQDVn4YQ sgJCjI86YB13/HpP0KXdMZyI01V9F711FMWiLSVjgYhE1wA36wrHPDKSuRaUrPSfZRCF Sw7lnG+hITWDKXZQJebkLRvOc4WP/OZGyOoFAI8Ew9AgmSi7NQ8WUjvvj/sw4BJuGpQZ vTC1HNmVjKvPqDikzqfZJSk2IHjbgrKP6/53rodM62Iqfb0Am1DNxhrMmEpZ+bMs23bG +wae/bNGucvcsi9KX3Rfc2k3PhKOxh3/oPMQKfNpBx9DT3hRpaVj6jzToJl7h+MwPK+i ipuQ== X-Gm-Message-State: AOAM531IsYTkMkCY0LEvHb8HGauigqOMvO0e3HnRRtdvXsR3sPvb3ip3 gJhg6TMjmVVgFydsZSaK05y0tueBxcU= X-Google-Smtp-Source: ABdhPJwbvVWCD8OXgP3G+gfNVWbzaFF+mUCZ3+BQtgMRrjyndWqbF1702Psg9Z6lTf5b9j0xT0Mm5A== X-Received: by 2002:a05:6870:8c33:b0:ce:c0c9:6c3 with SMTP id ec51-20020a0568708c3300b000cec0c906c3mr3633107oab.277.1645622420094; Wed, 23 Feb 2022 05:20:20 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 13/29] conf: parse and format Date: Wed, 23 Feb 2022 10:19:36 -0300 Message-Id: <20220223131952.922228-14-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622595574100031 The 'chip-id' attribute indicates which chip/socket that owns the PowerNV pcie-root controller. Reviewed-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.rst | 6 ++++++ docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 15 +++++++++++++++ src/conf/domain_conf.h | 1 + 4 files changed, 27 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 9202cd3107..4693c22707 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3897,6 +3897,12 @@ generated by libvirt. :since:`Since 1.2.19 (QEMU onl= y).` ``index`` pci-root controllers for pSeries guests use this attribute to record the order they will show up in the guest. :since:`Since 3.6.0` +``chip-id`` + pcie-root controllers for ``powernv`` domains use this attribute to ind= icate + the chip that will own the controller. A chip is equivalent to a CPU so= cket. + E.g. a ``powernv`` domain with `` sockets=3D3`` will have 3 c= hips. + chip-id=3D0 refers to the first chip, chip-id=3D1 refers to the second = chip and + so on. :since:`Since 8.1.0` =20 For machine types which provide an implicit PCI bus, the pci-root controll= er with index=3D0 is auto-added and required to use PCI devices. pci-root has= no diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f472055700..d85290a164 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2655,6 +2655,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 955bb36d9f..44327e2abb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2385,6 +2385,7 @@ virDomainControllerDefNew(virDomainControllerType typ= e) def->opts.pciopts.busNr =3D -1; def->opts.pciopts.targetIndex =3D -1; def->opts.pciopts.numaNode =3D -1; + def->opts.pciopts.chipId =3D -1; break; case VIR_DOMAIN_CONTROLLER_TYPE_XENBUS: def->opts.xenbusopts.maxGrantFrames =3D -1; @@ -9605,6 +9606,16 @@ virDomainControllerDefParseXML(virDomainXMLOption *x= mlopt, virReportError(VIR_ERR_XML_ERROR, _("Invalid target index '%i' in PCI control= ler"), def->opts.pciopts.targetIndex); + + if ((rc =3D virXMLPropInt(targetNodes[0], "chip-id", 0, VIR_XM= L_PROP_NONE, + &def->opts.pciopts.chipId, + def->opts.pciopts.chipId)) < 0) + return NULL; + + if ((rc =3D=3D 1) && def->opts.pciopts.chipId =3D=3D -1) + virReportError(VIR_ERR_XML_ERROR, + _("Invalid target chip-id '%i' in PCI contr= oller"), + def->opts.pciopts.chipId); } } else if (ntargetNodes > 1) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -23843,6 +23854,7 @@ virDomainControllerDefFormat(virBuffer *buf, def->opts.pciopts.busNr !=3D -1 || def->opts.pciopts.targetIndex !=3D -1 || def->opts.pciopts.numaNode !=3D -1 || + def->opts.pciopts.chipId !=3D -1 || def->opts.pciopts.hotplug !=3D VIR_TRISTATE_SWITCH_ABSENT) { virBufferAddLit(&childBuf, "opts.pciopts.chassisNr !=3D -1) @@ -23860,6 +23872,9 @@ virDomainControllerDefFormat(virBuffer *buf, if (def->opts.pciopts.targetIndex !=3D -1) virBufferAsprintf(&childBuf, " index=3D'%d'", def->opts.pciopts.targetIndex); + if (def->opts.pciopts.chipId !=3D -1) + virBufferAsprintf(&childBuf, " chip-id=3D'%d'", + def->opts.pciopts.chipId); if (def->opts.pciopts.hotplug !=3D VIR_TRISTATE_SWITCH_ABSENT)= { virBufferAsprintf(&childBuf, " hotplug=3D'%s'", virTristateSwitchTypeToString(def->opts.= pciopts.hotplug)); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 6848b3a81f..7938c4aa19 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -751,6 +751,7 @@ struct _virDomainPCIControllerOpts { int port; int busNr; /* used by pci-expander-bus, -1 =3D=3D unspecified */ int targetIndex; /* used by spapr-pci-host-bridge, -1 =3D=3D unspecifi= ed */ + int chipId; /* used by powernv pcie-root controllers, -1 =3D=3D unspec= ified */ /* numaNode is a *subelement* of target (to match existing * item in memory target config) -1 =3D=3D unspecified */ --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622598583980.6189827347799; Wed, 23 Feb 2022 05:23:18 -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-77-46OGOctaOnaH88vnZdoWZw-1; Wed, 23 Feb 2022 08:23:14 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25FE91883528; Wed, 23 Feb 2022 13:23:09 +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 03ABE2B45E; Wed, 23 Feb 2022 13:23:09 +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 C7B051800062; Wed, 23 Feb 2022 13:23:08 +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 21NDKQlQ029788 for ; Wed, 23 Feb 2022 08:20:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 09BD72026D60; Wed, 23 Feb 2022 13:20:26 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE94620268FE for ; Wed, 23 Feb 2022 13:20:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 875D380005D for ; Wed, 23 Feb 2022 13:20:24 +0000 (UTC) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-346-e1_WUpFSPAeh8v-5lkq_qA-1; Wed, 23 Feb 2022 08:20:22 -0500 Received: by mail-oi1-f180.google.com with SMTP id y7so18208023oih.5 for ; Wed, 23 Feb 2022 05:20:22 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:21 -0800 (PST) X-MC-Unique: 46OGOctaOnaH88vnZdoWZw-1 X-MC-Unique: e1_WUpFSPAeh8v-5lkq_qA-1 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=WRqdt0QeAixFY/hFWswrF8WT3zToUkqC9bS0W89fRow=; b=MSsqGEx8XQyFtSibuSwKvfxpUqvYaqAhl5c2aWeMMl5ec5Yd8zP3HbqNl87rTPlF/q S62tvkQiHipRxYeZaKzlZ8wqb6/MuZQ7RHZ870aKWMQaPo0JwHvsy0AKpX26LsNN9Ln3 Sv02VN6iBGAMd/OSK4aOjUYmW+3CupVDQKrGPzu+jYuyfub5sXq7uaZ4pQ2gHAlOIhWE U2J7iVjgbqZlfJ6X111CugJRc1QEC5vYU9JsTUNqixUzU2HCl8G3SPV41JvL0co6mt3G o82JbXKia5v1gH/C+NpSBR/+ZVfu/qpyCey3ahNZx2XuAaDPrqOcsmEHV2I9kBpE/yhS t/Tg== X-Gm-Message-State: AOAM533xsjwhJWw4x7Kl9W0w9Sr9tQrTi6AyUTNqTrFWLvouyzdytS8b +/4nFVRZvwoTHsAvvrE5W54yBjLXqOA= X-Google-Smtp-Source: ABdhPJxS9DBa+GyUsRP8K3W6Yn3PIm2Dkf17DwjzGQ0LNwRpX1Yry9DMFkKmR1OxO4SZFFkmajyUnw== X-Received: by 2002:a05:6808:3ba:b0:2d4:c3de:64b6 with SMTP id n26-20020a05680803ba00b002d4c3de64b6mr4339493oie.328.1645622421564; Wed, 23 Feb 2022 05:20:21 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 14/29] formatdomain.rst: add 'index' semantics for PowerNV domains Date: Wed, 23 Feb 2022 10:19:37 -0300 Message-Id: <20220223131952.922228-15-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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.23 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: 1645622599585100001 Content-Type: text/plain; charset="utf-8" We're going to use the 'targetIndex' element for PowerNV PHBs. Clarify that the same attribute will have a different meaning in this context. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 4693c22707..e941e8e892 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3895,8 +3895,10 @@ generated by libvirt. :since:`Since 1.2.19 (QEMU onl= y).` the user of the libvirt API to attach host devices to the correct pci-expander-bus when assigning them to the domain). ``index`` - pci-root controllers for pSeries guests use this attribute to record the - order they will show up in the guest. :since:`Since 3.6.0` + pci-root controllers for ``pSeries`` guests use this attribute to recor= d the + order they will show up in the guest (:since:`Since 3.6.0`). :since:`Si= nce 8.1.0`, + ``powernv`` domains uses this attribute to indicate which slot inside t= he + chip the pcie-root controller will use. ``chip-id`` pcie-root controllers for ``powernv`` domains use this attribute to ind= icate the chip that will own the controller. A chip is equivalent to a CPU so= cket. --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622591828251.98310366856606; Wed, 23 Feb 2022 05:23:11 -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-16-KcYEpdgaO72tK5mMMCGd2A-1; Wed, 23 Feb 2022 08:23:08 -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 7CF391006AA9; Wed, 23 Feb 2022 13:23:03 +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 5DCE7106427B; Wed, 23 Feb 2022 13:23:03 +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 307741807D82; Wed, 23 Feb 2022 13:23:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKPKG029782 for ; Wed, 23 Feb 2022 08:20:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id A4822401DB1; Wed, 23 Feb 2022 13:20:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0A625361F9 for ; Wed, 23 Feb 2022 13:20:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 8866C3811F22 for ; Wed, 23 Feb 2022 13:20:25 +0000 (UTC) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-350-mUfLQotjO4-LAnxDkFU9Jw-1; Wed, 23 Feb 2022 08:20:23 -0500 Received: by mail-oi1-f181.google.com with SMTP id a6so18182813oid.9 for ; Wed, 23 Feb 2022 05:20:23 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:22 -0800 (PST) X-MC-Unique: KcYEpdgaO72tK5mMMCGd2A-1 X-MC-Unique: mUfLQotjO4-LAnxDkFU9Jw-1 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=BBDyqs0vcVLq5Mn5iUcEW/EPTT6CFCqzdpYgvO5op2s=; b=RE3++ba0u5HjU0fRq7GBKnG5DaZuYluURiKi8P/ZawUPzcg9/3aEWK0KFMTW6Nbmsp nUSTp+60kFOAWrKXktM7KOc5I7djZ7cCG+w8d91PjbvCa6UKqWpICb3AQjx6xb+fWXLY ShQswI9f2TFtiPVjmcqRpq3gEnkzHYiLaok2nUjpCEdB0uW9aRsc55PObSE5NzlBrlkx 3MLhxyTEo82rd/AsZi6k4ATCYvBltyteaoegu6RRrWaZaANjtJNxK5oEbelBgUMV6Z+o Y+hY2a3weQVvIihqpZXw9PW6EnTnmCExT41uYxHc/kF4ix9uD6eg0M0ITkhHibMfWxX2 7c+w== X-Gm-Message-State: AOAM531DYt9/4PWnPFbMQQ+lhZ6H2d6x7hzDdX06B0YIbH1sF+5feuj6 BMFyESjIU+ZLBaZZwYkYG4YVA3Cx+e0= X-Google-Smtp-Source: ABdhPJxzEmA8P4ahwVlqY1uB9Bbw2i+GKP/DUVPxe7N9p/BpexUIgyqTYdVgtGJfXHlKLWRgttfL4w== X-Received: by 2002:a05:6808:1642:b0:2d4:5a9a:c58b with SMTP id az2-20020a056808164200b002d45a9ac58bmr4609580oib.200.1645622422990; Wed, 23 Feb 2022 05:20:22 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 15/29] conf: introduce virDomainControllerIsPowerNVPHB Date: Wed, 23 Feb 2022 10:19:38 -0300 Message-Id: <20220223131952.922228-16-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.10 X-loop: libvir-list@redhat.com Cc: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622593564100029 Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 19 +++++++++++++++++++ src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 21 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 44327e2abb..f72045eb39 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2447,6 +2447,25 @@ virDomainControllerIsPSeriesPHB(const virDomainContr= ollerDef *cont) } =20 =20 +bool +virDomainControllerIsPowerNVPHB(const virDomainControllerDef *cont) +{ + virDomainControllerPCIModelName name; + + if (cont->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI || + cont->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) { + return false; + } + + name =3D cont->opts.pciopts.modelName; + + if (name !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3) + return false; + + return true; +} + + virDomainFSDef * virDomainFSDefNew(virDomainXMLOption *xmlopt) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 7938c4aa19..404289aa26 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3338,6 +3338,7 @@ virDomainControllerDef *virDomainControllerDefNew(vir= DomainControllerType type); void virDomainControllerDefFree(virDomainControllerDef *def); G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainControllerDef, virDomainControllerD= efFree); bool virDomainControllerIsPSeriesPHB(const virDomainControllerDef *cont); +bool virDomainControllerIsPowerNVPHB(const virDomainControllerDef *cont); =20 virDomainFSDef *virDomainFSDefNew(virDomainXMLOption *xmlopt); void virDomainFSDefFree(virDomainFSDef *def); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 6f0d72ca38..8bbecf2692 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -287,6 +287,7 @@ virDomainControllerFindByType; virDomainControllerFindUnusedIndex; virDomainControllerInsert; virDomainControllerInsertPreAlloced; +virDomainControllerIsPowerNVPHB; virDomainControllerIsPSeriesPHB; virDomainControllerModelIDETypeFromString; virDomainControllerModelIDETypeToString; --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622600636202.57875701717933; Wed, 23 Feb 2022 05:23:20 -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-383-qzQlfDHgOg6ssfjpgN4Miw-1; Wed, 23 Feb 2022 08:23:17 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DA7361883521; Wed, 23 Feb 2022 13:23:11 +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 ADFA47D87A; Wed, 23 Feb 2022 13:23:11 +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 7C9165535E; Wed, 23 Feb 2022 13:23:11 +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 21NDKQj3029798 for ; Wed, 23 Feb 2022 08:20:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id B1313202698A; Wed, 23 Feb 2022 13:20:26 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC6D62026D60 for ; Wed, 23 Feb 2022 13:20:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 94E10185A7A4 for ; Wed, 23 Feb 2022 13:20:26 +0000 (UTC) Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-F4rn07Q3PNWdia-kqS1EnQ-2; Wed, 23 Feb 2022 08:20:24 -0500 Received: by mail-oo1-f48.google.com with SMTP id y15-20020a4a650f000000b0031c19e9fe9dso19234355ooc.12 for ; Wed, 23 Feb 2022 05:20:24 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:24 -0800 (PST) X-MC-Unique: qzQlfDHgOg6ssfjpgN4Miw-1 X-MC-Unique: F4rn07Q3PNWdia-kqS1EnQ-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=/qL/O+GEV+gLaHvPos1CH9N6jnuWIh8kPEpXKLDWqVw=; b=TiFdLpofUutrRcsqck/t5JTXu7gIhzHBVJebLzCCvjRiKITuWWn8XWBA19XvxAnaqu +FsHKFZzyCEKiB76VFh+AAoHML6TWwdb7g38OrZs/Q3J18OtVpAHvv3qNxqjXjMsDn7H qW94DESmeeN5Doqf5wDj+GufTkh+F+0NIp2cXkJ2MhFbAhF28DtWue4SnMmZKmeHDTNy 50N5TxmkCM2DtH5wgaFb//EGyF4uOX5Gxyp/9sRAm3L6X8ZQgqC+lNmoTt+/qvLJcltT BBbwMmdeQnodm5GUkpqKQ1TYF6qNN0tnqLOn1oeuGKJ41jCw1CZ0Q/a2qQvwbZ5S8LNe l52g== X-Gm-Message-State: AOAM5324mpDy2TPq1BO7HVuy3+YBYA2pDudu+V7/bGyxeZtgBYAQd37q RsRTBmqx9g0OvIvXtKENX70KJrvI4bI= X-Google-Smtp-Source: ABdhPJwNHfWU2FhH3Dpn5yoQHz+b5KWJdLXFN+L9iktyCC/PbfwHsk0a2v+63se/2g5gnwD5285Gfg== X-Received: by 2002:a05:6870:b017:b0:ce:c0c9:673 with SMTP id y23-20020a056870b01700b000cec0c90673mr3564764oae.197.1645622424330; Wed, 23 Feb 2022 05:20:24 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 16/29] conf, qemu: add default 'chip-id' value for pnv-phb3 controllers Date: Wed, 23 Feb 2022 10:19:39 -0300 Message-Id: <20220223131952.922228-17-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622601607100003 If ommited from the controller definition, chip-id defaults to zero. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 16 +++++++++++++++- src/qemu/qemu_validate.c | 5 +++++ .../powernv8-basic.ppc64-latest.xml | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index fb0b74fa57..b72a9b7bf4 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2844,10 +2844,24 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, goto cleanup; } break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + if (!qemuDomainIsPowerNV(def)) + break; + + /* + * Default to chip-id =3D 0 since it's guaranteed that one= socket + * will always be present. + * + * chipId validation requires CPU topology information tha= t isn't + * available at this point and will be done later on. + */ + if (options->chipId =3D=3D -1) + options->chipId =3D 0; + + break; case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: - case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: break; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f15ac545b0..84a599d577 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3653,6 +3653,11 @@ qemuValidateDomainDeviceDefControllerPCI(const virDo= mainControllerDef *cont, virReportControllerInvalidValue(cont, model, modelName, "model= Name"); return -1; } + + if (pciopts->chipId !=3D -1 && !virDomainControllerIsPowerNVPHB(co= nt)) { + virReportControllerInvalidOption(cont, model, modelName, "chip= -id"); + return -1; + } break; =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: diff --git a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml b/tes= ts/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml index ebbc0653ca..28d86d7d9e 100644 --- a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml +++ b/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml @@ -19,6 +19,7 @@ /usr/bin/qemu-system-ppc64 + --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622569848342.6949174232632; Wed, 23 Feb 2022 05:22:49 -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-258-nSv5GN9_NUWPtrH1yKDQRA-1; Wed, 23 Feb 2022 08:22:46 -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 369A11006AB0; Wed, 23 Feb 2022 13:22:39 +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 1724684971; Wed, 23 Feb 2022 13:22:39 +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 DAE6B44A60; Wed, 23 Feb 2022 13:22:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKSS0029808 for ; Wed, 23 Feb 2022 08:20:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id A15A3400E135; Wed, 23 Feb 2022 13:20:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D778400EAD7 for ; Wed, 23 Feb 2022 13:20:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 85E483811F24 for ; Wed, 23 Feb 2022 13:20:28 +0000 (UTC) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-358-sQMNYnnGM92e4j0r3DrofA-1; Wed, 23 Feb 2022 08:20:26 -0500 Received: by mail-oi1-f174.google.com with SMTP id z7so2206561oid.4 for ; Wed, 23 Feb 2022 05:20:26 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:25 -0800 (PST) X-MC-Unique: nSv5GN9_NUWPtrH1yKDQRA-1 X-MC-Unique: sQMNYnnGM92e4j0r3DrofA-1 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=hOhiSUfLvZDu7wmnKYQnzuGd7iNzzSKEKA/zDKuxGok=; b=30buxO8OIirqNZjJynwkxvLhAI28KObKG8ncAddM67Im+8b+8NPpZsi05J87liCeGc OyvWjtTrIR03+2AojYimJnWHBi2dN2YsZSlg0YawSs0rx7Af1cTs9Z5ZS3NY0onEFHyy 5WmtpLau/NJV3GyTPErA3paJRAjvwttg+z8cn68VwuapvHTCaWMozbokw0IgtvIqLexr 8gC2uWxnNfROyDesaerof8A8peF4NO0VpW5Il4oO50C7oXr+R9RGgVuoWpp/F/LphV+S 08VqRMb1gqLy1OEbdvcRlegDzwUl9DjRk3vZb2/OdqWt6TOuOrZVVk0otpHZPMRQ1ICm mo+Q== X-Gm-Message-State: AOAM531Ewp8udPmxD3MEMmC3covbgsMavka92rtuocSluzZ2g+kAqBmG tRKtmAKJ8f1n8WQ0Qv4FvBYfXygQA4g= X-Google-Smtp-Source: ABdhPJywLJXcTFzzfYhU7SVDxOBwOuO1fF+n33Sy/5q0JHE+Tv49RqVQu194VbkdgDbc5YR+BiDN6A== X-Received: by 2002:a05:6808:ec9:b0:2d4:9028:f514 with SMTP id q9-20020a0568080ec900b002d49028f514mr4477136oiv.104.1645622425806; Wed, 23 Feb 2022 05:20:25 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 17/29] conf, qemu: add default 'targetIndex' value for pnv-phb3 devs Date: Wed, 23 Feb 2022 10:19:40 -0300 Message-Id: <20220223131952.922228-18-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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: 1645622571447100004 Content-Type: text/plain; charset="utf-8" As done with the 'chip-id' attribute, use zero as a default targetIndex value for pnv-phb3 devices in case it's absent from the controller definition. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 2 ++ src/qemu/qemu_validate.c | 19 ++++++++++++++++++- .../powernv8-basic.ppc64-latest.xml | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index b72a9b7bf4..d9dcea6581 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2858,6 +2858,8 @@ qemuDomainAssignPCIAddresses(virDomainDef *def, if (options->chipId =3D=3D -1) options->chipId =3D 0; =20 + if (options->targetIndex =3D=3D -1) + options->targetIndex =3D 0; break; case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 84a599d577..ad1deb9b56 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3737,6 +3737,24 @@ qemuValidateDomainDeviceDefControllerPCI(const virDo= mainControllerDef *cont, } break; =20 + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + /* PHBs for PowerNV domains must have a targetIndex */ + if (pciopts->targetIndex =3D=3D -1 && + virDomainControllerIsPowerNVPHB(cont)) { + virReportControllerMissingOption(cont, model, modelName, "targ= etIndex"); + return -1; + } + + /* + * targetIndex for pcie-root controllers only applies to + * PowerNV PHBs. + */ + if (pciopts->targetIndex !=3D -1 && + !virDomainControllerIsPowerNVPHB(cont)) { + virReportControllerInvalidOption(cont, model, modelName, "targ= etIndex"); + return -1; + } + break; case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: @@ -3744,7 +3762,6 @@ qemuValidateDomainDeviceDefControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: - case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->targetIndex !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "targ= etIndex"); diff --git a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml b/tes= ts/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml index 28d86d7d9e..bd22d85f6a 100644 --- a/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml +++ b/tests/qemuxml2xmloutdata/powernv8-basic.ppc64-latest.xml @@ -19,7 +19,7 @@ /usr/bin/qemu-system-ppc64 - + --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622572854516.234647378239; Wed, 23 Feb 2022 05:22:52 -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-460-UmHjN_PrOgmQUMU8ThaVaQ-1; Wed, 23 Feb 2022 08:22:50 -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 EF9C2814616; Wed, 23 Feb 2022 13:22:41 +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 D39FF105C873; Wed, 23 Feb 2022 13:22:41 +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 A53D51807D61; Wed, 23 Feb 2022 13:22:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKTDH029813 for ; Wed, 23 Feb 2022 08:20:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id A1DC440E80EC; Wed, 23 Feb 2022 13:20:29 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9CFD740E4308 for ; Wed, 23 Feb 2022 13:20:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.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 864F4802E5D for ; Wed, 23 Feb 2022 13:20:29 +0000 (UTC) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-358-qQQrf7pSMAqISWrcVLEZxg-2; Wed, 23 Feb 2022 08:20:27 -0500 Received: by mail-oi1-f174.google.com with SMTP id z7so2206561oid.4 for ; Wed, 23 Feb 2022 05:20:27 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:27 -0800 (PST) X-MC-Unique: UmHjN_PrOgmQUMU8ThaVaQ-1 X-MC-Unique: qQQrf7pSMAqISWrcVLEZxg-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=CW6edVqtn9n6Ofc2GAT1bHVdD8AOuQkLPB1qlv1A/zI=; b=55gb9T+90Lb0Z1IMeujQq/RUu1aaIpPs6flMqlsVTpvyO2ZFuVFK0WrheuEBLG6Tq7 GEYnLx+hu26IKKH1nelH2KEy1mzhVsPK0enJkEs/jgPzjgTZD++M60c1HDvWihg18rEq bqeONChZyMEoBTy+5mz2GBZ298T9ZKth9wsjbNlpJpS7nk5ie1SvV5X3JWITiYCdGfL7 58HBLaM8SREGafnhCv99yTyqEKhlZMyIheAynW7Kj3Uu5hzjdqjEcNCn2M3Bx55vy4+T gVuoMfgoOZ8eNO3QI+AY3GxSKWMuRfeNjK88Z3YIQYfGl079mMUaZRyLs10UZl5iuL5+ YJyA== X-Gm-Message-State: AOAM531ElwRFUNEEuHNN55um8vHqJVQssZfymyqrczM79nP3baEIX26H O73FgTSJ2XR7g3rpBClhSmRJOgvLLK8= X-Google-Smtp-Source: ABdhPJzMLejKXR7YEBxxXJjqbjDftB2F3elZdMqbIPbAQ3A8PGIRKuHmzTa4t7X6Mu1ApYrgFTyeMA== X-Received: by 2002:a05:6808:30a3:b0:2d5:2019:97ac with SMTP id bl35-20020a05680830a300b002d5201997acmr4306399oib.40.1645622427302; Wed, 23 Feb 2022 05:20:27 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 18/29] qemu_command.c: add command line for the pnv-phb3 device Date: Wed, 23 Feb 2022 10:19:41 -0300 Message-Id: <20220223131952.922228-19-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622573467100008 The command line for the pnv-phb3 device is similar to the spapr-pci-host-bridge command line but adding the extra 'chip-id' attribute. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 21 +++++++++++++++++-- .../powernv8-basic.ppc64-latest.args | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c836799888..5710fba0d9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3135,6 +3135,22 @@ qemuBuildControllerPCIDevProps(virDomainControllerDe= f *def, =20 break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + if (!virDomainControllerIsPowerNVPHB(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Unsupported PCI Express root controller")); + return -1; + } + + if (virJSONValueObjectAdd(&props, + "s:driver", modelName, + "i:index", pciopts->targetIndex, + "i:chip-id", pciopts->chipId, + "s:id", def->info.alias, + NULL) < 0) + return -1; + + break; + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Unsupported PCI Express root controller")); return -1; @@ -3322,8 +3338,9 @@ static bool qemuBuildSkipController(const virDomainControllerDef *controller, const virDomainDef *def) { - /* skip pcie-root */ - if (controller->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI && + /* skip pcie-root for non PowerVM domains */ + if (!qemuDomainIsPowerNV(def) && + controller->type =3D=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI && controller->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) return true; =20 diff --git a/tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args b/test= s/qemuxml2argvdata/powernv8-basic.ppc64-latest.args index c9616ded13..224e2adba8 100644 --- a/tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args +++ b/tests/qemuxml2argvdata/powernv8-basic.ppc64-latest.args @@ -26,6 +26,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ +-device '{"driver":"pnv-phb3","index":0,"chip-id":0,"id":"pcie.0"}' \ -usb \ -chardev pty,id=3Dcharserial0 \ -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622573662107.54180604343162; Wed, 23 Feb 2022 05:22:53 -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-349-puWl6smFOjqr_IbUMVTTug-1; Wed, 23 Feb 2022 08:22:51 -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 DDB2E814615; Wed, 23 Feb 2022 13:22:41 +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 C1F4884976; Wed, 23 Feb 2022 13:22:41 +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 9387344A64; Wed, 23 Feb 2022 13:22:41 +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 21NDKVJq029818 for ; Wed, 23 Feb 2022 08:20:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2EADC202698A; Wed, 23 Feb 2022 13:20:31 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A30E2026D60 for ; Wed, 23 Feb 2022 13:20:31 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 122BD19705A7 for ; Wed, 23 Feb 2022 13:20:31 +0000 (UTC) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-358-imH1eyLFP4O6gl_WjpDhNA-3; Wed, 23 Feb 2022 08:20:29 -0500 Received: by mail-oi1-f174.google.com with SMTP id z7so2206561oid.4 for ; Wed, 23 Feb 2022 05:20:29 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:28 -0800 (PST) X-MC-Unique: puWl6smFOjqr_IbUMVTTug-1 X-MC-Unique: imH1eyLFP4O6gl_WjpDhNA-3 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=ONl87+t1ytwY052giVjk0MGKkAoHsTGPjj3NlgrYUuU=; b=J/C09tcjUk/CQyKRc+2XWVIljwDbh/84GEui0bYYrMyUGok7bTaNElJkwSi542PX2A SDzTCwnRwNM3lqXHVMoQFjX8DMaVrvzi78QibZS3kUczaC7NoT9s6kfU1tPHwn/Wd1wv MJ8sMuu5HDC1jzfduv9fQJi5SVx0a5Du06VyWBBYTshxjPiWTsdoDn1G4HUgz4dqcQuK LOvvuR+uYGclVUCiGREKOVuhJX8wLKY+J0gl9PB1Vdx/bUUupli+paT37nN3h8X+wpQV 6B8cxi4FL4Wqli6/NFvR6JASFccBRxqA9hj+8RvcC3TOaKWEOBUpZJ3mH6sk9iDP8und Vy3w== X-Gm-Message-State: AOAM5312VcOM8H3EfQ+8pLDNhZvKlO7Z5wnOcvvUXmAbm5/OlvyTstK1 a5hgDdtDXU8jDP+H2B1krsG21mGovF0= X-Google-Smtp-Source: ABdhPJw6KXYwBmMI+rQ4pfaXbq6+Zy7goOBmddQ8J8220wNPzFMlFrQRf+o2LEQmm+fZ6HuVTUqYsg== X-Received: by 2002:a05:6808:3091:b0:2d4:c180:d586 with SMTP id bl17-20020a056808309100b002d4c180d586mr4475569oib.120.1645622428786; Wed, 23 Feb 2022 05:20:28 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 19/29] qemu_domain_address.c: change pnv-phb3 minimal downstream slot Date: Wed, 23 Feb 2022 10:19:42 -0300 Message-Id: <20220223131952.922228-20-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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: 1645622575445100011 Content-Type: text/plain; charset="utf-8" The PowerNV PHB3 bus has minimal slot zero. In fact, at this moment, the root complex accepts only a single device, at slot 0x0, due to firmware limitations. The single device restriction is subject to change in upstream QEMU and it's not worth adding this limitation to Libvirt. However, the minimal slot presents a problem. When setting a pnv-phb3-root-port address with slot=3D0x0, Libvirt changes it to 0x1. This happens because the pnv-phb3 controller is a PCIE_ROOT model, and this model is being set with 'bus->minSlot=3D1' in domain_addr.c, virDomainPCIAddressBusSetModel(). This means that the root-port is launched with 'addr=3D0x1' in the QEMU command line and it's not usable by the domain. It is not worth to create a new controller model, replicating all the already existing logic for PCIE_ROOT controllers, just to have a similar PCIE_ROOT bus with minSlots=3D0. Changing the existing PCIE_ROOT min slot t= o 0 doesn't make sense either - we would change existing behavior of existing devices. This patch works around this situation by adding a verification in qemuDomainPCIAddressSetCreate() to change the minBus values of the pnv-phb3 devices right before virDomainDeviceInfoIterate(). This is enough to allow for a root port to be added in slot 0 of a pnv-phb3 bus while not being intrusive with existing devices. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_domain_address.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index d9dcea6581..d75b175f82 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1629,6 +1629,17 @@ qemuDomainCollectPCIAddressExtension(virDomainDef *d= ef G_GNUC_UNUSED, return virDomainPCIAddressExtensionReserveAddr(addrs, addr); } =20 +static void +qemuDomainTunePowerNVPhbBuses(virDomainPCIAddressSet *addrs) +{ + size_t i; + + for (i =3D 0; i < addrs->nbuses; i++) { + if (addrs->buses[i].model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_= ROOT) + addrs->buses[i].minSlot =3D 0; + } +} + static virDomainPCIAddressSet * qemuDomainPCIAddressSetCreate(virDomainDef *def, virQEMUCaps *qemuCaps, @@ -1721,6 +1732,9 @@ qemuDomainPCIAddressSetCreate(virDomainDef *def, virDomainControllerModelPCITypeToString(defaultModel), i= ); } =20 + if (qemuDomainIsPowerNV(def)) + qemuDomainTunePowerNVPhbBuses(addrs); + if (virDomainDeviceInfoIterate(def, qemuDomainCollectPCIAddress, addrs= ) < 0) goto error; =20 --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622602091414.42555090055225; Wed, 23 Feb 2022 05:23:22 -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-92-IbcPXFGrNcqIGjuWyDHeIA-1; Wed, 23 Feb 2022 08:23:19 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C9431091DA3; Wed, 23 Feb 2022 13:23:14 +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 1968E832B0; Wed, 23 Feb 2022 13:23: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 DD24F57DE6; Wed, 23 Feb 2022 13:23:13 +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 21NDKXg1029828 for ; Wed, 23 Feb 2022 08:20:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 05DA1140240C; Wed, 23 Feb 2022 13:20:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0158E140240B for ; Wed, 23 Feb 2022 13:20:32 +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 DE521802A6A for ; Wed, 23 Feb 2022 13:20:32 +0000 (UTC) Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-182-eZlX-wmCNq-qECJgUtHNaQ-1; Wed, 23 Feb 2022 08:20:31 -0500 Received: by mail-oo1-f42.google.com with SMTP id x6-20020a4a4106000000b003193022319cso22219966ooa.4 for ; Wed, 23 Feb 2022 05:20:30 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:30 -0800 (PST) X-MC-Unique: IbcPXFGrNcqIGjuWyDHeIA-1 X-MC-Unique: eZlX-wmCNq-qECJgUtHNaQ-1 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=Ecd2+LIH0fca0tJkKoPlYIaqtrMQXOlSZRLVkm4M2K4=; b=4MMZ0hWvG09loTeT550lWpkMF04qwyIpQt2DDbkNhiVhvTCASbf4NwgShd4P0rqvDf KtQ+EXzYaeAiyE7u4H5eYt3hBrm7XTkuwcbFYbZtLwfMfgmoVBm45btAAcp0ld5xTLU9 oc3J2AwD3cdg5rXtUHx3Ta2thCkIwrnD0AglbY6pdsbKJQnRv0Mfliip8r5HtoElt+IN nNdzBMu+MYK60hgkF80c1iZcov/bPew77ZMyyZaTftyqlWvwRyvFBr6zsZehkf7zNqPg enxhJOC1D2wems6qRVplqMmfk63/XKrrTPDztD9nxdxSmhB/HVKvPmex0EGp8nxHr+7v xQcw== X-Gm-Message-State: AOAM532YK07sj8JJZGbfNKdEur97uF1UhLa3FwfunbL00ERFc+86tioG oTtwwy/UaGFKWQS3u/OHd47DF7Cr6K8= X-Google-Smtp-Source: ABdhPJygqDuQCcaoyy22dwSJAR30jO0Z/HNrl3OhCHXmzBKp0t8Ii7DTXJDFv2S5IU9gbXrn/ngr/g== X-Received: by 2002:a05:6870:b4aa:b0:d2:3f48:62b4 with SMTP id y42-20020a056870b4aa00b000d23f4862b4mr3820740oap.56.1645622430267; Wed, 23 Feb 2022 05:20:30 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 20/29] domain_conf: always format pnv-phb3-root-port address Date: Wed, 23 Feb 2022 10:19:43 -0300 Message-Id: <20220223131952.922228-21-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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: 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.15 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: 1645622603696100001 Content-Type: text/plain; charset="utf-8" pnv-phb3-root-ports can use an all zeroed address (0000:00:0.0) as a way of connecting to a PHB3 bus that has index 0. Today, these addresses aren't being displayed in the domain XML due to the use of virPCIDeviceAddressIsEmpty() inside virDomainDeviceInfoFormat(), where 0000:00:0.0 is considered an empty address and thus not displayed, regardless of the user manually adding
in the domain XML. Changing virPCIDeviceAddressIsEmpty() to recognize the difference between an user adding a zeroed address by hand, versus all the other current cases in which this function is used (e.g. to check whether an address should be assigned or not), is not trivial and will change a lot of existing, working code, to accomodate a niche case of a new device we want to add. Instead, this patch adds a new VIR_DOMAIN_DEF_FORMAT_PCI_ADDR_ALWAYS flag to be used by virDomainDefFormatFlags that will allow for an
element to always be formatted regardless of virPCIDeviceAddressIsEmpty() mechanics/semantics. Then we use this flag when formatting pnv-phb3-root-port devices. Signed-off-by: Daniel Henrique Barboza --- src/conf/domain_conf.c | 25 ++++++++++++++++++++++++- src/conf/domain_conf.h | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f72045eb39..625949e44e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2466,6 +2466,25 @@ virDomainControllerIsPowerNVPHB(const virDomainContr= ollerDef *cont) } =20 =20 +static bool +virDomainControllerIsPowerNVRootPort(const virDomainControllerDef *cont) +{ + virDomainControllerPCIModelName name; + + if (cont->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_PCI || + cont->model !=3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT) { + return false; + } + + name =3D cont->opts.pciopts.modelName; + + if (name !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_ROOT_PORT) + return false; + + return true; +} + + virDomainFSDef * virDomainFSDefNew(virDomainXMLOption *xmlopt) { @@ -6509,7 +6528,8 @@ virDomainDeviceInfoFormat(virBuffer *buf, =20 switch ((virDomainDeviceAddressType) info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: - if (!virPCIDeviceAddressIsEmpty(&info->addr.pci)) { + if (!virPCIDeviceAddressIsEmpty(&info->addr.pci) || + flags & VIR_DOMAIN_DEF_FORMAT_PCI_ADDR_ALWAYS) { virBufferAsprintf(&attrBuf, " domain=3D'0x%04x' bus=3D'0x%02x'= " "slot=3D'0x%02x' function=3D'0x%d'", info->addr.pci.domain, @@ -23911,6 +23931,9 @@ virDomainControllerDefFormat(virBuffer *buf, } } =20 + if (virDomainControllerIsPowerNVRootPort(def)) + flags |=3D VIR_DOMAIN_DEF_FORMAT_PCI_ADDR_ALWAYS; + virDomainControllerDriverFormat(&childBuf, def); =20 virDomainDeviceInfoFormat(&childBuf, &def->info, flags); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 404289aa26..835b8111e0 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3508,6 +3508,8 @@ typedef enum { VIR_DOMAIN_DEF_FORMAT_ALLOW_ROM =3D 1 << 6, VIR_DOMAIN_DEF_FORMAT_ALLOW_BOOT =3D 1 << 7, VIR_DOMAIN_DEF_FORMAT_CLOCK_ADJUST =3D 1 << 8, + /* always format the PCI address */ + VIR_DOMAIN_DEF_FORMAT_PCI_ADDR_ALWAYS =3D 1 << 9, } virDomainDefFormatFlags; =20 /* Use these flags to skip specific domain ABI consistency checks done --=20 2.35.1 From nobody Mon May 13 05:20:47 2024 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 1645622608132352.2923600784327; Wed, 23 Feb 2022 05:23:28 -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-550-VKTNJFMBMFyF9zz7Htbq9A-1; Wed, 23 Feb 2022 08:23:22 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5317F1091DA2; Wed, 23 Feb 2022 13:23:17 +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 312727D874; Wed, 23 Feb 2022 13:23:17 +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 035103F5DC; Wed, 23 Feb 2022 13:23:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21NDKYP4029837 for ; Wed, 23 Feb 2022 08:20:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 425C2400E136; Wed, 23 Feb 2022 13:20:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DC57400E135 for ; Wed, 23 Feb 2022 13:20:34 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (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 26DDB185A7A4 for ; Wed, 23 Feb 2022 13:20:34 +0000 (UTC) Received: from mail-oo1-f44.google.com (mail-oo1-f44.google.com [209.85.161.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-381-lyKSoBEGNSmquRod3fKfsw-1; Wed, 23 Feb 2022 08:20:32 -0500 Received: by mail-oo1-f44.google.com with SMTP id r41-20020a4a966c000000b0031bf85a4124so22206545ooi.0 for ; Wed, 23 Feb 2022 05:20:32 -0800 (PST) Received: from rekt.ibmuc.com ([191.193.99.92]) by smtp.gmail.com with ESMTPSA id a4sm27646154oaa.42.2022.02.23.05.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 05:20:31 -0800 (PST) X-MC-Unique: VKTNJFMBMFyF9zz7Htbq9A-1 X-MC-Unique: lyKSoBEGNSmquRod3fKfsw-1 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=yyZhQMXFtqelqN85l/H9QEvhj+GjEFuTXTbQ0xn6vuA=; b=zuNLMgyLPpRu47sHvwnJUgJsxEV4mImX3L6Lx1JHKXj7PBIH7EnJ5JRM2pONLzm2FO 2P5lI549bZvIgIB5Uq0aqSd+yWWNKL08BlrYoHFJdNxWXJtYoZUp1hY+IQ1YHAocrl8j 2uMOO/R6JxYh6rc7NacT7YTYY2pdmyItiQyx0GI8peSbYfNv+4Ns2snDoHk5bP8SkbZD kQF6m8CqZldcEKFNtXK9AEZZSf2E140ySUIW8Nuk+zi1PD1KM9U7PGzyMutXyQ6aRwhr IM2B8TOebSlF1NhUpiirI4T007fiSFt54lsIUDu+N82u0iOCgwvaksWuhFEMMOCFe7BL pzow== X-Gm-Message-State: AOAM532RxVTwkU0iiUZ/+OG7ge5SHJMcSBC9lzVCD2WLFLMhQZI3Bqvy 6RGx71BY76zVJbhmFalFFwokd7j15po= X-Google-Smtp-Source: ABdhPJzBDe0zceUBv/MtQGRPPGYH38gIRfFDLbG+A6WkM3hJm+sDwKtesmD3zGOKpE4V38nE578Rvw== X-Received: by 2002:a05:6871:28b:b0:d6:c279:7a6d with SMTP id i11-20020a056871028b00b000d6c2797a6dmr383457oae.21.1645622431596; Wed, 23 Feb 2022 05:20:31 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v3 21/29] tests: add pnv-phb3-root-port test Date: Wed, 23 Feb 2022 10:19:44 -0300 Message-Id: <20220223131952.922228-22-danielhb413@gmail.com> In-Reply-To: <20220223131952.922228-1-danielhb413@gmail.com> References: <20220223131952.922228-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.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1645622609722100001 Reviewed-by: J=C3=A1n Tomko Signed-off-by: Daniel Henrique Barboza --- .../powernv8-root-port.ppc64-latest.args | 35 +++++++++++++++++ tests/qemuxml2argvdata/powernv8-root-port.xml | 17 ++++++++ tests/qemuxml2argvtest.c | 1 + .../powernv8-root-port.ppc64-latest.xml | 39 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 93 insertions(+) create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.= args create mode 100644 tests/qemuxml2argvdata/powernv8-root-port.xml create mode 100644 tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-lates= t.xml diff --git a/tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args b/= tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args new file mode 100644 index 0000000000..b32e49c54e --- /dev/null +++ b/tests/qemuxml2argvdata/powernv8-root-port.ppc64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine powernv8,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpnv.ram= \ +-accel tcg \ +-cpu POWER8 \ +-m 2048 \ +-object '{"qom-type":"memory-backend-ram","id":"pnv.ram","size":2147483648= }' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid b20fcfe3-4a0a-4039-8735-9e024256e0f7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"pnv-phb3","index":0,"chip-id":0,"id":"pcie.0"}' \ +-device '{"driver":"pnv-phb3-root-port","port":0,"chassis":1,"id":"pci.1",= "bus":"pcie.0","addr":"0x0"}' \ +-usb \ +-chardev pty,id=3Dcharserial0 \ +-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/powernv8-root-port.xml b/tests/qemuxml2= argvdata/powernv8-root-port.xml new file mode 100644 index 0000000000..1acb37222d --- /dev/null +++ b/tests/qemuxml2argvdata/powernv8-root-port.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + b20fcfe3-4a0a-4039-8735-9e024256e0f7 + 2097152 + 1 + + hvm + + + /usr/bin/qemu-system-ppc64 + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a4dcac4d95..2da767e2bc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2176,6 +2176,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("seclabel-device-duplicates"); =20 DO_TEST_CAPS_ARCH_LATEST("powernv8-basic", "ppc64"); + DO_TEST_CAPS_ARCH_LATEST("powernv8-root-port", "ppc64"); =20 DO_TEST("pseries-basic", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, diff --git a/tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml b= /tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml new file mode 100644 index 0000000000..a24154c47f --- /dev/null +++ b/tests/qemuxml2xmloutdata/powernv8-root-port.ppc64-latest.xml @@ -0,0 +1,39 @@ + + QEMUGuest1 + b20fcfe3-4a0a-4039-8735-9e024256e0f7 + 2097152 + 2097152 + 1 + + hvm + + + + POWER8 + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + +
+ + + + + + + + + +