From nobody Fri May 10 08:22:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.74 as permitted sender) client-ip=170.10.133.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.133.74]) by mx.zohomail.com with SMTPS id 1651782401572580.1813044562552; Thu, 5 May 2022 13:26:41 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-18-3Mu357EyM8eWL8CRcwuWJQ-1; Thu, 05 May 2022 16:26:36 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0820E1014A61; Thu, 5 May 2022 20:26:34 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E327D1515709; Thu, 5 May 2022 20:26:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 997A51947048; Thu, 5 May 2022 20:26:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D0E501947047 for ; Thu, 5 May 2022 20:26:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9B305111E414; Thu, 5 May 2022 20:26:32 +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 962C3111E40B for ; Thu, 5 May 2022 20:26:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 10AE41014A68 for ; Thu, 5 May 2022 20:26:24 +0000 (UTC) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-661-o5NrZZlCPEO6ZQJlzUnUeQ-1; Thu, 05 May 2022 16:26:22 -0400 Received: by mail-ot1-f44.google.com with SMTP id s12-20020a0568301e0c00b00605f30530c2so3671334otr.9 for ; Thu, 05 May 2022 13:26:22 -0700 (PDT) Received: from balboa.ibmuc.com (201-1-57-208.dsl.telesp.net.br. [201.1.57.208]) by smtp.gmail.com with ESMTPSA id p18-20020a9d4e12000000b006060322125csm977613otf.44.2022.05.05.13.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 13:26:21 -0700 (PDT) X-MC-Unique: 3Mu357EyM8eWL8CRcwuWJQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: o5NrZZlCPEO6ZQJlzUnUeQ-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=vpVuIP5r+3D+YKFzfwc6O+QJApWA2EJRSDz1amw35ig=; b=xIRjLiYh3dLvH+KecVBxyGwIPsjL7YbdTEysDU63WoPmbYJYH94eedJipQVQi6Ljdp FYk2BKSQvf43tDO+ytGWLuABH72YVUB4YRNTuM+WbVIFJ/uIEQ5UQoGDuW6SwuBBIa/J 7IcZxfaP2g1NsXishnaRlhyJr2VF3QBGO4/zhbUJ1hwcnaZUdYBLOMRYCVGwMixDH9HU 2qcjx2JH1qRhOw/KzpFQWdI6F45RF/mblDituDm10k+MD/53olgY9Ujz54RIYKquC/e9 KI/xP8VJxJIOueON2neFknPgXfUespZw8AqMO++T8LuJPnAUnpDndpubNkNI/4wf3IjD +giw== X-Gm-Message-State: AOAM533RKknvmJ7gjzWmp0vo48iTs6joAm1rnhKXMRjCGnxSQVcxyIRy VxiC/66t42sqW91Wlw2XvNBgn4KTjA4= X-Google-Smtp-Source: ABdhPJxYgEvJkLwqZOYmOh6vKJCO0Od2rs2Jx6y1opy3135tAhpF7qKcSL9Q1iEZ6N2MehrvliWMMw== X-Received: by 2002:a9d:802:0:b0:605:f693:3980 with SMTP id 2-20020a9d0802000000b00605f6933980mr721oty.257.1651782381446; Thu, 05 May 2022 13:26:21 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 1/2] cpu_map: add POWER10 cpu model Date: Thu, 5 May 2022 17:26:13 -0300 Message-Id: <20220505202614.379732-2-danielhb413@gmail.com> In-Reply-To: <20220505202614.379732-1-danielhb413@gmail.com> References: <20220505202614.379732-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-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: danielhb413@gmail.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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: 1651782403703100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Add POWER10 as a supported cpu model. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrea Bolognani --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++++++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 + tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 + tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 ++-- tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 ++-- 11 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 src/cpu_map/ppc64_POWER10.xml diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml index ffe1fa91e5..351c2ae4fa 100644 --- a/src/cpu_map/index.xml +++ b/src/cpu_map/index.xml @@ -82,6 +82,7 @@ + =20 diff --git a/src/cpu_map/meson.build b/src/cpu_map/meson.build index 013fc62a02..99815981b5 100644 --- a/src/cpu_map/meson.build +++ b/src/cpu_map/meson.build @@ -14,6 +14,7 @@ cpumap_data =3D [ 'ppc64_POWER7.xml', 'ppc64_POWER8.xml', 'ppc64_POWER9.xml', + 'ppc64_POWER10.xml', 'ppc64_POWERPC_e5500.xml', 'ppc64_POWERPC_e6500.xml', 'ppc64_vendors.xml', diff --git a/src/cpu_map/ppc64_POWER10.xml b/src/cpu_map/ppc64_POWER10.xml new file mode 100644 index 0000000000..62f3486ae4 --- /dev/null +++ b/src/cpu_map/ppc64_POWER10.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml b/tests/domaincapsda= ta/qemu_5.0.0.ppc64.xml index 5772045e35..d196676b14 100644 --- a/tests/domaincapsdata/qemu_5.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.0.0.ppc64.xml @@ -40,6 +40,7 @@ POWER8 + POWER10 POWER9 POWER8 POWER7 diff --git a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml b/tests/domaincapsda= ta/qemu_5.2.0.ppc64.xml index 051b7d43a8..b2c0577be9 100644 --- a/tests/domaincapsdata/qemu_5.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_5.2.0.ppc64.xml @@ -40,6 +40,7 @@ POWER8 + POWER10 POWER9 POWER8 POWER7 diff --git a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml b/tests/domaincapsda= ta/qemu_6.2.0.ppc64.xml index 8fed9d30b7..b07072778b 100644 --- a/tests/domaincapsdata/qemu_6.2.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_6.2.0.ppc64.xml @@ -40,6 +40,7 @@ POWER8 + POWER10 POWER9 POWER8 POWER7 diff --git a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml b/tests/domaincapsda= ta/qemu_7.0.0.ppc64.xml index 942c721afd..ec171bcdd9 100644 --- a/tests/domaincapsdata/qemu_7.0.0.ppc64.xml +++ b/tests/domaincapsdata/qemu_7.0.0.ppc64.xml @@ -40,6 +40,7 @@ POWER8 + POWER10 POWER9 POWER8 POWER7 diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.0.0.ppc64.xml index f2f3558fdc..597c38af30 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -190,7 +190,7 @@ - + @@ -662,7 +662,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index b949f88b5a..1e6c57482e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -195,7 +195,7 @@ - + @@ -669,7 +669,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_6.2.0.ppc64.xml index 9c9d9aa08e..1cde325749 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -206,7 +206,7 @@ - + @@ -686,7 +686,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.0.0.ppc64.xml index 1ddca7d767..179b74a5f4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -219,7 +219,7 @@ - + @@ -679,7 +679,7 @@ - + --=20 2.32.0 From nobody Fri May 10 08:22:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.74 as permitted sender) client-ip=170.10.129.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.74 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-74.mimecast.com (us-smtp-delivery-74.mimecast.com [170.10.129.74]) by mx.zohomail.com with SMTPS id 1651782394025961.2305810663148; Thu, 5 May 2022 13:26:34 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-455-Mw7hg-dxMXyep8PqiMA_eQ-1; Thu, 05 May 2022 16:26:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88C743C92FC9; Thu, 5 May 2022 20:26:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7454640D282E; Thu, 5 May 2022 20:26:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4CF2E1947048; Thu, 5 May 2022 20:26:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 44F061947047 for ; Thu, 5 May 2022 20:26:26 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 272F24010E2C; Thu, 5 May 2022 20:26:26 +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 2363C403D164 for ; Thu, 5 May 2022 20:26:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0808E8039D7 for ; Thu, 5 May 2022 20:26:26 +0000 (UTC) Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-77-OSZOSfyNMLiEjqYnSOungA-1; Thu, 05 May 2022 16:26:24 -0400 Received: by mail-ot1-f52.google.com with SMTP id z15-20020a9d65cf000000b00605f064482cso3683430oth.6 for ; Thu, 05 May 2022 13:26:24 -0700 (PDT) Received: from balboa.ibmuc.com (201-1-57-208.dsl.telesp.net.br. [201.1.57.208]) by smtp.gmail.com with ESMTPSA id p18-20020a9d4e12000000b006060322125csm977613otf.44.2022.05.05.13.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 13:26:22 -0700 (PDT) X-MC-Unique: Mw7hg-dxMXyep8PqiMA_eQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: OSZOSfyNMLiEjqYnSOungA-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=yNNv0y0bZwo0G5Iclfq2tqoZ1ieQrSQ2YtytAndP35w=; b=xXWRnt6WUp3wPTR31QGwoEWSMPpt+ldAosNTr+wHwvL1un1dBMUEUQjucUxKO1Dkpf FPnDs8WsszjQXrkYuc/V7kKVmiLdSWr1E5FXp9ekF7gMZf8+yyrMGFklr0Y45SeFkEiz e5aOpBZkMy5JoGXoLfMeube/gpD5U3Px7JqxjBUYEBYT0hhZLlPbfek8dIXT2H9I2Dlt lakVcOXOYSB6OJBHqOmhgtLAtw49Niel+68qNa9fUsRbYG8fqfB1DjbPNNU5K2/WwNtU xsi/UMbpnSyTlo12omJDceKzDJKxr3QbPazM1tkb6qtyyE1Ud8AwoQ0dST7EHgYS9YkY /9aw== X-Gm-Message-State: AOAM530M3I25J1oa05e/0v7L1IKCVMYBbyLQc1IzR2jkPduxulisQr2J s/Bqo1czow4TsjUOyzPhvfqFKm+nlAI= X-Google-Smtp-Source: ABdhPJzow+rnhGOCwy5jf9hW77YkizYp7ukAWBFBoPLSKgK3O7gBDJo1XSe7kIPEpAnjzg3cfaYuDA== X-Received: by 2002:a9d:460b:0:b0:605:da9d:31eb with SMTP id y11-20020a9d460b000000b00605da9d31ebmr9936ote.286.1651782383491; Thu, 05 May 2022 13:26:23 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v2 2/2] cpu_ppc64: add support for host-model on POWER10 Date: Thu, 5 May 2022 17:26:14 -0300 Message-Id: <20220505202614.379732-3-danielhb413@gmail.com> In-Reply-To: <20220505202614.379732-1-danielhb413@gmail.com> References: <20220505202614.379732-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-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: danielhb413@gmail.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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: 1651782395449100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 8 ++--- .../pseries-cpu-compat-power10.args | 32 +++++++++++++++++++ .../pseries-cpu-compat-power10.err | 1 + .../pseries-cpu-compat-power10.xml | 21 ++++++++++++ tests/qemuxml2argvtest.c | 11 +++++++ tests/testutilshostcpus.h | 11 +++++++ tests/testutilsqemu.c | 4 ++- tests/testutilsqemu.h | 1 + 8 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.args create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.err create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 314d2f7c86..087635404d 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -88,22 +88,22 @@ ppc64CheckCompatibilityMode(const char *host_model, if (!compat_mode) return VIR_CPU_COMPARE_IDENTICAL; =20 - /* Valid host CPUs: POWER6, POWER7, POWER8, POWER9 */ + /* Valid host CPUs: POWER6, POWER7, POWER8, POWER9, POWER10 */ if (!STRPREFIX(host_model, "POWER") || !(tmp =3D (char *) host_model + strlen("POWER")) || virStrToLong_i(tmp, NULL, 10, &host) < 0 || - host < 6 || host > 9) { + host < 6 || host > 10) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Host CPU does not support compatibility modes")); return VIR_CPU_COMPARE_ERROR; } =20 - /* Valid compatibility modes: power6, power7, power8, power9 */ + /* Valid compatibility modes: power6, power7, power8, power9, power10 = */ if (!STRPREFIX(compat_mode, "power") || !(tmp =3D (char *) compat_mode + strlen("power")) || virStrToLong_i(tmp, NULL, 10, &compat) < 0 || - compat < 6 || compat > 9) { + compat < 6 || compat > 10) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unknown compatibility mode %s"), compat_mode); diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.args b/tests= /qemuxml2argvdata/pseries-cpu-compat-power10.args new file mode 100644 index 0000000000..cc485d960f --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.args @@ -0,0 +1,32 @@ +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 \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,file=3D/tmp/lib/domain--1-QEMU= Guest1/master-key.aes \ +-machine pseries,usb=3Doff,dump-guest-core=3Doff,max-cpu-compat=3Dpower10 \ +-accel kvm \ +-cpu host \ +-m 256 \ +-overcommit mem-lock=3Doff \ +-smp 4,sockets=3D4,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-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 spapr-vty,chardev=3Dcharserial0,id=3Dserial0,reg=3D805306368 \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.err b/tests/= qemuxml2argvdata/pseries-cpu-compat-power10.err new file mode 100644 index 0000000000..f2322ccea5 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.err @@ -0,0 +1 @@ +the CPU is incompatible with host CPU diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml b/tests/= qemuxml2argvdata/pseries-cpu-compat-power10.xml new file mode 100644 index 0000000000..1414f5bb75 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml @@ -0,0 +1,21 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 4 + + hvm + + + power10 + + + + /usr/bin/qemu-system-ppc64 + +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1f080daba7..78e7d89f8e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2209,6 +2209,17 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_VTY); qemuTestSetHostCPU(&driver, driver.hostarch, NULL); =20 + DO_TEST_FAILURE("pseries-cpu-compat-power10", + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_KVM); + + qemuTestSetHostCPU(&driver, driver.hostarch, cpuPower10); + DO_TEST("pseries-cpu-compat-power10", + QEMU_CAPS_KVM, + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, + QEMU_CAPS_DEVICE_SPAPR_VTY); + qemuTestSetHostCPU(&driver, driver.hostarch, NULL); + qemuTestSetHostArch(&driver, VIR_ARCH_NONE); =20 DO_TEST("pseries-panic-missing", diff --git a/tests/testutilshostcpus.h b/tests/testutilshostcpus.h index cf0fc833e1..e38d7c8b5a 100644 --- a/tests/testutilshostcpus.h +++ b/tests/testutilshostcpus.h @@ -114,6 +114,15 @@ static virCPUDef cpuPower9Data =3D { .threads =3D 1, }; =20 +static virCPUDef cpuPower10Data =3D { + .type =3D VIR_CPU_TYPE_HOST, + .arch =3D VIR_ARCH_PPC64, + .model =3D (char *) "POWER10", + .sockets =3D 1, + .cores =3D 16, + .threads =3D 1, +}; + static virCPUDef cpuAarch64Data =3D { .type =3D VIR_CPU_TYPE_HOST, .arch =3D VIR_ARCH_AARCH64, @@ -154,6 +163,8 @@ testUtilsHostCpusGetDefForModel(const char *model) return virCPUDefCopy(&cpuPower8Data); else if (STREQ(model, "POWER9")) return virCPUDefCopy(&cpuPower9Data); + else if (STREQ(model, "POWER10")) + return virCPUDefCopy(&cpuPower10Data); =20 return NULL; } diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 105b41cbeb..8f1b72890a 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -22,6 +22,7 @@ virCPUDef *cpuDefault; virCPUDef *cpuHaswell; virCPUDef *cpuPower8; virCPUDef *cpuPower9; +virCPUDef *cpuPower10; =20 =20 static const char *qemu_emulators[VIR_ARCH_LAST] =3D { @@ -567,7 +568,8 @@ int qemuTestDriverInit(virQEMUDriver *driver) if (!(cpuDefault =3D virCPUDefCopy(&cpuDefaultData)) || !(cpuHaswell =3D virCPUDefCopy(&cpuHaswellData)) || !(cpuPower8 =3D virCPUDefCopy(&cpuPower8Data)) || - !(cpuPower9 =3D virCPUDefCopy(&cpuPower9Data))) + !(cpuPower9 =3D virCPUDefCopy(&cpuPower9Data)) || + !(cpuPower10 =3D virCPUDefCopy(&cpuPower10Data))) return -1; =20 if (virMutexInit(&driver->lock) < 0) diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index 187f9b7cd3..76a6954019 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -106,6 +106,7 @@ extern virCPUDef *cpuDefault; extern virCPUDef *cpuHaswell; extern virCPUDef *cpuPower8; extern virCPUDef *cpuPower9; +extern virCPUDef *cpuPower10; =20 void qemuTestSetHostArch(virQEMUDriver *driver, virArch arch); --=20 2.32.0