From nobody Tue May 14 19:06:01 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 1653397383013816.0940224919594; Tue, 24 May 2022 06:03:03 -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-52-1mTKWk3yPcirkE3uA3Sw7Q-1; Tue, 24 May 2022 09:02:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3B08280A0C0; Tue, 24 May 2022 13:02:53 +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 214FA40CF8F5; Tue, 24 May 2022 13:02:53 +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 DB8D2194EB96; Tue, 24 May 2022 13:02:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 775A7194EB95 for ; Tue, 24 May 2022 13:02:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5BB4C40CF8F5; Tue, 24 May 2022 13:02:51 +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 57CB740CF8F4 for ; Tue, 24 May 2022 13:02:51 +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 3BB6D100BAC8 for ; Tue, 24 May 2022 13:02:51 +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-571-DvEVq7nkNnu4v-2W5N4GgA-1; Tue, 24 May 2022 09:02:49 -0400 Received: by mail-oi1-f179.google.com with SMTP id i66so21271743oia.11 for ; Tue, 24 May 2022 06:02:49 -0700 (PDT) Received: from balboa.ibmmodules.com ([2804:431:c7c7:a8e5:e93c:9cc8:64bc:b4a8]) by smtp.gmail.com with ESMTPSA id r16-20020a9d7cd0000000b006069a0f13dcsm4942119otn.36.2022.05.24.06.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 06:02:48 -0700 (PDT) X-MC-Unique: 1mTKWk3yPcirkE3uA3Sw7Q-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: DvEVq7nkNnu4v-2W5N4GgA-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=Va+QtTLcFl02PCnq1HSSBYH50qPanFdyT+tR8wfGNvw=; b=ImzUhIHHSz4wd3Co78rrINRSxERoxw+j4giq+2OJWxsA+47pSgf1pwXeOFuu8L3rCq xI5aNb49bGYTKZIIhOyKtiXnTvTaTO1igYtP7Fpugd/TFRXf/FmAHUZRyxK/RsEHWnUz EOeUAI3StgJ+X/f7FIm0knFNU1yx5utmlCFKI6LvwgknH1K8AjGGyXWTd58z7DOAkSJf GG5S5FokgAu9a5EmjL4LDgs66SWNuqcAeB1M9HgybgvEgtS5JUFllbBz79K9DpiBbOK6 Xv2i9ZjXpsa5yaHkdOfV96uTaHQ2p8/UPCg/4zkMfQ1GDv5NwYLcBSQeAPtdxA6RmlMD UkjQ== X-Gm-Message-State: AOAM5323NKZNz5CPwkXhTUrPU86xzumoGApfwy7GMep16/PSXByhzhG5 Ox+JvuJBZdKCx3FM+wiH62zp+6NWhfQ= X-Google-Smtp-Source: ABdhPJwdFQ5TKtaftVKvKJhusuy3jkKE9DHuI5AYcO6rf6mM147ml9ExDNUjfB9W+6NxYFYmgXKlfg== X-Received: by 2002:a54:438e:0:b0:2ec:ddab:c219 with SMTP id u14-20020a54438e000000b002ecddabc219mr2234723oiv.180.1653397368429; Tue, 24 May 2022 06:02:48 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 1/3] cpu_map: add POWER10 cpu model Date: Tue, 24 May 2022 10:02:40 -0300 Message-Id: <20220524130242.1559377-2-danielhb413@gmail.com> In-Reply-To: <20220524130242.1559377-1-danielhb413@gmail.com> References: <20220524130242.1559377-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-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.1 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: 1653397383857100003 Content-Type: text/plain; charset="utf-8"; x-default="true" Add POWER10 as a supported cpu model. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel Henrique Barboza --- 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 868b3b0d0a..1fdec901a6 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -189,7 +189,7 @@ - + @@ -661,7 +661,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.ppc64.xml index b0b5fe3271..df02e264d7 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -194,7 +194,7 @@ - + @@ -668,7 +668,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_6.2.0.ppc64.xml index d5a1663c15..983b54430d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -205,7 +205,7 @@ - + @@ -685,7 +685,7 @@ - + diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_7.0.0.ppc64.xml index 6c51e27f46..83e0f50e3a 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -222,7 +222,7 @@ - + @@ -682,7 +682,7 @@ - + --=20 2.32.0 From nobody Tue May 14 19:06:01 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 16533973810461015.325883232034; Tue, 24 May 2022 06:03:01 -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-657-12pf2HmVNGK8qX9GpPuXyw-1; Tue, 24 May 2022 09:02:57 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C8E5187506B; Tue, 24 May 2022 13:02:54 +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 7383640CF8F4; Tue, 24 May 2022 13:02:54 +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 43E3C194EB97; Tue, 24 May 2022 13:02:54 +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 EED42194EB9A for ; Tue, 24 May 2022 13:02:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E34E5400E122; Tue, 24 May 2022 13:02:52 +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 DF205400E423 for ; Tue, 24 May 2022 13:02:52 +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 C27678339B5 for ; Tue, 24 May 2022 13:02:52 +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-372-QW6VSFIWNK6LY1qKHm1WvQ-1; Tue, 24 May 2022 09:02:50 -0400 Received: by mail-oi1-f182.google.com with SMTP id w130so21356987oig.0 for ; Tue, 24 May 2022 06:02:50 -0700 (PDT) Received: from balboa.ibmmodules.com ([2804:431:c7c7:a8e5:e93c:9cc8:64bc:b4a8]) by smtp.gmail.com with ESMTPSA id r16-20020a9d7cd0000000b006069a0f13dcsm4942119otn.36.2022.05.24.06.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 06:02:49 -0700 (PDT) X-MC-Unique: 12pf2HmVNGK8qX9GpPuXyw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: QW6VSFIWNK6LY1qKHm1WvQ-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=n/gNgCdIqFm1dybUC2eRAh6WoR4pOuzwHMqARdKXlU8=; b=woJje70QmUr1mJk3BUF4nrLqBQ4ClaWH9PQvkqmJGQFnbShmiAy/DLJxRWZIVh9gBR kH2KmV2/xOxPofGdn9taJiC/5lbzH8bFsdi9CCdWsBI00dZpO8V9L4yzAnAL3YtftUcI JCEYFPeXO189SJ3odT4B7u8PfoQQUhCYDF5mb7NhsCAkfuqQ6mKJXUenWTDYYEBH1CET Xvc2dN90SFBAR5bgfOXKNnWRTJ5hDmo0jPRBLXZ6aNFJNkMMQOYXxBDLW2H+CzMtnfYt QCgyJHHj0ulEe/bFw/LL51u/JW3vBfZ3wIaL7VPtG7G9Ys8LRCtvG03lNkdaycdMk52n +jbQ== X-Gm-Message-State: AOAM531YqYahYayLnowWnWS4RYOPA8T7igE4sx3OFi58vCewSsTeY/VA b/gZ5vkxTLGfCfqqWotP3pJ67XFIQKQ= X-Google-Smtp-Source: ABdhPJxNGVhrVW20CPkks7Nd23smUYCVge3bE8vnucW/sjBgu4x3tH5APbRB5bmMplThlsbXXrqOng== X-Received: by 2002:a05:6808:8e6:b0:32a:e8e1:7614 with SMTP id d6-20020a05680808e600b0032ae8e17614mr2221368oic.134.1653397369845; Tue, 24 May 2022 06:02:49 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH 2/3] cpu_ppc64: add support for host-model on POWER10 Date: Tue, 24 May 2022 10:02:41 -0300 Message-Id: <20220524130242.1559377-3-danielhb413@gmail.com> In-Reply-To: <20220524130242.1559377-1-danielhb413@gmail.com> References: <20220524130242.1559377-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.1 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: 1653397381847100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 8 ++-- ...eries-cpu-compat-power10.ppc64-latest.args | 34 +++++++++++++++ ...series-cpu-compat-power10.ppc64-latest.err | 1 + .../pseries-cpu-compat-power10.xml | 21 ++++++++++ tests/qemuxml2argvtest.c | 4 ++ ...series-cpu-compat-power10.ppc64-latest.xml | 41 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + tests/testutilshostcpus.h | 11 +++++ tests/testutilsqemu.c | 6 ++- tests/testutilsqemu.h | 2 + 10 files changed, 124 insertions(+), 5 deletions(-) create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64= -latest.args create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64= -latest.err create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml create mode 100644 tests/qemuxml2xmloutdata/pseries-cpu-compat-power10.ppc= 64-latest.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.ppc64-latest= .args b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64-latest.args new file mode 100644 index 0000000000..aafe35c0f8 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64-latest.args @@ -0,0 +1,34 @@ +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 pseries,usb=3Doff,dump-guest-core=3Doff,max-cpu-compat=3Dpower10,= memory-backend=3Dppc_spapr.ram \ +-accel kvm \ +-cpu host \ +-m 256 \ +-object '{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":2684= 35456}' \ +-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 \ +-device '{"driver":"pci-ohci","id":"usb","bus":"pci.0","addr":"0x1"}' \ +-chardev pty,id=3Dcharserial0 \ +-device '{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg= ":805306368}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64-latest= .err b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64-latest.err new file mode 100644 index 0000000000..f2322ccea5 --- /dev/null +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.ppc64-latest.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 5ae245d254..bffe7aef8a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2239,6 +2239,10 @@ mymain(void) QEMU_CPU_DEF_POWER8); DO_TEST_CAPS_LATEST_PPC64_HOSTCPU("pseries-cpu-compat-power9", QEMU_CPU_DEF_POWER9); + DO_TEST_CAPS_LATEST_PPC64_HOSTCPU_FAILURE("pseries-cpu-compat-power10", + QEMU_CPU_DEF_POWER9); + DO_TEST_CAPS_LATEST_PPC64_HOSTCPU("pseries-cpu-compat-power10", + QEMU_CPU_DEF_POWER10); =20 qemuTestSetHostArch(&driver, VIR_ARCH_NONE); =20 diff --git a/tests/qemuxml2xmloutdata/pseries-cpu-compat-power10.ppc64-late= st.xml b/tests/qemuxml2xmloutdata/pseries-cpu-compat-power10.ppc64-latest.x= ml new file mode 100644 index 0000000000..f0fb8fe836 --- /dev/null +++ b/tests/qemuxml2xmloutdata/pseries-cpu-compat-power10.ppc64-latest.xml @@ -0,0 +1,41 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 4 + + hvm + + + + power10 + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + + + + + + +
+ + + +
+ +