From nobody Tue May 7 01:32:22 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 1643143790294840.7114864463509; Tue, 25 Jan 2022 12:49:50 -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-502-wSsbRTD2POWc-1HRMZFbBA-1; Tue, 25 Jan 2022 15:49:47 -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 F09461006AA0; Tue, 25 Jan 2022 20:49: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 8C3A34D734; Tue, 25 Jan 2022 20:49: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 15D904BB7C; Tue, 25 Jan 2022 20:49:41 +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 20PKndWj024173 for ; Tue, 25 Jan 2022 15:49:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 913DE4328D7; Tue, 25 Jan 2022 20:49:38 +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 8D6BF401E83 for ; Tue, 25 Jan 2022 20:49:38 +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 E7C9E181944E for ; Tue, 25 Jan 2022 20:49:31 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-388-7L6IeStlMbqF_X35mUWI5A-1; Tue, 25 Jan 2022 15:49:19 -0500 Received: by mail-oi1-f169.google.com with SMTP id q186so33517398oih.8 for ; Tue, 25 Jan 2022 12:49:19 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:18 -0800 (PST) X-MC-Unique: wSsbRTD2POWc-1HRMZFbBA-1 X-MC-Unique: 7L6IeStlMbqF_X35mUWI5A-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=K1rJqDCefxj67B/UltcRkGUw/C5T6o9nddHQcIWFIlI=; b=KXwCX8ao6zFzM2YevPLXahubwwWRfWjU+1DPRY//5RVvh5GtWQvHIMxzC2UDl2ZZ8B 4IlBQZsAPZNPn66otn/Q2GzTD0ioL0GfuvMvyZqhd+DyeKvucTD8QeJ6AyRJSMS9mmr+ ELgQpZE2qzG4I5opSNdzNZm89WTwk//7Ww0nPXCZQyeAWPrCyJnMs7A315DRW3nS4K28 od4Ji7hD23oB2XFpoubLoXN+BUmQeIFW4LPDpuMyiDzi/jPxk0lEYr/Aet3Mafr9vvzc 7EGinnDZEOJ6l2XOCAljgR8XWPGoUn7+HvrcqbN/DvGkMINUV1jj2G5H+x3Y2Pjz+1q8 Vjjw== X-Gm-Message-State: AOAM530vx/GOceAq/BDMgdDUhx7yKT4Cd71t/jMlzumlJKDQDtWJ7+FR bmy7OrD8gEsu4d3SJIMp5CW3BSgYy+Y= X-Google-Smtp-Source: ABdhPJzfYA4rrUF2w0yqA3jzlj5uJFvB/m5W4GePMF80igvsdYZTSvJt5YFoAPnmUldkHUEHhcSzzA== X-Received: by 2002:aca:4b0e:: with SMTP id y14mr1620044oia.297.1643143758411; Tue, 25 Jan 2022 12:49:18 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 01/29] qemu_domain.c: add PowerNV machine helpers Date: Tue, 25 Jan 2022 17:48:34 -0300 Message-Id: <20220125204902.772350-2-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143791576100003 Content-Type: text/plain; charset="utf-8" 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: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 41 +++++++++++++++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 4 ++++ 2 files changed, 45 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index aa8f6b8d05..2e21a95f38 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8719,6 +8719,47 @@ qemuDomainIsPSeries(const virDomainDef *def) } =20 =20 +/* + * The PowerNV machine does not support KVM acceleration in Power + * hosts. We can skip the usual ARCH_IS_PPC64() since this machine + * is usable with TCG in all host archs. + */ +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 qemuDomainHasPCIRoot(const virDomainDef *def) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index e5046367e3..d07a279a1b 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -761,6 +761,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 @@ -770,6 +772,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 qemuDomainHasPCIRoot(const virDomainDef *def); bool qemuDomainHasPCIeRoot(const virDomainDef *def); bool qemuDomainHasBuiltinIDE(const virDomainDef *def); --=20 2.34.1 From nobody Tue May 7 01:32:22 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 1643143811965965.8235902152646; Tue, 25 Jan 2022 12:50: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-133-iUeylPshMGKZNZS54oxWxg-1; Tue, 25 Jan 2022 15:50:06 -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 7912A1006AAB; Tue, 25 Jan 2022 20:49:55 +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 5A9FD101F6D4; Tue, 25 Jan 2022 20:49: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 036C21806D03; Tue, 25 Jan 2022 20:49:55 +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 20PKnjUN024219 for ; Tue, 25 Jan 2022 15:49:45 -0500 Received: by smtp.corp.redhat.com (Postfix) id E0EE3401E79; Tue, 25 Jan 2022 20:49:43 +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 DD392401E2C for ; Tue, 25 Jan 2022 20:49:43 +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 665F138183CD for ; Tue, 25 Jan 2022 20:49:32 +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-27-xxy13os0PuucWEJoqwU1Cg-1; Tue, 25 Jan 2022 15:49:20 -0500 Received: by mail-oi1-f181.google.com with SMTP id w133so6682825oie.7 for ; Tue, 25 Jan 2022 12:49:20 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:19 -0800 (PST) X-MC-Unique: iUeylPshMGKZNZS54oxWxg-1 X-MC-Unique: xxy13os0PuucWEJoqwU1Cg-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=ZL40ayAoFncih236zOUiOPS/VupkmxTkKaAEvXjMELM=; b=Nj0HjG1uW3TcvMo/0Vi/Z2fzXn8YwIg8gCY5DuKcWE/blJRzQitN85v/33Di98Hj0F 6ky9atV1eD2bqSTmaG3FGd10ZzU648wvg9Qc6xZR8jfMlMjgjQHA06moTrG7UJKf9HO/ K6mvUUgIKh6R4hroQfIySbgiiXeSnMTkryf+dBBpEMjP55D2g36ahPKBZg1aZXnlFIxj 1eI9hjQ0KiANX79s7CHLPxMEA2NdbDOKTZJjF9rZr3ORHlT2IEHJktIOjD1LJP7St2Iq LqDKF2M2kk6YMvln5MmmYbdKRXvKFBdKFeofqE243/5z5UrlBCGN1tupCN8uDm0ePwtv R5xA== X-Gm-Message-State: AOAM533H+gVAeUphe74AKdwxkQUML3LBcNWP6gP36L99HtzRlBodi4Nk jtQ1PyoulZymIl0RAEueacQC1X5Y0fw= X-Google-Smtp-Source: ABdhPJzJzRl4zI8SrapI5DjzOkyrs3nFooWS3WblXmWyHTuTs2EiwvVlh/BqkSfAMT0FA9QewNiJig== X-Received: by 2002:a05:6808:d4f:: with SMTP id w15mr1788955oik.62.1643143759793; Tue, 25 Jan 2022 12:49:19 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 02/29] qemu_capabilities.c: use 'MachineIsPowerPC' in DeviceDiskCaps Date: Tue, 25 Jan 2022 17:48:35 -0300 Message-Id: <20220125204902.772350-3-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143813594100001 Content-Type: text/plain; charset="utf-8" Both pSeries and PowerNV machines don't have floppy device support. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 dae9d1163d..bb90715569 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6178,8 +6178,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.34.1 From nobody Tue May 7 01:32:22 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 1643143792116522.2198336062621; Tue, 25 Jan 2022 12:49: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-618-r-vuwONtOYmb3sLRN8gfxg-1; Tue, 25 Jan 2022 15:49:47 -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 58DDD83DEA7; Tue, 25 Jan 2022 20:49:42 +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 339534D731; Tue, 25 Jan 2022 20:49:42 +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 04D764CA9B; Tue, 25 Jan 2022 20:49:42 +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 20PKneoc024184 for ; Tue, 25 Jan 2022 15:49:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id AB2A240885AE; Tue, 25 Jan 2022 20:49:40 +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 A63CA40885C9 for ; Tue, 25 Jan 2022 20:49:40 +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 27FCB80B711 for ; Tue, 25 Jan 2022 20:49:34 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-611-LAmclxJkNXSx86Vzr3ZfIw-1; Tue, 25 Jan 2022 15:49:22 -0500 Received: by mail-oi1-f182.google.com with SMTP id m9so19042815oia.12 for ; Tue, 25 Jan 2022 12:49:22 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:21 -0800 (PST) X-MC-Unique: r-vuwONtOYmb3sLRN8gfxg-1 X-MC-Unique: LAmclxJkNXSx86Vzr3ZfIw-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=ARNHAalZ868QN3qxI1pdY4iGGSVL8VdzTAcwePTCXnY=; b=mwHQTI5OlH9QP/cU2tULuo3A8tBrhuIdxGY3DM+qeTEasbvW0MxT9yH4W8aEqpyCL3 K8h3ZEF2h+IkDGMRtUfHHq2506r6FWmFbhp+HRlQ1a8avvQu0rB8KYGmkzD7akH1Tdop AgCIgPZ/kJi9LTG4VnU9Z+F2ZV1MDTAa7dJSMLrK6uWJINzi2TkmllT4KxQ7nng/Uo/i gZIfGRDaV9Xx4pT/sowDpBs1o940+vViRm7UMPLL7gKm5ik35GtTNW1HpLjB9viODunt 2AwH1BjUgzXX60PyIo4YkwWPW8XvoXMXzfGV3rJGPcOg0HG8kHnmW8wwVIRnnxjBPcn5 QFWg== X-Gm-Message-State: AOAM533UXQ3CEUG59ahDcYqM9pg4Bkca3YA0BjNw4Z5pn1TW4j7s103h oI6kQxcoWHEbnXTiGav56+cfAGnc+hA= X-Google-Smtp-Source: ABdhPJxHgvlPI6dTMLThlDUGDzs8UdGw4eKzR3Nnr4POcce+v8kU872vQ3FsB8i9O0CEjdZo9ZdlrQ== X-Received: by 2002:a05:6808:200f:: with SMTP id q15mr949060oiw.104.1643143761387; Tue, 25 Jan 2022 12:49:21 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 03/29] qemu_domain: turn qemuDomainMachineIsPSeries() static Date: Tue, 25 Jan 2022 17:48:36 -0300 Message-Id: <20220125204902.772350-4-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143793825100001 Content-Type: text/plain; charset="utf-8" The function is now unused outside of qemu_domain.c. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 2e21a95f38..98a6a2657d 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8631,7 +8631,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 d07a279a1b..fe4420bf83 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -759,8 +759,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.34.1 From nobody Tue May 7 01:32:22 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 164314380037843.046815102623896; Tue, 25 Jan 2022 12:50:00 -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-615-juBWoQzHMCuJyCf4tojtCQ-1; Tue, 25 Jan 2022 15:49:56 -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 51ED48144E3; Tue, 25 Jan 2022 20:49: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 2F36DB18BB; Tue, 25 Jan 2022 20:49: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 F15C518077BC; Tue, 25 Jan 2022 20:49:49 +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 20PKnehx024181 for ; Tue, 25 Jan 2022 15:49:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9754C401E83; Tue, 25 Jan 2022 20:49:38 +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 93E4C401E2D for ; Tue, 25 Jan 2022 20:49:37 +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 3DE6438183C0 for ; Tue, 25 Jan 2022 20:49:25 +0000 (UTC) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-30eEhexyNIyIqwHrxYB7CA-2; Tue, 25 Jan 2022 15:49:23 -0500 Received: by mail-ot1-f54.google.com with SMTP id z25-20020a0568301db900b005946f536d85so27594212oti.9 for ; Tue, 25 Jan 2022 12:49:22 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:22 -0800 (PST) X-MC-Unique: juBWoQzHMCuJyCf4tojtCQ-1 X-MC-Unique: 30eEhexyNIyIqwHrxYB7CA-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=8BCHlGipdX2+LYMV8RrJgDk/MjJjYoUp8shXNiVGE4c=; b=L6EILoUs2Bs7AJsfJk6FSWFKrD4Y0bVA3yAe1T9vflDgsQiDPXv3e411UczGt+vJox LIet8kTDIEWW4KQbdbhvIs1o5G6/7719i2Eqox0pfFgRRGNGLEKVR0SIY8Yl16pgBsVb b4cmy8jN5ycixY4uipv87ydLcgLjMyma20H+6mFZgm3V2JUt+yz5AOWIwJViYMVv7luR 4FDnaGhJN+Bn0vxi7QxaK3NgNG7WWCPGeAnhd4RBUqgEP42AnJCA0NKutBSXRQ/uXcri 1peOYTOezk6GqGavSkr2AgIIEp/Ov6faL71TCHJUzn5L7+EYtgJEFVk25meNJRlvSb6i fRcQ== X-Gm-Message-State: AOAM532piYHv3KJ5xb/5fvbpn4R7PpRlTCTxILXClssVKoMQhnzcbFlp yi/cSoYpVWy4fUOB+WlUOZHRbRvhfjA= X-Google-Smtp-Source: ABdhPJxethw2yT3xd+1jtwNPghVxlR6xBbZJyqXPuxO8SMhCdOwqSvsrZLHampGnYvsg5D4wVRqhPg== X-Received: by 2002:a05:6830:1389:: with SMTP id d9mr6671191otq.287.1643143762655; Tue, 25 Jan 2022 12:49:22 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 04/29] qemu_validate.c: use qemuDomainIsPowerPC() in qemuValidateDomainChrDef() Date: Tue, 25 Jan 2022 17:48:37 -0300 Message-Id: <20220125204902.772350-5-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143803266100001 Content-Type: text/plain; charset="utf-8" Both PowerNV and pSeries machines don't support parallel ports. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 0a879f0115..8453413b3c 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -2007,7 +2007,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.34.1 From nobody Tue May 7 01:32:22 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 1643143807917569.6166135312642; Tue, 25 Jan 2022 12:50:07 -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-562--au8zYMdNsepzCt8ASMdwg-1; Tue, 25 Jan 2022 15:49:58 -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 BBF278144E5; Tue, 25 Jan 2022 20:49: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 9CF941017E36; Tue, 25 Jan 2022 20:49: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 6AF274A706; Tue, 25 Jan 2022 20:49:52 +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 20PKnf3N024193 for ; Tue, 25 Jan 2022 15:49:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4CA4D401E2D; Tue, 25 Jan 2022 20:49:39 +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 48EAC401E8D for ; Tue, 25 Jan 2022 20:49:39 +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 69E3485A5BF for ; Tue, 25 Jan 2022 20:49:27 +0000 (UTC) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-448-NzRyGVe1PwuuPUqdFMIkKg-1; Tue, 25 Jan 2022 15:49:25 -0500 Received: by mail-oi1-f173.google.com with SMTP id g205so33488664oif.5 for ; Tue, 25 Jan 2022 12:49:25 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:24 -0800 (PST) X-MC-Unique: -au8zYMdNsepzCt8ASMdwg-1 X-MC-Unique: NzRyGVe1PwuuPUqdFMIkKg-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=kUjwLWNK6bvCle4uH2dSwJIQfqYbHHLfj1h1BxnMNDE=; b=cj2zbQmzeWBfO80HCzqd9551hicsx2groDPHLxXVkd3g60+bnU3QrvTHRFTjGmnHeI DeFMeBWkCXOrvQJY5F1qNdOwS4IhRDkYTfX+w34md1zNNBY8bcUxYQBYz0CqhiNPJPIB CAxtOjApi0tcfh5YiSUp6BmVucs3ZS/LCzPse10NFayxxkVEWDYHhNBMXURT8LhmMcqJ LfH/BV7kOWVeB9vd/ti9WsXkyFbxDZx0afKXHlvoPFNzqLlQyb3HY/cLXBupoLSgCNzW b9Qa+PtwF7rYNAbtjDWBlQc3Dy2lwWlGxRi/9Czt7+qRhk4Btl6MDycaKMcekVoD431u 4oOg== X-Gm-Message-State: AOAM532HA1+P6Cl4YmdYn6QGfdA/nQkjM/GVxiEk9ST7TdSZimFSDo1+ rZsa8rmXYozF55OTTwF17bURhJ6R5FY= X-Google-Smtp-Source: ABdhPJzZSPUPjEfcXKGQJiGGD0nnsKA/gDBTRRxg+wAowvP2FbjhJFLKhztTG2+JyYsW7ALm45QfwQ== X-Received: by 2002:a05:6808:309f:: with SMTP id bl31mr1734854oib.228.1643143764292; Tue, 25 Jan 2022 12:49:24 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 05/29] qemu_domain.c: define ISA as default PowerNV serial Date: Tue, 25 Jan 2022 17:48:38 -0300 Message-Id: <20220125204902.772350-6-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143810797100002 Content-Type: text/plain; charset="utf-8" The PowerNV machines uses ISA as the default serial type. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 98a6a2657d..1b4b293388 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5167,6 +5167,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.34.1 From nobody Tue May 7 01:32:22 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 1643143798714261.49549381132226; Tue, 25 Jan 2022 12:49: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-544-hDsuRR1gNCWQ7AoEUxf6sw-1; Tue, 25 Jan 2022 15:49:56 -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 E43348144E6; Tue, 25 Jan 2022 20:49: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 C07D945D93; Tue, 25 Jan 2022 20:49: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 90E7C180BAAE; Tue, 25 Jan 2022 20:49:50 +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 20PKnhRW024209 for ; Tue, 25 Jan 2022 15:49:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id C225F401E80; Tue, 25 Jan 2022 20:49:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE38C401E2C for ; Tue, 25 Jan 2022 20:49:41 +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 AC2388117B4 for ; Tue, 25 Jan 2022 20:49:38 +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-568-aSD1Ss6tOgOrbSnCXwHfCA-1; Tue, 25 Jan 2022 15:49:26 -0500 Received: by mail-oi1-f179.google.com with SMTP id s127so33544375oig.2 for ; Tue, 25 Jan 2022 12:49:26 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:25 -0800 (PST) X-MC-Unique: hDsuRR1gNCWQ7AoEUxf6sw-1 X-MC-Unique: aSD1Ss6tOgOrbSnCXwHfCA-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=FDKE7u8serF24STTRFdzOch9cnIPLZReIWC/vrSTQoA=; b=vpZIvHPxgsul2BDF/tMzJTFZ5wSChjQtHjyG6se/TqlvllVAfc4e4sjHqZyYGlQAit if/MCRkXdwDkln38x0ZXCtthOonGiSk5Q4wDNcblqjEgT1OLiQlOSEL5fc8xZKmwmkNM 7ziRedf/SyBTUY3fXBkCagi2JzMenpdK/Bju05F6worYDuXpkIsp2htbC8LKv0gGy5Cv M1cmPRIRUXYjG/PymcuPPht2erEhWjxYg7g0VpKE4XcGPQ+vIJjNNxhKZWPmlngEcVU/ wIPA9Rs1s6NlnZ5EXoH+87XZVfEOOv4Sswkkn17vPI/pCoRS+kKtWr/RoG7oZDwkQ7t6 39sQ== X-Gm-Message-State: AOAM533IzVremKSdo7aPK4RG1zmOWl6XFwGu4ik7M9QxN6yftc3eN5l8 4WOnjn57IyKEV/gLA0gr15WkZbQ0aSo= X-Google-Smtp-Source: ABdhPJwnwp1KArK3WEma7li6nQ2KA3AGLuLe4IRvJvFl+da358IYp8Ti77c7NnSKdxIlg26B/p7ksQ== X-Received: by 2002:a05:6808:230f:: with SMTP id bn15mr1745980oib.95.1643143765736; Tue, 25 Jan 2022 12:49:25 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 06/29] qemu_validate.c: enhance 'machine type not supported' message Date: Tue, 25 Jan 2022 17:48:39 -0300 Message-Id: <20220125204902.772350-7-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143800956100003 Content-Type: text/plain; charset="utf-8" Add 'virt type' to allow for an easier time debugging. 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 8453413b3c..aa686246f5 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.34.1 From nobody Tue May 7 01:32:22 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 16431438096141012.0726556914805; Tue, 25 Jan 2022 12:50: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-180-rDY6QomFNg6byt-HhFt7ng-1; Tue, 25 Jan 2022 15:50:05 -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 49FAE1006AAF; Tue, 25 Jan 2022 20:49: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 29C3ECB846; Tue, 25 Jan 2022 20:49: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 F14D44A70B; Tue, 25 Jan 2022 20:49:57 +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 20PKnr0j024259 for ; Tue, 25 Jan 2022 15:49:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id ECB20C33AE5; Tue, 25 Jan 2022 20:49:51 +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 E8DA1C27FD9 for ; Tue, 25 Jan 2022 20:49:51 +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 435B380B717 for ; Tue, 25 Jan 2022 20:49:40 +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-438-zR1Pd77VNkCo2POMyx_2xA-1; Tue, 25 Jan 2022 15:49:28 -0500 Received: by mail-oi1-f175.google.com with SMTP id y23so15194207oia.13 for ; Tue, 25 Jan 2022 12:49:28 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:27 -0800 (PST) X-MC-Unique: rDY6QomFNg6byt-HhFt7ng-1 X-MC-Unique: zR1Pd77VNkCo2POMyx_2xA-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=Gy1Y4zSeSwEvFylu6eUxJC08qT7mDNBXKLenh+vhr8E=; b=uRIEmMnVvEtUufEHEwf1gNamJw0E9lvHAyym68LOcPfSi5utWYtRYT4dh3hXGMKXj+ nCwP7PrJJBJDJkdPDwwLUJ00WNg2bIdGWeTt45Kl4dJrbfyPD5z9EtzWu9RigHb71RYg n8VNV8uTD1QFr/mh2RVe1n5e4xYfTk0i/w31p9KU2PsmRR7WWnVxB3AYr4FE75mayR/z u/Z/7Y+gL9fPNtOv0ulMS7Xs0hsiF8UGWQ49lZS0KE7751pNlhmDsM+QSHYArAsMjp8z F/n7daNlkALbBGXNvyfFDwcw25vwRdKyJcGi6Gnk7BWJ8jzChe3YfGqaBIZNfuUQJwBy KrAw== X-Gm-Message-State: AOAM530UMFtok7I7/JPjdWbNSx/HSTM+8gBbtxdg3DLaYwq5HtCknw5z SdwoEEvVgrfoO2POaz1KqMOegx8+yvE= X-Google-Smtp-Source: ABdhPJwZT+V6I0iael9m0w8532pDdiyrE9rSIkHl18aWD0UeUz68oIRcCy4VRRcFrYDgUKxNpuYhXA== X-Received: by 2002:a05:6808:128c:: with SMTP id a12mr1894927oiw.318.1643143767313; Tue, 25 Jan 2022 12:49:27 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 07/29] qemu_domain.c: disable default devices for PowerNV machines Date: Tue, 25 Jan 2022 17:48:40 -0300 Message-Id: <20220125204902.772350-8-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143811282100005 Content-Type: text/plain; charset="utf-8" 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: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 1b4b293388..89dbc20eee 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3670,6 +3670,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.34.1 From nobody Tue May 7 01:32:22 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 1643143798603839.5043240241922; Tue, 25 Jan 2022 12:49: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-355-gh1LL-M_MjSXzAxmFubFJA-1; Tue, 25 Jan 2022 15:49:56 -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 ABEDE51083; Tue, 25 Jan 2022 20:49:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44337CB838; Tue, 25 Jan 2022 20:49: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 05BB84A7CB; Tue, 25 Jan 2022 20:49:50 +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 20PKnm23024237 for ; Tue, 25 Jan 2022 15:49:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9016D1120AC6; Tue, 25 Jan 2022 20:49:47 +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 8BFD21120AC4 for ; Tue, 25 Jan 2022 20:49:44 +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 C54BD2B69A02 for ; Tue, 25 Jan 2022 20:49:36 +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-25-1U5sRQt9Nx2VRdFx5lbyng-1; Tue, 25 Jan 2022 15:49:29 -0500 Received: by mail-ot1-f45.google.com with SMTP id x52-20020a05683040b400b0059ea92202daso11724690ott.7 for ; Tue, 25 Jan 2022 12:49:29 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:28 -0800 (PST) X-MC-Unique: gh1LL-M_MjSXzAxmFubFJA-1 X-MC-Unique: 1U5sRQt9Nx2VRdFx5lbyng-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=9JLwn349GxSbqIDlTrpxPIj5PFTtRvHH4uionIXJzoo=; b=tISOuJZWA4A3wDp35yyi9OA7wMEPkM8leLjnWPHP5fqP7oiax8OK3cBI0/yltEEQcq uBlXB+Bh4GDr7HN0DvYKlnneq+Ru9Lbxs+lxFIJpV1hnyDpwvOf/fm10nOo8rlSrX7w4 +youWVTfdzDF83zZwb9PHxsw/TkLXSWw+QUWvxIkqQtZpb9JLfUNqefSjFpHFpRt+sIx IAPpk3pIZZ5WBRI08co+DHhFO2YvmGGEiduiCHxwoxpDXonpsgCKOs9v5wYuRIPakkDx 667VOl2tciLFWIOnxFD5AVR/KTmhBkUn5GkMrgokOTGcDqNlkmdHugdj3alnik0EnQCs opYw== X-Gm-Message-State: AOAM533b5iiKFUXGbTMjHrL7VQss9NU/5g/yjlu8usshEJfRVjOlBy4Y YIkCMbVGnPLu+Ksl6xboG6dHjZkpQRM= X-Google-Smtp-Source: ABdhPJwO4/YwV0GdPnKTG0r0Luw1XII+D81ZalA2OmZiCvyNKDcv6Vxt2VPE8dcKc5/yv7uoL3CdIA== X-Received: by 2002:a05:6830:3109:: with SMTP id b9mr16422186ots.12.1643143768824; Tue, 25 Jan 2022 12:49:28 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 08/29] tests: add basic PowerNV8 test Date: Tue, 25 Jan 2022 17:48:41 -0300 Message-Id: <20220125204902.772350-9-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143800832100001 Content-Type: text/plain; charset="utf-8" We're now able to boot a simple PowerNV8 domain in Libvirt. 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 96d30f2475..de5582a52c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2242,6 +2242,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 935fd955f4..1815d9ac1d 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.34.1 From nobody Tue May 7 01:32:22 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 1643143809846379.7568711206537; Tue, 25 Jan 2022 12:50: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-382-GwYyjYO_PPmw0m0bkgqRlg-1; Tue, 25 Jan 2022 15:50:06 -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 E6F6B18982A1; Tue, 25 Jan 2022 20:49:59 +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 C776C10114AE; Tue, 25 Jan 2022 20:49:59 +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 9A89F4A70F; Tue, 25 Jan 2022 20:49:59 +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 20PKnv0F024292 for ; Tue, 25 Jan 2022 15:49:57 -0500 Received: by smtp.corp.redhat.com (Postfix) id 80498C27FD9; Tue, 25 Jan 2022 20:49:55 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C710C35992 for ; Tue, 25 Jan 2022 20:49:54 +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 5877A8117B4 for ; Tue, 25 Jan 2022 20:49:42 +0000 (UTC) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-isePe6e8P3m0xJkokNvz3w-3; Tue, 25 Jan 2022 15:49:30 -0500 Received: by mail-ot1-f54.google.com with SMTP id z25-20020a0568301db900b005946f536d85so27594212oti.9 for ; Tue, 25 Jan 2022 12:49:30 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:30 -0800 (PST) X-MC-Unique: GwYyjYO_PPmw0m0bkgqRlg-1 X-MC-Unique: isePe6e8P3m0xJkokNvz3w-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=u7T39eAoQUnfJNnHs7lb0DgpocBzH+rOuEfhETgJb9s=; b=G88DLR6UIciUTg5+g2XYG0+du2gPvZZaYZISbWlyxt6Kblm9BPrXCWIPUIddMRJL07 T6Bw4+uhm/b3nmbKfd8lSd4HbxxWLl+/3gf6IilJbH5OIMv38XYmpZiKvHGytZAFdSJU tqapq9sXn00s/zd6Yfz/wXHVqr+vBwobjJGgvjlpQGor1dpBLRTB/N15tBkn52pGOGUX IWRtb0Wro/kgaE+qs+XiDdgRjvjbCdMnsNvYEgEJe3eHQikhmppHiDSmbYOXhMvVwGky okClNySdnbr3WvwVFpNGsJwXwQX4k7Q8+uut9d8YP49Xbyqq5y+PBxkcyyqWJ4EfYMIT 50Hw== X-Gm-Message-State: AOAM53223PzSJZiCihPoJWQC5gcZtXGxPTLVqarHjpS/hlkT8yiMfjdV SLlngMPe9+oIQwHHS6nDpphfnWSmgQc= X-Google-Smtp-Source: ABdhPJz5cgpKE3j8bJDXD7Llij4NNnAjtjXkCpqc3f1pv8avACk5Uhja+IWCfchtm67I2u6ZDyYo3Q== X-Received: by 2002:a05:6830:4389:: with SMTP id s9mr15920273otv.59.1643143770210; Tue, 25 Jan 2022 12:49:30 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 09/29] qemu: introduce QEMU_CAPS_DEVICE_PNV_PHB3 Date: Tue, 25 Jan 2022 17:48:42 -0300 Message-Id: <20220125204902.772350-10-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143811321100006 Content-Type: text/plain; charset="utf-8" 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 and set it manually. Suggested-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 19 +++++++++++++++++++ src/qemu/qemu_capabilities.h | 1 + .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 + 3 files changed, 21 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index bb90715569..d60240912c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -662,6 +662,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 420 */ "device.json+hotplug", /* QEMU_CAPS_DEVICE_JSON */ "hvf", /* QEMU_CAPS_HVF */ + "pnv-phb3", /* QEMU_CAPS_DEVICE_PNV_PHB3 */ ); =20 =20 @@ -1397,6 +1398,17 @@ 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 }, + /* + * We don't probe the following PowerNV devices: + * + * { "pnv-phb3", QEMU_CAPS_DEVICE_PNV_PHB3 }, + * { "pnv-phb3-root-port", QEMU_CAPS_DEVICE_PNV_PHB3 }, + * + * Because they are present in QEMU binaries since QEMU 5.0.0 + * but became user creatable only in the QEMU 7.0.0 development + * cycle. Their respective capabilities are being set in + * virQEMUCapsInitQMPVersionCaps(). + */ }; =20 =20 @@ -5231,6 +5243,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 6002050 && ARCH_IS_PPC64(qemuCaps->arch)) + virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_PNV_PHB3); } =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c6fb87a73a..ed3973c0ba 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -637,6 +637,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 420 */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON (and works with hot-unp= lug) */ QEMU_CAPS_HVF, /* Whether Hypervisor.framework is available */ + QEMU_CAPS_DEVICE_PNV_PHB3, /* devices pnv-phb3 and pnv-phb3-root-port = */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.0.0.ppc64.xml index 88eee87587..cb6c146a28 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -200,6 +200,7 @@ + 6002050 0 42900243 --=20 2.34.1 From nobody Tue May 7 01:32:22 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 1643143812043907.8389604097246; Tue, 25 Jan 2022 12:50:12 -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-312-xEM2nD-JP5eLqyaCvmz5BA-1; Tue, 25 Jan 2022 15:50:09 -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 E55AC51097; Tue, 25 Jan 2022 20:50:00 +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 C6A0D4697B; Tue, 25 Jan 2022 20:50: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 97F824A713; Tue, 25 Jan 2022 20:50:00 +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 20PKnsQx024269 for ; Tue, 25 Jan 2022 15:49:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 90DAC7AC7; Tue, 25 Jan 2022 20:49:53 +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 8BF157AC4 for ; Tue, 25 Jan 2022 20:49:49 +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 ED0A5104456F for ; Tue, 25 Jan 2022 20:49:43 +0000 (UTC) Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-448-zFy1GNRlPtWAg99hkOsbJg-2; Tue, 25 Jan 2022 15:49:32 -0500 Received: by mail-oi1-f173.google.com with SMTP id g205so33488664oif.5 for ; Tue, 25 Jan 2022 12:49:31 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:31 -0800 (PST) X-MC-Unique: xEM2nD-JP5eLqyaCvmz5BA-1 X-MC-Unique: zFy1GNRlPtWAg99hkOsbJg-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=J6bvwY6A+aiUxwfK/f+NW2zngps5kC53XUbwObtSYJ8=; b=hEsmB7MOB7mmfjWGswp7DrZ8AWW70i6EsBT31+eCH3x7unWUGxsipKgRuV9UmH1iPi JVn328DkUJIHCTDMGVBHIHT7KCSlQuhdQOHz5KIgCA670YwO7o1v973R68y1gGf/f5LC WkADsdZkSsPea+D9VMezBzBmGJwmV71PbcAuVoroir5GGYAG5f43Waq1hsjGyaS3Rtm3 cNP0FLvqXZ3+dQ5ICq09p7jSzAJnRmclO7wOYRs2s5nlNKhJ5/8LlmNCQE36K844iNDO +j7pwApwScYYgZvEzJCHY61Pl/yoEfyv2RU90I/KJOpRbg38owraGDzTPK00zp4y9zSe rPxg== X-Gm-Message-State: AOAM533MPKcURLb3Asc8mBVzC+omH+JcpHAzVUBnS9BLdUvc80PFOco4 BEkbmgDTo0q6NY5BmvRNIxoPugLd/L0= X-Google-Smtp-Source: ABdhPJxINLWqDNMyqtKDDsxc3FQdoUPghY1OcBPbtGbbY1r3cMbNh2tIGWNthtSvNmn9r35I6Epo1g== X-Received: by 2002:aca:4b0e:: with SMTP id y14mr1620461oia.297.1643143771610; Tue, 25 Jan 2022 12:49:31 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 10/29] conf, qemu: add 'pnv-phb3-root-port' PCI controller model name Date: Tue, 25 Jan 2022 17:48:43 -0300 Message-Id: <20220125204902.772350-11-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143813635100002 Content-Type: text/plain; charset="utf-8" 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. 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 64a797de46..a467fc1437 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 f5b15cff33..8db4d44d28 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 d7352b60e6..7aef7659e9 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 3e6eed6ec9..eeececa936 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2420,6 +2420,11 @@ qemuDomainPCIControllerSetDefaultModelName(virDomain= ControllerDef *cont, *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDG= E; break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: + if (qemuDomainIsPowerNV(def)) { + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PNV_PHB3_R= OOT_PORT; + break; + } + /* Use generic PCIe Root Ports if available, falling back to * ioh3420 otherwise */ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT)) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index aa686246f5..ea7861b232 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3428,6 +3428,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: @@ -3595,10 +3597,18 @@ qemuValidateDomainDeviceDefControllerPCI(const virD= omainControllerDef *cont, =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_I= OH3420 && - pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= CIE_ROOT_PORT) { + pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= CIE_ROOT_PORT && + pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= NV_PHB3_ROOT_PORT) { virReportControllerInvalidValue(cont, model, modelName, "model= Name"); return -1; } + + if (pciopts->modelName =3D=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME= _PNV_PHB3_ROOT_PORT && + !qemuDomainIsPowerNV(def)) { + virReportControllerInvalidValue(cont, model, modelName, "model= Name"); + return -1; + } + break; =20 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: --=20 2.34.1 From nobody Tue May 7 01:32:22 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 1643143807813433.0017856654804; Tue, 25 Jan 2022 12:50:07 -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-7-MlpEoirWMa2QPWfQ3IV3UQ-1; Tue, 25 Jan 2022 15:50:05 -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 247B7107AD62; Tue, 25 Jan 2022 20:49:57 +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 08369CB84B; Tue, 25 Jan 2022 20:49:57 +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 A074B1806D2B; Tue, 25 Jan 2022 20:49:56 +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 20PKnr67024264 for ; Tue, 25 Jan 2022 15:49:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6FB811120AC3; Tue, 25 Jan 2022 20:49:52 +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 6BF4C1120AD4 for ; Tue, 25 Jan 2022 20:49:52 +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 F0982181945B for ; Tue, 25 Jan 2022 20:49:45 +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-628-qM_MlLv8ObelLHj-B9k95g-1; Tue, 25 Jan 2022 15:49:34 -0500 Received: by mail-oi1-f180.google.com with SMTP id s185so16679170oie.3 for ; Tue, 25 Jan 2022 12:49:33 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:32 -0800 (PST) X-MC-Unique: MlpEoirWMa2QPWfQ3IV3UQ-1 X-MC-Unique: qM_MlLv8ObelLHj-B9k95g-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=Y1pU80xFoa0pfYdvsJ8Z3DqCI4QOUCTUEvJ3y7rAY4Q=; b=Lcv8ErQjEflDj/FDS/rWZOF7GbgSnkagkM9/k20UMAN1K5pTvZVuYwPnkMrzblgcn4 45lUVQOSceDSyntQ4A5SFzpg+4DjNDvxn/i6ECAgvy8tTT/ywswlFWFE92ArcW+2L+aV bDGHB4L1lLs6O76TDNY5wFHROWVjSMuKh9EY9rSr0x1OkjR598HdEqw0dDJ51+NEvMMl VDZRA8OAZUobSUgIZTrI55xbgGwo/MVbxjnBGq/SpHhxfRUi2mgAEvKRv+f4OJoOVwUe C0FnMYhAzSARiM8PlFK/u529QLQlYj9JswokGg6Pt2+WMAhOBpHDu5qZJbQq3+qiGvG4 bX5Q== X-Gm-Message-State: AOAM5314NKGejhAF2ioSnPa+kWoQ7vCi+BHPH1cGNbeUm+8496b2+RyJ ZlkO2YOHXpriOJVHk85iyDH7veqY/oM= X-Google-Smtp-Source: ABdhPJzgJyK6gRPkqVka7yXxzqPE1P72HSk8hEY2j6nBNtZqgY7oXin4A9v9OMce5QugvEmyELhabg== X-Received: by 2002:a54:4812:: with SMTP id j18mr1696331oij.276.1643143773185; Tue, 25 Jan 2022 12:49:33 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 11/29] conf, qemu: add 'pnv-phb3' PCI controller model name Date: Tue, 25 Jan 2022 17:48:44 -0300 Message-Id: <20220125204902.772350-12-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143810772100001 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 a467fc1437..4c3a1c28a7 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 8db4d44d28..57ab5b19dd 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 7aef7659e9..1d9c689e83 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 eeececa936..f08fea32f5 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2449,6 +2449,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 ea7861b232..e8d86a2280 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3430,6 +3430,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: @@ -3558,7 +3560,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; } @@ -3640,7 +3643,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.34.1 From nobody Tue May 7 01:32:22 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 1643143807400397.0411015852544; Tue, 25 Jan 2022 12:50:07 -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-562-q_-bC5xgNvenW1IMc7cUfQ-1; Tue, 25 Jan 2022 15:49:58 -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 C479483DEAA; Tue, 25 Jan 2022 20:49: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 A58F8CB84B; Tue, 25 Jan 2022 20:49: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 77B754A708; Tue, 25 Jan 2022 20:49:52 +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 20PKnnSS024242 for ; Tue, 25 Jan 2022 15:49:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id 45209417EC7; Tue, 25 Jan 2022 20:49:49 +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 417CD401E83 for ; Tue, 25 Jan 2022 20:49:49 +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 BC5568582A8 for ; Tue, 25 Jan 2022 20:49:43 +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-25-GZVJ1SnyN6unyENZoAvshQ-2; Tue, 25 Jan 2022 15:49:35 -0500 Received: by mail-ot1-f45.google.com with SMTP id x52-20020a05683040b400b0059ea92202daso11724690ott.7 for ; Tue, 25 Jan 2022 12:49:35 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:34 -0800 (PST) X-MC-Unique: q_-bC5xgNvenW1IMc7cUfQ-1 X-MC-Unique: GZVJ1SnyN6unyENZoAvshQ-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=km9OZdvXMNbXkb5Zq03ZI9rTAonxSObeOd2NqovNqdk=; b=gxdBmWjVd8Bt8ztBkoKlGET+t2Aq6BZCgSNo3FaUfum8z/1zo0EVaG6AqUqxf55KOS nCEE7h36pfyydqK6Gxvo9s5H4toxRrXzh9BuZ8tDQgFXInaw7/ftsRf5OSgb/+D06BsH UcMC3wbXCzpY5YFTbfLWWvdAhGTDXOgYe6EQhMcMyxMDp5h4RwHSZTGpVEnoWWDUSNWO T2ZCZ+yD+VNqtUiC0u7kZT9CzsIBwhSW7yymwnbcp59sHULIILs+rddVk5HA2KI399+L CdBerwVSSk9NVRDzkFCAdPJyiOSwv8q1+Pyh/zSzMbLmCGzWLQm7BfOVX8woT+d327dx eDrQ== X-Gm-Message-State: AOAM533q5C8nQX4746PJpxCihCQrjfoPm1tA/uMmWfZ4pOo+EN2W1nft IEXZKNnL+Xd722P5ByBkWY+nVYTL1tA= X-Google-Smtp-Source: ABdhPJy7xrvHaEtziq//iFpkPotJ3oWB1QSl/VpcsvdZxHILWLLuvhsF6HhKs2ua3m79UCRuJ8BwGA== X-Received: by 2002:a9d:7f0e:: with SMTP id j14mr16016773otq.305.1643143774637; Tue, 25 Jan 2022 12:49:34 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 12/29] domain_conf.c: fix identation in virDomainControllerDefParseXML() Date: Tue, 25 Jan 2022 17:48:45 -0300 Message-Id: <20220125204902.772350-13-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143808458100001 Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 57ab5b19dd..72ee46026a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9550,40 +9550,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.34.1 From nobody Tue May 7 01:32:22 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 1643143817752676.8379572876202; Tue, 25 Jan 2022 12:50:17 -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-347-c5QfFC82Py2BLmusxuKswA-1; Tue, 25 Jan 2022 15:50:14 -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 AFADB8144E8; Tue, 25 Jan 2022 20:50: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 86D124D735; Tue, 25 Jan 2022 20:50: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 5416C18045C5; Tue, 25 Jan 2022 20:50:03 +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 20PKo1Uo024338 for ; Tue, 25 Jan 2022 15:50:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 73B8FC4C7BE; Tue, 25 Jan 2022 20:50:00 +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 6FBF7C23DCA for ; Tue, 25 Jan 2022 20:49:59 +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 8FD9E38183D9 for ; Tue, 25 Jan 2022 20:49:48 +0000 (UTC) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-327-4dxbfIK-PKuWC2kU_tsQxg-1; Tue, 25 Jan 2022 15:49:36 -0500 Received: by mail-oi1-f177.google.com with SMTP id s9so33466633oib.11 for ; Tue, 25 Jan 2022 12:49:36 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:35 -0800 (PST) X-MC-Unique: c5QfFC82Py2BLmusxuKswA-1 X-MC-Unique: 4dxbfIK-PKuWC2kU_tsQxg-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=rkYHj5v9o+2NwAQR6l0g7RLCPiFN+zivq0fkAfQSfP0=; b=3yzuzSmRLokboLOXugkTL3rPF5Zqsbc49fhahOZQZOE1xL1WOObg2UYlJNi1KN1QgZ bbSd3YFwmi9hIMDu8b09mx6vdFOh1sD0tUgcTWBSA1SW4EWbfMDqDVaK2aKInBR8DFia /a6S133UkC0RK8n93DoST3uNx2ZFsQtsBbVN5OaExFHqYmEh/XDxJ4F0fxfCaqasqr+2 r5W3Vp3wufg8CIR5gdPh+9KyIt7DvJ9WgCAsu1jQ4zi2zZ7rFqKH3e0Q7pvy5VDu8MYt 9JhuuYyuy5ivckb041PljQwPeUBygEbOgDnkTV7duSnZ7ezFCNfLW65sw3iI4Hi3yBj0 Pj8A== X-Gm-Message-State: AOAM5305A5TXSzeQqAiV4HmnxjAQVQlfNHlEqLbi4Y4swbBpD2WAN0ee NtCGZ7PC9yD5WuWmVhkdUOYiO0xt4pY= X-Google-Smtp-Source: ABdhPJxKsGurNb22tNZy7KE7jBTQ4tiQUAsludlYtrhyHSieEKVlfdIp0lB+8RgGaC99H+jKfkhF9w== X-Received: by 2002:aca:f0d:: with SMTP id 13mr1756448oip.51.1643143776066; Tue, 25 Jan 2022 12:49:36 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 13/29] conf: parse and format Date: Tue, 25 Jan 2022 17:48:46 -0300 Message-Id: <20220125204902.772350-14-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143820467100001 Content-Type: text/plain; charset="utf-8" The 'chip-id' attribute indicates which chip/socket that owns the PowerNV pcie-root controller. Reviewed-by: Peter Krempa Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 e2f99c60a6..1e44d9a987 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3898,6 +3898,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 4c3a1c28a7..47a3107ea1 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 72ee46026a..803c51d63a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2380,6 +2380,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; @@ -9584,6 +9585,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", @@ -23888,6 +23899,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) @@ -23905,6 +23917,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 1d9c689e83..93c5092f35 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.34.1 From nobody Tue May 7 01:32:22 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 1643143819224640.4889637663531; Tue, 25 Jan 2022 12:50:19 -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-340-nQJMV3IDMT-_UgD17MtkOw-1; Tue, 25 Jan 2022 15:50:14 -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 31524814508; Tue, 25 Jan 2022 20:50:07 +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 0DD84CB849; Tue, 25 Jan 2022 20:50:07 +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 6315F4A71A; Tue, 25 Jan 2022 20:50:06 +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 20PKo4Md024371 for ; Tue, 25 Jan 2022 15:50:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 96A592167D6A; Tue, 25 Jan 2022 20:50:04 +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 8FF732167D66 for ; Tue, 25 Jan 2022 20:49:59 +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 23E4D81B146 for ; Tue, 25 Jan 2022 20:49:53 +0000 (UTC) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-e3v64uW8OpKLBDvd5V-w6w-1; Tue, 25 Jan 2022 15:49:38 -0500 Received: by mail-ot1-f53.google.com with SMTP id g15-20020a9d6b0f000000b005a062b0dc12so6211902otp.4 for ; Tue, 25 Jan 2022 12:49:38 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:37 -0800 (PST) X-MC-Unique: nQJMV3IDMT-_UgD17MtkOw-1 X-MC-Unique: e3v64uW8OpKLBDvd5V-w6w-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=ng5CBzyjS3kXU3yb+x4lt9+OR/MBvzdsUR3GZsYsK90=; b=nU3ps1PusAi2VNsnWIim3j2PwEVjwLV3s8aVH/FeDmRdZHP42WsDYgWxTcI0kI3JVN Z8JH9VKod1MrSzBpqZYGdqeo6VSzvMZKM1Mt8SxgJBji+CRKr9CTGQFroWKKXkoG4QAw UjiSph6Dq9e36DQgWxfX/zPYL4k/3d8q6XIVnnjxzj/QWsUeD6axVFEcmegdyasy1iaO 9YCAlo3az7ipSa/6ACCNDrQlIWY/Cv3A9SQK+VlQ0YL1Z/vsNUl/Bv6508idHsrDOZhB DWNgcjo6zcNZKEV6Kdj4jtSDU/8j6BTA32nXOgHeLT/XDFirf2xMCK0tVLYjHpgwZ/zR Uz1g== X-Gm-Message-State: AOAM532V2cqQzNcfycUD8E0t07wZkV+P4Xwsz5+fE/indR8D0yieDoKR B0J6w2OcNFFGDW4s+rfO95Ev1xaqyFk= X-Google-Smtp-Source: ABdhPJy4t9kP5TZJ52g71fsUdQNBK3CTHfF5VM36TXYm+zusS3aS8BUfjjxVjigiYCGAfRNH/0rtuw== X-Received: by 2002:a05:6830:2707:: with SMTP id j7mr15893424otu.376.1643143777514; Tue, 25 Jan 2022 12:49:37 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 14/29] formatdomain.rst: add 'index' semantics for PowerNV domains Date: Tue, 25 Jan 2022 17:48:47 -0300 Message-Id: <20220125204902.772350-15-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143820777100005 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 1e44d9a987..d700049c1c 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3896,8 +3896,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 the chip/socket slo= t a + 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.34.1 From nobody Tue May 7 01:32:22 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 164314390722067.76042980347154; Tue, 25 Jan 2022 12:51:47 -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-385-UIDe1lvGN6WNobCGKweL-Q-1; Tue, 25 Jan 2022 15:51:45 -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 E361B8145E0; Tue, 25 Jan 2022 20:51:38 +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 B389C1007607; Tue, 25 Jan 2022 20:51:38 +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 724E5181844C; Tue, 25 Jan 2022 20:51:38 +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 20PKpZLt026648 for ; Tue, 25 Jan 2022 15:51:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0A39340F9D7C; Tue, 25 Jan 2022 20:51:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 057EB40F9D6F for ; Tue, 25 Jan 2022 20:50:04 +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 97B00811E84 for ; Tue, 25 Jan 2022 20:49:52 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-388-DJczb54ONmm44ijX4ugqEQ-2; Tue, 25 Jan 2022 15:49:39 -0500 Received: by mail-oi1-f169.google.com with SMTP id q186so33517398oih.8 for ; Tue, 25 Jan 2022 12:49:39 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:38 -0800 (PST) X-MC-Unique: UIDe1lvGN6WNobCGKweL-Q-1 X-MC-Unique: DJczb54ONmm44ijX4ugqEQ-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=G7k34ROo3YeDFF1mw01lp0X9E1WUO/3H33ksbxhrz30=; b=PFjJEvJfteGeHuQ0k9O+n9q/bUQbpMYhevkxdpIINelVmbUCUEPHMedGf/4WpUZJjo xXefrXjIN9YJyZ+SFydwfuyiIMRmpXaWQ+AT8+l1RyMwz46HUm9oS84f+ZLSL8I148eu DP4cJmhDqXSwImw15fkC8SuntpF+Fs07hTv+zv9X2gsHWn85raIdRqzZGbuSoonSn/Ke ZGIJJsgcEwalWSRVKxt0bye/FAJ36eSseWcdiglUuninO4RMcUJ76CCdLhUHlMftP5Md bI4HXshFIu4iwLgIaryczHK/KLYpK11FPG0r+GP8ZxyJOEKMYHTQsQdcyzlk1v8+Te/A sRcA== X-Gm-Message-State: AOAM530bAhGSMo+InBZNHmuGn4TJZwrJP5ZoyK7h/7ec5Ov514JsldEy f7iHueTAhSSpPI/EsMmg7dHD4eNzEak= X-Google-Smtp-Source: ABdhPJwjfqjh/g8NYUogmcX4GLj81x9zojw7COEiCoC/c/EyRYtaPz1HynhRgi5peYz7RhOd3/z+ig== X-Received: by 2002:a05:6808:309f:: with SMTP id bl31mr1735322oib.228.1643143778820; Tue, 25 Jan 2022 12:49:38 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 15/29] introduce virDomainControllerIsPowerNVPHB Date: Tue, 25 Jan 2022 17:48:48 -0300 Message-Id: <20220125204902.772350-16-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143909788100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 21 +++++++++++++++++++++ src/conf/domain_conf.h | 1 + src/libvirt_private.syms | 1 + 3 files changed, 23 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 803c51d63a..13d5eb5b9d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2442,6 +2442,27 @@ virDomainControllerIsPSeriesPHB(const virDomainContr= ollerDef *cont) } =20 =20 +bool +virDomainControllerIsPowerNVPHB(const virDomainControllerDef *cont) +{ + virDomainControllerPCIModelName name; + + /* PowerNV PHBs are pcie-root controllers */ + 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; + + /* The actual device used for PHBs is pnv-phb3 */ + 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 93c5092f35..adeafa83e7 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3333,6 +3333,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 ba3462d849..a18fbd4bb8 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.34.1 From nobody Tue May 7 01:32:22 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 1643143829465369.68570749545336; Tue, 25 Jan 2022 12:50:29 -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-402-TP9AGw-2OjSo73XtkBDJYA-1; Tue, 25 Jan 2022 15:50:21 -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 8DD351083F6B; Tue, 25 Jan 2022 20:50:07 +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 6DE78CB84C; Tue, 25 Jan 2022 20:50:07 +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 3F1954A71C; Tue, 25 Jan 2022 20:50:07 +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 20PKo3Jw024358 for ; Tue, 25 Jan 2022 15:50:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 14E6E401E22; Tue, 25 Jan 2022 20:50:01 +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 111704328DE for ; Tue, 25 Jan 2022 20:50:00 +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 416A68F566A for ; Tue, 25 Jan 2022 20:49:53 +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-388-yhGWi8EcNpuFQl6Ra3YsZQ-1; Tue, 25 Jan 2022 15:49:41 -0500 Received: by mail-oi1-f181.google.com with SMTP id u129so7425359oib.4 for ; Tue, 25 Jan 2022 12:49:41 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:40 -0800 (PST) X-MC-Unique: TP9AGw-2OjSo73XtkBDJYA-1 X-MC-Unique: yhGWi8EcNpuFQl6Ra3YsZQ-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=7aOjx0Hg07m6RwXwiCjgyZhbF0sPr8Y4VhFWmU8lYFs=; b=zsFaRg4kqHZbopqzlk0ZIWpHW4rd0tbwtsXeJhKuanoUH9B83aFq41wVmpPwUaVg/A HEifBHUemxEZ9K0mZBWznkPBwsT705LbQmAMNGSAWNZbEBio4oBNBZToTRvK7WleBoTX iqnMFizN9/wj742Quv4AJ4XHOQ5K65sePVZJzjg+zwFTiRz/MPNUlSDJhM2KboFk6Y90 WeKX5leKCrd7W8Lhgwls7FbSl43XayKrkQsuIV3KNv5cGxsYzcIwntSZQQPz3Et/+JqH 0pVuCGNIjEphNXfm63sP5aJOv/vQxdCNgQ79Lyee4c4HJTI5JbYZWRFiKhSg6mVMle/r rEeQ== X-Gm-Message-State: AOAM531J9UkRbxTMvS3gi+0i1YqIoFH+Q8RZvnsRq8Dr+YnSRJPNGdwh vt+Y7xbLEmuHN/pRgixR0UXFy8REvRA= X-Google-Smtp-Source: ABdhPJzJ3JdYLVosmubRmsd05I4+kZf8njaL3Uu7r4QmDgFSqGz5O2XHSWSfJgnGhXUiVlIp6u6dJg== X-Received: by 2002:a05:6808:230f:: with SMTP id bn15mr1746473oib.95.1643143780359; Tue, 25 Jan 2022 12:49:40 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 16/29] conf, qemu: add default 'chip-id' value for pnv-phb3 controllers Date: Tue, 25 Jan 2022 17:48:49 -0300 Message-Id: <20220125204902.772350-17-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143830456100005 Content-Type: text/plain; charset="utf-8" If ommited from the controller definition, chip-id defaults to zero. Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 f08fea32f5..17c2649fb1 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 e8d86a2280..bce52269a6 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3648,6 +3648,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.34.1 From nobody Tue May 7 01:32:22 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 1643143831672902.5442767406389; Tue, 25 Jan 2022 12:50:31 -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-310-qk3GgagnPfin76wa9YU75A-1; Tue, 25 Jan 2022 15:50:27 -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 10056100C66E; Tue, 25 Jan 2022 20:50:16 +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 E6500CB849; Tue, 25 Jan 2022 20:50:15 +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 B7FED4E58D; Tue, 25 Jan 2022 20:50:15 +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 20PKo8B8024396 for ; Tue, 25 Jan 2022 15:50:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id 86D82C4C7CF; Tue, 25 Jan 2022 20:50:06 +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 831CDC23DC8 for ; Tue, 25 Jan 2022 20:50:06 +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 CF9E11819460 for ; Tue, 25 Jan 2022 20:49:54 +0000 (UTC) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-672-A3YUAVioNtm4q7bP2YGrUQ-1; Tue, 25 Jan 2022 15:49:43 -0500 Received: by mail-ot1-f48.google.com with SMTP id c3-20020a9d6c83000000b00590b9c8819aso27609692otr.6 for ; Tue, 25 Jan 2022 12:49:42 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:41 -0800 (PST) X-MC-Unique: qk3GgagnPfin76wa9YU75A-1 X-MC-Unique: A3YUAVioNtm4q7bP2YGrUQ-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=B+lh64BlMNv+QAubPtYjVKnawWmBFasomvy3UH0b/co=; b=wcP1ON4wef2Ld+G4QAnWcDmQpX8IhGJL1bekMilaVKxDwjjm0WOC+/T8FYUDiTxngc HkRA1dx578BiPbh0NWhFQNmquiUVjlknij7YB6fkfMisLAQcVAVfFTZU6oCkWKGe/ufM LOIEvcZ4YwNh+El/NJO/b0xv7B2G8Ygk2GHVcwqfzdnAf2g8MvyID5MwrigjZvTZvvxA Etb4w9BXFLivWm2lZTFa9WrauY62Dycp0dTJ+yq4CKtQt3Cy6pVKTiF6jetg5r5IYqS3 6jSFUniXVTUm0FqnuOkIGJYzQaCX+NcHNJmFVpL2kcx8WyKsevdCtzwV8bO8c/x0RJ1N w5uw== X-Gm-Message-State: AOAM532mP4onDFhYVoomLt0CIptQ4VJQ0agX6A3es6cti0J+dj9/bLoZ 2iRAU4OmPdXXXRPfk9X7xlNipQUP18w= X-Google-Smtp-Source: ABdhPJx3qpO3OZQWreeOxYOOEa8R5YVXA3vsooxoOjdHPUGv+E8DUPj+AGP3Hu+b7ymrADAvi60Xfw== X-Received: by 2002:a05:6830:4115:: with SMTP id w21mr15301939ott.98.1643143782165; Tue, 25 Jan 2022 12:49:42 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 17/29] conf, qemu: add default 'targetIndex' value for pnv-phb3 devs Date: Tue, 25 Jan 2022 17:48:50 -0300 Message-Id: <20220125204902.772350-18-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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: 1643143834877100001 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 17c2649fb1..e7a9e6adda 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 bce52269a6..765a1d5811 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3732,6 +3732,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: @@ -3739,7 +3757,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.34.1 From nobody Tue May 7 01:32:22 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 1643143817823191.24385096152412; Tue, 25 Jan 2022 12:50:17 -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-110-aOccyiCqMwOp-8uWnDubRw-1; Tue, 25 Jan 2022 15:50:15 -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 B24A41898296; Tue, 25 Jan 2022 20:50: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 8BF5B56F65; Tue, 25 Jan 2022 20:50: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 59E6B18033F6; Tue, 25 Jan 2022 20:50:03 +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 20PKnxSs024302 for ; Tue, 25 Jan 2022 15:49:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7BB9D7ADD; Tue, 25 Jan 2022 20:49:59 +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 77C477ADB for ; Tue, 25 Jan 2022 20:49:58 +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 0BA103C11A0C for ; Tue, 25 Jan 2022 20:49:52 +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-446-4RvXAbwQPg27nHAWOs7cbw-1; Tue, 25 Jan 2022 15:49:44 -0500 Received: by mail-oi1-f181.google.com with SMTP id v67so15344799oie.9 for ; Tue, 25 Jan 2022 12:49:44 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:43 -0800 (PST) X-MC-Unique: aOccyiCqMwOp-8uWnDubRw-1 X-MC-Unique: 4RvXAbwQPg27nHAWOs7cbw-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=gaW5hpW+tRPPKw1BDwtfnSiOfQ/PgRYjKRS1s66y0uo=; b=rCKFumftxBPDENcfJh5AtepDo+y8DcuEDepUVUxEgTccncJu0pKYy8XH2B2YiTKoaM i0sCVRSG2VrhEDYhpJhxg35Yocd6mnBd5cAwUaUZ1uNcaVPepKBCwicA0nYgNDzR3laX jAefSnS6LwNb2bwwOk5Fnmhi8Gc/ejNGC+zVU1ECPhyimOqLfXUap2BSndAiJCRzqIGF JrDaV3WeddGH/RSmyIcU2m62JkhDy0v2gPWh9G7o7Aek5jPnJCG8ZrVnBJxI6iQEUvsN Bzg6/rePn9mhnVYxSskX8MfnZj3wNdQJaiM+EVm3Og4mx7lnmEiq13H6W5NVZY1JVD0F 3yew== X-Gm-Message-State: AOAM533XJjKjh+NspXubmU5n0Vy4h55IY22+0Lm71570IezVnprYucPo wSbPozAsoXUQ7WdqsuWyw421+gSCjFQ= X-Google-Smtp-Source: ABdhPJwdhtxlgLJ+2LjhOb5m1AqTptSW+OkBJMc/NdbP3YxP3g3eMbVnYDBWdUe4gSjbzJNr4CvhBw== X-Received: by 2002:a05:6808:1202:: with SMTP id a2mr1870589oil.57.1643143783634; Tue, 25 Jan 2022 12:49:43 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 18/29] qemu_command.c: add command line for the pnv-phb3 device Date: Tue, 25 Jan 2022 17:48:51 -0300 Message-Id: <20220125204902.772350-19-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143820484100002 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- 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 2a1fe27297..afb3bf3612 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3221,6 +3221,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; @@ -3408,8 +3424,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.34.1 From nobody Tue May 7 01:32:22 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 1643143845420584.1260588822298; Tue, 25 Jan 2022 12:50: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-28-xHAGfXaLNxCZrlhj2tYHUg-1; Tue, 25 Jan 2022 15:50:41 -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 B00F41091DA1; Tue, 25 Jan 2022 20:50:36 +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 529DC5DF3F; Tue, 25 Jan 2022 20:50:36 +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 215DF181844E; Tue, 25 Jan 2022 20:50:36 +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 20PKoZYk025141 for ; Tue, 25 Jan 2022 15:50:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0D6E5141DEE5; Tue, 25 Jan 2022 20:50:34 +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 0520E141DC5E for ; Tue, 25 Jan 2022 20:50:04 +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 5CA7C2B69A14 for ; Tue, 25 Jan 2022 20:49:52 +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-628-V9bCa6vpO6mqAn7mMogk0A-2; Tue, 25 Jan 2022 15:49:45 -0500 Received: by mail-oi1-f180.google.com with SMTP id s185so16679170oie.3 for ; Tue, 25 Jan 2022 12:49:45 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:44 -0800 (PST) X-MC-Unique: xHAGfXaLNxCZrlhj2tYHUg-1 X-MC-Unique: V9bCa6vpO6mqAn7mMogk0A-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=eeEqPxvb+KKtCdopj8XzWzk41XBJ18u/MJ/P2ppUisg=; b=eKVipkgOszpvMsgJwKtnGX8N8JSbFgI7oU9jULHHNNxmxs5ZH+13eqHfzKFt/y7k5B khCKkAJ4dhYBxNeNNnMOKWlocG6fALiPoIKdQoEh4zx1BaGMbXEn9U340AsxNSgg0s4F ahVmdyCJ3sWBiddWPzmOe7/YncWjkq9JjQQ5Aes+12iUiZu6sDCj9EuYzuCTPsrOxh4c 3RweTU1CydDkipguTwEVbq14jIQQ7Im4fAvL9VSG+VSrHE7yvLTXqVoJk294MtMNEPQv NShNVqyTk1m4wMbLTo+0n+mjRnb3VNGf2rYr9vAGUxSEDzRps7CHheOgfczYepVYLaeF S6ng== X-Gm-Message-State: AOAM531ozkzHkJyHHR4WXZ0xwgPwnUbo+eby6sVP1sQciDxP8jisL/Mh Q7tyZ0CYsOujDCGr5GlJAsLhR5g1zJQ= X-Google-Smtp-Source: ABdhPJxAHF21HkW8TRh3e2gIKd3KGMQOkpHLUy4ozPnOltRKvP/EFM3zDGnZwtTl3cbNrUSaJrSJGw== X-Received: by 2002:aca:4b0e:: with SMTP id y14mr1620891oia.297.1643143785075; Tue, 25 Jan 2022 12:49:45 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 19/29] qemu_domain_address.c: change pnv-phb3 minimal downstream slot Date: Tue, 25 Jan 2022 17:48:52 -0300 Message-Id: <20220125204902.772350-20-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143847435100001 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 e7a9e6adda..7d60d277e8 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1628,6 +1628,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, @@ -1720,6 +1731,9 @@ qemuDomainPCIAddressSetCreate(virDomainDef *def, virDomainControllerModelPCITypeToString(defaultModel), i= ); } =20 + if (qemuDomainIsPowerNV(def)) + qemuDomainTunePowerNVPhbBuses(addrs); + if (virDomainDeviceInfoIterate(def, qemuDomainCollectPCIAddress, addrs= ) < 0) goto error; =20 --=20 2.34.1 From nobody Tue May 7 01:32:22 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 1643143827130982.041806026092; Tue, 25 Jan 2022 12:50:27 -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-154-JGR2woNRMQebpaBV-CxOxg-1; Tue, 25 Jan 2022 15:50:23 -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 B2613100C687; Tue, 25 Jan 2022 20:50:16 +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 2BD565ED5A; Tue, 25 Jan 2022 20:50:16 +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 E7B35180065F; Tue, 25 Jan 2022 20:50:15 +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 20PKoDD3024463 for ; Tue, 25 Jan 2022 15:50:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 94F20C50953; Tue, 25 Jan 2022 20:50:11 +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 91507C4237C for ; Tue, 25 Jan 2022 20:50:11 +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 0C5E880B90A for ; Tue, 25 Jan 2022 20:50:00 +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-568-xt1wwyi0N8WU5eo4lPHc-Q-2; Tue, 25 Jan 2022 15:49:47 -0500 Received: by mail-oi1-f179.google.com with SMTP id s127so33544375oig.2 for ; Tue, 25 Jan 2022 12:49:47 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:46 -0800 (PST) X-MC-Unique: JGR2woNRMQebpaBV-CxOxg-1 X-MC-Unique: xt1wwyi0N8WU5eo4lPHc-Q-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=9vGEirU2ImK1BoXstezfn9ovlbj8zCCvNtFMcTj9vXE=; b=77bRISszuqoVAnhdi5LTOu8h9UmHnGcQH/Ng6xZsFn+TLhLCME2VYqxCV24td+6di8 k4OvzeJ1AIURrx0DC9GqDAi7L482SKWQw0w/GhZ73lpuaxg5MhUJIRdmbt4a+23a4nMv 6/bzzTPZsFk8lnDpSf6y3NJNGBY6Y+e8C42UH1uJy8JUI8MFLJDpMnxbEZpW6P7SFrJE /X/gNXAKDQi71vfMMF5PD130fz/TYmE4golDy6aYZC0RhxdPz/z1dlv97jqV7XCFwnQ/ Ogc7g38L1QDfQ91xfiC/vWxhjom3lwn4oS2b8oeTaxrmyUmZ1JA01KDkHPMmKuMD3zyf 9bZg== X-Gm-Message-State: AOAM531TEoi2uXOUm2TpC0z1YT89F4OxBRkYzZ53RDc6ZkytmGxvPH20 KtpC1vo/+ADuENdVe8M60aN54FCMilA= X-Google-Smtp-Source: ABdhPJyQSxTBoc8Gnafv/3S9wa6+R7aWmxw6p8xcuyrhsJLL52ORVJDgygk0EbuRA/yVSGk6+XUvyQ== X-Received: by 2002:a05:6808:d4f:: with SMTP id w15mr1789830oik.62.1643143786686; Tue, 25 Jan 2022 12:49:46 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 20/29] domain_conf: format pnv-phb3-root-port empty addr Date: Tue, 25 Jan 2022 17:48:53 -0300 Message-Id: <20220125204902.772350-21-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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.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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143829995100001 Content-Type: text/plain; charset="utf-8" Hiding the empty (0000:00:0.0) PCI address in the case of devices that will connect to slot 0x0 can be counterintuitive to the user, which will see something like this: Even if the user deliberately adds the root-port
element:
We end up removing the
element after saving the domain file. This happens because virPCIDeviceAddressIsEmpty() can't distinguish between a zeroed address that was set by the user versus an address that wasn't filled at all. Given that all root-ports of PowerNV domains will connect to slot 0 of the PHB, if the PHB controller has index =3D 0 this scenario will occur every time. This patch aims to alleaviate this behavior by adding a new virDomainDefFormatFlags that will allow an empty address to be formatted in the XML. This flag is then used only when formatting PowerNV root ports. 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 13d5eb5b9d..026d801682 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2463,6 +2463,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) { @@ -6490,7 +6509,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_EMPTY_PCI_ADDR) { virBufferAsprintf(&attrBuf, " domain=3D'0x%04x' bus=3D'0x%02x'= " "slot=3D'0x%02x' function=3D'0x%d'", info->addr.pci.domain, @@ -23958,6 +23978,9 @@ virDomainControllerDefFormat(virBuffer *buf, } } =20 + if (virDomainControllerIsPowerNVRootPort(def)) + flags |=3D VIR_DOMAIN_DEF_FORMAT_EMPTY_PCI_ADDR; + virDomainControllerDriverFormat(&childBuf, def); =20 virDomainDeviceInfoFormat(&childBuf, &def->info, flags); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index adeafa83e7..dd3d942a35 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3502,6 +3502,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, + /* format empty PCI addr (0000:00:0.0) */ + VIR_DOMAIN_DEF_FORMAT_EMPTY_PCI_ADDR =3D 1 << 9, } virDomainDefFormatFlags; =20 /* Use these flags to skip specific domain ABI consistency checks done --=20 2.34.1 From nobody Tue May 7 01:32:22 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 1643143832264714.9681800518641; Tue, 25 Jan 2022 12:50:32 -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-472-pqwQxzwUMEyrWiGHXw8TXw-1; Tue, 25 Jan 2022 15:50:29 -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 66A001091DAC; Tue, 25 Jan 2022 20:50:20 +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 4186E519C4; Tue, 25 Jan 2022 20:50:20 +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 01E3D5003D; Tue, 25 Jan 2022 20:50:20 +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 20PKoFYB024500 for ; Tue, 25 Jan 2022 15:50:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id F1C8140885BF; Tue, 25 Jan 2022 20:50:13 +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 ED67340885A1 for ; Tue, 25 Jan 2022 20:50:12 +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 CB52D38183D8 for ; Tue, 25 Jan 2022 20:50:00 +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-328-z5CwH_CRMo2zFSLKXQ1RrQ-1; Tue, 25 Jan 2022 15:49:49 -0500 Received: by mail-oi1-f180.google.com with SMTP id x193so33621008oix.0 for ; Tue, 25 Jan 2022 12:49:48 -0800 (PST) Received: from rekt.COMFAST ([191.8.61.226]) by smtp.gmail.com with ESMTPSA id ay32sm1368569oob.16.2022.01.25.12.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 12:49:47 -0800 (PST) X-MC-Unique: pqwQxzwUMEyrWiGHXw8TXw-1 X-MC-Unique: z5CwH_CRMo2zFSLKXQ1RrQ-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=NvBci2BtXek3iw4vNQmhyTQDTdfjyup62Yg5k7EJw1g=; b=qn8AzQuvIOaYxzn9fuDSYKtPkYVWPM7WDPJrBo36efCMEkHbzsfPKkgJwEWA6Ugbns Bb34vK5H1OS94W7XHBjHYWp0j50z48WRItUZFEmsQ1sMWwWJU7geb3K36N3yga5uRIvi 0tgccFK4kBtfT7gGX0Yr1BW+LjiUYx8h/QrWFhYjOGbcEx762bXs3CqE9BA3CQn/JIF3 cAsLLiLfzuqqzuQ4QcdIamriBj8WiyRDWpYXiDP+kySC0y2ixxN+qV9s7mHlrdD+LNTU zQrIrANVPDS3Ls6487fddamc/JlRNOi55v0+jU4Je7p4uIuqH16/YJ4P+Ik44C2uD/Yu 1vmw== X-Gm-Message-State: AOAM531h+DgqtLBpZZXuS/+QmnCBE4rGRBvK4/ZQWXv5EUW67ziKOfPi fygz8Qs1avPm1JqfOfST+YnAIEbJK5Y= X-Google-Smtp-Source: ABdhPJy4HmB1kVu87DT2tqKUxh0MD/7d/JbIIJD4ftbpWDxbXqRt9eYx/EQcV+7oZJEjEVZ7UW23xg== X-Received: by 2002:a05:6808:200f:: with SMTP id q15mr949948oiw.104.1643143788042; Tue, 25 Jan 2022 12:49:48 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 21/29] tests: add pnv-phb3-root-port test Date: Tue, 25 Jan 2022 17:48:54 -0300 Message-Id: <20220125204902.772350-22-danielhb413@gmail.com> In-Reply-To: <20220125204902.772350-1-danielhb413@gmail.com> References: <20220125204902.772350-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-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643143835059100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza Reviewed-by: J=C3=A1n Tomko --- .../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 de5582a52c..70b57a239f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2243,6 +2243,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 + + + + + + + +
+ + + + + + + + + +