From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901168; cv=none; d=zohomail.com; s=zohoarc; b=B3pMYy53OwXnF8ElasLXihJPnkNO8yQYiTfz9xlRe1Gm2rFqGdX6dEw7cjBqWi85cz16xtQqnyq7Rn01C/jKumjTO7Hw/qNX00t46rh073s/5EqR+aUuE5DBFRfLZ7vxIRHvvQor4DhGJrNKjmtdSV+PmV6+zMTRElIFHpZaRpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901168; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uiqLBI90kE+Q3iMlF93Q9Z+4GTAB2PG+8PkVbW7yE1U=; b=DwR1xagVmS4rlqXQjOGbwOvbnhTsnKCem7Kbe2JTqgFTJZwwV+dEwJl3Hs6rlPUSM/fLqGfJvHZ4WIMWFj5ZMMWdA1ZAIjZ5vQbXAPrWLLVWD+BqtIwHiScrA0AiJs4rvIcVgM6HG7ktEt2OwEEqZeS7HrFStlaE8kwcePABK/Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605901168496944.6501782416615; Fri, 20 Nov 2020 11:39:28 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-17-P1245IZdM46ccfce4P0dFw-1; Fri, 20 Nov 2020 14:39:24 -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 920C21005D63; Fri, 20 Nov 2020 19:39: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 48F7910023AD; Fri, 20 Nov 2020 19:39: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 06F041809C9F; Fri, 20 Nov 2020 19:39:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdCdL023258 for ; Fri, 20 Nov 2020 14:39:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id EAAA41E5; Fri, 20 Nov 2020 19:39:12 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE0686064B for ; Fri, 20 Nov 2020 19:39:09 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id DDB5B2402E0; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901166; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uiqLBI90kE+Q3iMlF93Q9Z+4GTAB2PG+8PkVbW7yE1U=; b=HHlfkYgPY0qsYOUvmNSOxPfaecsoxeIvfTs8GJ7FQfjNFj8wU0BnsFogewzi1R/XQjhgoG pjKlV+HykxlQEPE+olZARzoQm1l4amXagx1ZmGRTfc9pjz0ql5R2ZA6yqelLM8VX68Rcmx rMtHTPoIyNRAWIKN0TIblHu8GfPCqaM= X-MC-Unique: P1245IZdM46ccfce4P0dFw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 1/8] conf: Rename virCPUDefUpdateFeatureInternal Date: Fri, 20 Nov 2020 20:39:00 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The function is supposed to add a feature to a CPU definition, let's name it virCPUDefAddFeatureInternal. The behavior in case the feature is already present in the CPU def is configurable and we will soon add a new option to not do anything in that case, which wouldn't really work well with the current *Update* name. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/conf/cpu_conf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 5cf7716b12..55a7925d8a 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -858,10 +858,10 @@ virCPUDefFormatBuf(virBufferPtr buf, } =20 static int -virCPUDefUpdateFeatureInternal(virCPUDefPtr def, - const char *name, - int policy, - bool update) +virCPUDefAddFeatureInternal(virCPUDefPtr def, + const char *name, + int policy, + bool update) { virCPUFeatureDefPtr feat; =20 @@ -898,7 +898,7 @@ virCPUDefUpdateFeature(virCPUDefPtr def, const char *name, int policy) { - return virCPUDefUpdateFeatureInternal(def, name, policy, true); + return virCPUDefAddFeatureInternal(def, name, policy, true); } =20 int @@ -906,7 +906,7 @@ virCPUDefAddFeature(virCPUDefPtr def, const char *name, int policy) { - return virCPUDefUpdateFeatureInternal(def, name, policy, false); + return virCPUDefAddFeatureInternal(def, name, policy, false); } =20 =20 --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901167; cv=none; d=zohomail.com; s=zohoarc; b=dhQH/D2tVpu3Nudzn+njKsAFmIUmZOnOrSE/ixq+jiEwLf1nvKLleVd+GRs7HP2vsvGeS1QJvAderD4DKpMs8qFvdciP3h/zcvwAWdSa4k/A10esTjNKD1Md3I1APP2AAtVasyxn3hsh3VCZJLj3HHKY3WRsQ5K489TLfl8ZkdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901167; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8Y1g/8k+3tdTPfmsSbxbxjPysFQlnJV3lHwYwd/H/FQ=; b=TYsI10DuxP39T8TeP98kBonZXdeZkCG+JbOx2nheyD5oWs0j3qWDqi4sQzX4GyIySPa1CJNWEPMx/fxQeai/aQ081KjTpmC10bYEFWrjeAaV8EbQzmyXPxdhHCI0I/ONpXd3GuIl2oEYeL4MKvHth/EtbjPN2SEAb88caq0f8r4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605901167008573.4551566601683; Fri, 20 Nov 2020 11:39:27 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-19-FcQfLXjTOl-_yXcWZsYiZg-1; Fri, 20 Nov 2020 14:39:23 -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 C1F641868412; Fri, 20 Nov 2020 19:39:17 +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 9F4345D6AD; Fri, 20 Nov 2020 19:39:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 09E031809CA0; Fri, 20 Nov 2020 19:39:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdCu1023243 for ; Fri, 20 Nov 2020 14:39:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7413710023AD; Fri, 20 Nov 2020 19:39:12 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 46C8C10023AC for ; Fri, 20 Nov 2020 19:39:09 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id DF8F92437EF; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901166; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8Y1g/8k+3tdTPfmsSbxbxjPysFQlnJV3lHwYwd/H/FQ=; b=dIEpk0ByGTmtV7dePku1XaI7hnZivKeGXPilO+EzPO/6AGn3xMxNXV3nWVZjoIf9TZsmXV PqVQgNg52jo1HaGvxzI79mH/DTeQAO9il1ujeGfLn08/3BHhCiSM0a8nbvJO2QDaAXjaMv is1RvigDHrfFsfMJhAo4shheIdBlbWM= X-MC-Unique: FcQfLXjTOl-_yXcWZsYiZg-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 2/8] conf: Use enum in virCPUDefAddFeatureInternal Date: Fri, 20 Nov 2020 20:39:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Replace the 'update' bool parameter with an enum so that we can have more than two possible values. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/conf/cpu_conf.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 55a7925d8a..2367d36c32 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -857,11 +857,17 @@ virCPUDefFormatBuf(virBufferPtr buf, return 0; } =20 + +typedef enum { + VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE, /* Fail if feature exists */ + VIR_CPU_ADD_FEATURE_MODE_UPDATE, /* Add feature or update policy */ +} virCPUDefAddFeatureMode; + static int virCPUDefAddFeatureInternal(virCPUDefPtr def, const char *name, int policy, - bool update) + virCPUDefAddFeatureMode mode) { virCPUFeatureDefPtr feat; =20 @@ -869,16 +875,18 @@ virCPUDefAddFeatureInternal(virCPUDefPtr def, policy =3D -1; =20 if ((feat =3D virCPUDefFindFeature(def, name))) { - if (update) { + switch (mode) { + case VIR_CPU_ADD_FEATURE_MODE_UPDATE: feat->policy =3D policy; return 0; - } - - virReportError(VIR_ERR_INTERNAL_ERROR, - _("CPU feature '%s' specified more than once"), - name); =20 - return -1; + case VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE: + default: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("CPU feature '%s' specified more than once"), + name); + return -1; + } } =20 if (VIR_RESIZE_N(def->features, def->nfeatures_max, @@ -898,7 +906,8 @@ virCPUDefUpdateFeature(virCPUDefPtr def, const char *name, int policy) { - return virCPUDefAddFeatureInternal(def, name, policy, true); + return virCPUDefAddFeatureInternal(def, name, policy, + VIR_CPU_ADD_FEATURE_MODE_UPDATE); } =20 int @@ -906,7 +915,8 @@ virCPUDefAddFeature(virCPUDefPtr def, const char *name, int policy) { - return virCPUDefAddFeatureInternal(def, name, policy, false); + return virCPUDefAddFeatureInternal(def, name, policy, + VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE); } =20 =20 --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901167; cv=none; d=zohomail.com; s=zohoarc; b=Hg9Ooe2Z9VpJWU5bMeU5goUcBAVrIDXj+cCevo3epaC5kFqk1C3lZAi1rNc8iC52ekJfl1LpiKyf0V7dUn5X1ZWLyqEXdsgXtqK8bi3KOtQlAm9F1E3FmJeI9O5vV5NXEr9nzvwfGGGw1VjrSZaASKdqbyYzBVPbvyDVLACL+uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901167; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bu1yXZ4WaKE18uTqfJ5UD7osYoQfm18hQshu7IDmBUA=; b=W1DhBqmQxMSU/GF3xdTOpgkWaq59/4tIJ00TZ4foXn13VkFec+FPQaMlV+wDLwO4NsBbS1UBDybUyeyjY+Zz33+l7dOUhjJ4xY4n5EJY54fh7Iq0DHrmFFSzMYw7UaiM7B4goRZsHbXOCp4Svz0e2ZrddBo8pZKXLkNrRYnP51s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 160590116760857.39562509648704; Fri, 20 Nov 2020 11:39:27 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-55-m8PBzgkGO36X8pmI8QriPA-1; Fri, 20 Nov 2020 14:39:23 -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 99E941868404; Fri, 20 Nov 2020 19:39: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 4D65760C15; Fri, 20 Nov 2020 19:39: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 495324BB7B; Fri, 20 Nov 2020 19:39:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdClg023248 for ; Fri, 20 Nov 2020 14:39:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8DBB85C233; Fri, 20 Nov 2020 19:39:12 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 600C95C230 for ; Fri, 20 Nov 2020 19:39:09 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id E17A62437F0; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901166; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Bu1yXZ4WaKE18uTqfJ5UD7osYoQfm18hQshu7IDmBUA=; b=IlIXDXyBgz6nG+XBnISCea8XPp2v9RCko2WkOXmzGL7D7LSLurphoxVxX4lXPHYXyZj0bN oI9aAvEmUwBUP4XCeDEH2RXxxasudeIrcZE5WYYDJk5RcOePTefbS1eDGTLo+6clBXOm1/ ZSU/NlLd/RsdOspoQ91tMC9eDbkQW7g= X-MC-Unique: m8PBzgkGO36X8pmI8QriPA-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 3/8] conf: Add virCPUDefAddFeatureIfMissing Date: Fri, 20 Nov 2020 20:39:02 +0100 Message-Id: <9bf2ecf1d47df46a319341e5e353d413f81d3fe4.1605900836.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This new function adds a feature to a CPU definition only if it is not present there yet. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/conf/cpu_conf.c | 14 ++++++++++++++ src/conf/cpu_conf.h | 5 +++++ src/libvirt_private.syms | 1 + 3 files changed, 20 insertions(+) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 2367d36c32..5ff87cb41c 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -861,6 +861,7 @@ virCPUDefFormatBuf(virBufferPtr buf, typedef enum { VIR_CPU_ADD_FEATURE_MODE_EXCLUSIVE, /* Fail if feature exists */ VIR_CPU_ADD_FEATURE_MODE_UPDATE, /* Add feature or update policy */ + VIR_CPU_ADD_FEATURE_MODE_NEW, /* Add feature if it does not exis= t */ } virCPUDefAddFeatureMode; =20 static int @@ -876,6 +877,9 @@ virCPUDefAddFeatureInternal(virCPUDefPtr def, =20 if ((feat =3D virCPUDefFindFeature(def, name))) { switch (mode) { + case VIR_CPU_ADD_FEATURE_MODE_NEW: + return 0; + case VIR_CPU_ADD_FEATURE_MODE_UPDATE: feat->policy =3D policy; return 0; @@ -920,6 +924,16 @@ virCPUDefAddFeature(virCPUDefPtr def, } =20 =20 +int +virCPUDefAddFeatureIfMissing(virCPUDefPtr def, + const char *name, + int policy) +{ + return virCPUDefAddFeatureInternal(def, name, policy, + VIR_CPU_ADD_FEATURE_MODE_NEW); +} + + virCPUFeatureDefPtr virCPUDefFindFeature(virCPUDefPtr def, const char *name) diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index 3ef14b7932..b744b06c2d 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -229,6 +229,11 @@ virCPUDefUpdateFeature(virCPUDefPtr cpu, const char *name, int policy); =20 +int +virCPUDefAddFeatureIfMissing(virCPUDefPtr def, + const char *name, + int policy); + virCPUFeatureDefPtr virCPUDefFindFeature(virCPUDefPtr def, const char *name); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 79a23f34cb..f5a8209efd 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -96,6 +96,7 @@ virDomainCheckpointTypeToString; virCPUCacheModeTypeFromString; virCPUCacheModeTypeToString; virCPUDefAddFeature; +virCPUDefAddFeatureIfMissing; virCPUDefCheckFeatures; virCPUDefCopy; virCPUDefCopyModel; --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901204; cv=none; d=zohomail.com; s=zohoarc; b=bAhsRQr4KwhVM9qq6ybAZq/bSA3Uq7/+uIEQz1a32J439DwiuVHazWrr6TmsEHNWNxcSM0gW6ebOjVTBAh3168vbXchPw+wTFllcKMwH7t6YeIx7h0bmDTAqTZdaZHYywEojzZFPqJVoXoK5hRULNPJax4OhUUNpnUdAr5uGvvs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901204; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FhIazNmVOeLsE5wClTB/qpqgVA2PgquuBlnfG/7mJnk=; b=Dd/4t1xUzdhzHn7Lk9f73JeKjg7k2DJJn4GtckfwWveBgVND/P2g7yZhofmDJ/DR/HJ+Mg9/dBmqN8rCb2NCWhK72MDolSTUlTyz2ShxDVAXmAjog/B6Db4XNY+eY0t2qtL094RJwwmHBKwzb/7/8P3cSPIm+SVw48FCBW3HN1k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605901204697503.5510865247196; Fri, 20 Nov 2020 11:40:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-304-FoFEdE4tMIWZ2w80Ad8lMw-1; Fri, 20 Nov 2020 14:39:33 -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 D41DD100A646; Fri, 20 Nov 2020 19:39:27 +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 B2EF66085D; Fri, 20 Nov 2020 19:39:27 +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 7ED1E1809CA4; Fri, 20 Nov 2020 19:39:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdD8h023263 for ; Fri, 20 Nov 2020 14:39:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1F4D11E5; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BDA1D13470 for ; Fri, 20 Nov 2020 19:39:09 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id E39A62437F1; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901203; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FhIazNmVOeLsE5wClTB/qpqgVA2PgquuBlnfG/7mJnk=; b=hXcDdpdZv7dMcMMS8nkvcVteAFTbK/oLj8hxbRbglJnPXl1TedbNzteg5frCaxTtzykaOh GuAbisKTgLmFhHEf/iOKJKLCILtLfPuuwbXEgzyn6My2k1asfyHffTLir/0FpBlfq20Fj2 0Bm7ERETbuSlguzFhfXvicBFwf2GX4o= X-MC-Unique: FoFEdE4tMIWZ2w80Ad8lMw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 4/8] cpu: Run arch specific code for virCPUUpdate for all custom CPUs Date: Fri, 20 Nov 2020 20:39:03 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Until now, the function returned immediately when the guest CPU definition did not use optional features or minimum match. Clearly, there's nothing to be updated according to the host CPU in this case, but the arch specific code may still want to do some compatibility updates based on the model and features used in the guest CPU definition. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu/cpu.c | 52 +++++++++++++++++++++++++-------------------- src/cpu/cpu.h | 3 ++- src/cpu/cpu_arm.c | 5 +++-- src/cpu/cpu_ppc64.c | 3 ++- src/cpu/cpu_s390.c | 6 +++++- src/cpu/cpu_x86.c | 6 +++++- 6 files changed, 46 insertions(+), 29 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index bf94811960..44094bd0df 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -538,12 +538,11 @@ virCPUBaseline(virArch arch, * @guest: guest CPU definition to be updated * @host: host CPU definition * - * Updates @guest CPU definition according to @host CPU. This is required = to - * support guest CPU definitions specified relatively to host CPU, such as - * CPUs with VIR_CPU_MODE_CUSTOM and optional features or - * VIR_CPU_MATCH_MINIMUM, or CPUs with VIR_CPU_MODE_HOST_MODEL. - * When the guest CPU was not specified relatively, the function does noth= ing - * and returns success. + * Updates @guest CPU definition possibly taking @host CPU into account. T= his + * is required for maintaining compatibility with older libvirt releases o= r to + * support guest CPU definitions specified relatively to host CPU, such as= CPUs + * with VIR_CPU_MODE_CUSTOM and optional features or VIR_CPU_MATCH_MINIMUM= , or + * CPUs with VIR_CPU_MODE_HOST_MODEL. * * Returns 0 on success, -1 on error. */ @@ -553,6 +552,7 @@ virCPUUpdate(virArch arch, const virCPUDef *host) { struct cpuArchDriver *driver; + bool relative; =20 VIR_DEBUG("arch=3D%s, guest=3D%p mode=3D%s model=3D%s, host=3D%p model= =3D%s", virArchToString(arch), guest, virCPUModeTypeToString(guest->= mode), @@ -561,30 +561,36 @@ virCPUUpdate(virArch arch, if (!(driver =3D cpuGetSubDriver(arch))) return -1; =20 - if (guest->mode =3D=3D VIR_CPU_MODE_HOST_PASSTHROUGH) + switch ((virCPUMode) guest->mode) { + case VIR_CPU_MODE_HOST_PASSTHROUGH: return 0; =20 - if (guest->mode =3D=3D VIR_CPU_MODE_CUSTOM && - guest->match !=3D VIR_CPU_MATCH_MINIMUM) { - size_t i; - bool optional =3D false; + case VIR_CPU_MODE_HOST_MODEL: + relative =3D true; + break; =20 - for (i =3D 0; i < guest->nfeatures; i++) { - if (guest->features[i].policy =3D=3D VIR_CPU_FEATURE_OPTIONAL)= { - optional =3D true; - break; + case VIR_CPU_MODE_CUSTOM: + if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { + relative =3D true; + } else { + size_t i; + + relative =3D false; + for (i =3D 0; i < guest->nfeatures; i++) { + if (guest->features[i].policy =3D=3D VIR_CPU_FEATURE_OPTIO= NAL) { + relative =3D true; + break; + } } } + break; =20 - if (!optional) - return 0; + case VIR_CPU_MODE_LAST: + default: + virReportEnumRangeError(virCPUMode, guest->mode); + return -1; } =20 - /* We get here if guest CPU is either - * - host-model - * - custom with minimum match - * - custom with optional features - */ if (!driver->update) { virReportError(VIR_ERR_NO_SUPPORT, _("cannot update guest CPU for %s architecture"), @@ -592,7 +598,7 @@ virCPUUpdate(virArch arch, return -1; } =20 - if (driver->update(guest, host) < 0) + if (driver->update(guest, host, relative) < 0) return -1; =20 VIR_DEBUG("model=3D%s", NULLSTR(guest->model)); diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index cc2d132275..ff4fb7e103 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -79,7 +79,8 @@ typedef virCPUDefPtr =20 typedef int (*virCPUArchUpdate)(virCPUDefPtr guest, - const virCPUDef *host); + const virCPUDef *host, + bool relative); =20 typedef int (*virCPUArchUpdateLive)(virCPUDefPtr cpu, diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 31997b59cd..8a408a324a 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -415,11 +415,12 @@ virCPUarmGetMap(void) =20 static int virCPUarmUpdate(virCPUDefPtr guest, - const virCPUDef *host) + const virCPUDef *host, + bool relative) { g_autoptr(virCPUDef) updated =3D NULL; =20 - if (guest->mode !=3D VIR_CPU_MODE_HOST_MODEL) + if (!relative || guest->mode !=3D VIR_CPU_MODE_HOST_MODEL) return 0; =20 if (!host) { diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 555eeecbe7..d71d147207 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -614,7 +614,8 @@ virCPUppc64GetHost(virCPUDefPtr cpu, =20 static int virCPUppc64Update(virCPUDefPtr guest, - const virCPUDef *host G_GNUC_UNUSED) + const virCPUDef *host G_GNUC_UNUSED, + bool relative G_GNUC_UNUSED) { /* * - host-passthrough doesn't even get here diff --git a/src/cpu/cpu_s390.c b/src/cpu/cpu_s390.c index c1c5686244..17321dc04a 100644 --- a/src/cpu/cpu_s390.c +++ b/src/cpu/cpu_s390.c @@ -43,11 +43,15 @@ virCPUs390Compare(virCPUDefPtr host G_GNUC_UNUSED, =20 static int virCPUs390Update(virCPUDefPtr guest, - const virCPUDef *host) + const virCPUDef *host, + bool relative) { g_autoptr(virCPUDef) updated =3D NULL; size_t i; =20 + if (!relative) + return 0; + if (guest->mode =3D=3D VIR_CPU_MODE_CUSTOM) { if (guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 0e533c62e1..72f17070e1 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2936,12 +2936,16 @@ x86UpdateHostModel(virCPUDefPtr guest, =20 static int virCPUx86Update(virCPUDefPtr guest, - const virCPUDef *host) + const virCPUDef *host, + bool relative) { g_autoptr(virCPUx86Model) model =3D NULL; virCPUx86MapPtr map; size_t i; =20 + if (!relative) + return 0; + if (!host) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("unknown host CPU model")); --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901180; cv=none; d=zohomail.com; s=zohoarc; b=Fk9zuGwcSyHljux8f/gedyMM40ZeuKEeZ4UeydDYIuOFvq/NCbBwHlTmD3xQ8pYztFmVJeBnkUUyXn4O/k4cV8Av+4mxlTYCpgwZXLXzOJEPANdViqWpsiefo3Ptiy30aXWekDKrEvhrmljSwmcd7FjrXSoGrLgb/7ZEwC28G6w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901180; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UVNqdsuSyMJ/1cD/Gz73koKDsJ794O5wFRueBoKbGYc=; b=aqYA8WYNo0/JwmDJlVv2ZHgvc+NlEA7IKlq+uQl0EGv+wEU5di07hJQ3lYStcw30MRaz9Ii0UVT/lQGkLDKqLp0p0U28bmuMZGNLdsUF/ZbTGV5FwmGYYSaijc5iSfX3MSBtnDVekegDhuGOU/86mxCGHhgSGiV3pMqixf3DDI4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605901180006973.0488455153725; Fri, 20 Nov 2020 11:39:40 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-I4olCYMKM2qEtCGaXHnhcw-1; Fri, 20 Nov 2020 14:39:36 -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 9F3C380ED8B; Fri, 20 Nov 2020 19:39:30 +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 7E3571349A; Fri, 20 Nov 2020 19:39:30 +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 49E051809CA9; Fri, 20 Nov 2020 19:39:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdDxX023268 for ; Fri, 20 Nov 2020 14:39:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id F1D5F6085D; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4BF460853 for ; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id E56702437F2; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UVNqdsuSyMJ/1cD/Gz73koKDsJ794O5wFRueBoKbGYc=; b=d2ExziFXLUj/xD6wgWY1CPdDEZ1Mbpit/pGH5WQlfGX79luQr2volyzIplXFXV0dOqOkFN UujFJSNR8nsaFAMmkSiWbyqGi9ZXHCR26OodiWSrIdxEhgZcZSp5DvbU5cdMToj9ij50VL Xy7wn8Rlk4jiBhQaiiMmyZp23hJxhU8= X-MC-Unique: I4olCYMKM2qEtCGaXHnhcw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 5/8] cpu_x86: Change the flow in virCPUx86Update Date: Fri, 20 Nov 2020 20:39:04 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This is just a preparation for adding new functionality to virCPUx86Update. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu/cpu_x86.c | 49 ++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 72f17070e1..a7ff095456 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -2943,38 +2943,39 @@ virCPUx86Update(virCPUDefPtr guest, virCPUx86MapPtr map; size_t i; =20 - if (!relative) - return 0; - - if (!host) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("unknown host CPU model")); - return -1; - } - if (!(map =3D virCPUx86GetMap())) return -1; =20 - if (!(model =3D x86ModelFromCPU(host, map, -1))) - return -1; + if (relative) { + if (!host) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("unknown host CPU model")); + return -1; + } =20 - for (i =3D 0; i < guest->nfeatures; i++) { - if (guest->features[i].policy =3D=3D VIR_CPU_FEATURE_OPTIONAL) { - int supported =3D x86FeatureInData(guest->features[i].name, - &model->data, map); - if (supported < 0) + if (!(model =3D x86ModelFromCPU(host, map, -1))) + return -1; + + for (i =3D 0; i < guest->nfeatures; i++) { + if (guest->features[i].policy =3D=3D VIR_CPU_FEATURE_OPTIONAL)= { + int supported =3D x86FeatureInData(guest->features[i].name, + &model->data, map); + if (supported < 0) + return -1; + else if (supported) + guest->features[i].policy =3D VIR_CPU_FEATURE_REQUIRE; + else + guest->features[i].policy =3D VIR_CPU_FEATURE_DISABLE; + } + } + + if (guest->mode =3D=3D VIR_CPU_MODE_HOST_MODEL || + guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) { + if (x86UpdateHostModel(guest, host) < 0) return -1; - else if (supported) - guest->features[i].policy =3D VIR_CPU_FEATURE_REQUIRE; - else - guest->features[i].policy =3D VIR_CPU_FEATURE_DISABLE; } } =20 - if (guest->mode =3D=3D VIR_CPU_MODE_HOST_MODEL || - guest->match =3D=3D VIR_CPU_MATCH_MINIMUM) - return x86UpdateHostModel(guest, host); - return 0; } =20 --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901179; cv=none; d=zohomail.com; s=zohoarc; b=h1tFtPk4+GM4QkicU+L6PVkPjYjD9cfUaLAf3lbxrjFSKYOXX/8FPBWKYn7c7ZI+689efcxm0rlAwdb+/Q91E+gbWwdVLJifaZVQHwRRWgPTIahXqJgXEFdaUpAyWswdLJbLEmthhCn5foyCK3uN8VRw1UT8Oz+a3K0Kmnzr0UE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901179; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fu1t+Inv1UhCruaVxpspQ6kXY8Oi54EfF8RUN7nxoqM=; b=g/j0rXWGhvlSQOGc97b7HJPbka6vKHjiQ+WPELn9iVSmKp8/mywFCgQVR3i8p6uAQ/RnjCVmlYzY+5r3FwEdALBzlEbh/PEk2YnxnBtv4dYresfVU5Og73uB6FlFjzDc3OXRwbsheS6jDxVFPFp9iVchPjlgv8vJcPYBlmgtq94= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605901179789123.14138670224861; Fri, 20 Nov 2020 11:39:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-525-8e2HgVqmNl6P8no2Z_jUUQ-1; Fri, 20 Nov 2020 14:39:36 -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 D3637100A642; Fri, 20 Nov 2020 19:39:29 +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 B15C11349A; Fri, 20 Nov 2020 19:39:29 +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 7D8801809CA2; Fri, 20 Nov 2020 19:39:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdEga023269 for ; Fri, 20 Nov 2020 14:39:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id F371E60853; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C6FF16085A for ; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id E723A2437F4; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fu1t+Inv1UhCruaVxpspQ6kXY8Oi54EfF8RUN7nxoqM=; b=QWf+8poCzbUmEBG/ozlSlZK3zXYstPDkXOZb0D+JBRJ6JpXZqU3zEf2kYq5iIJyJVGaSiP V56XMjQNJowcBT1qMF5j+QiMy+Tz3hd1jH+lfL4b5kxEetwEKEmfwsutK2vaUfOWYt0r0B /U+Oc0BFo/gW+RVkkFnWY6Dp8l/pW9k= X-MC-Unique: 8e2HgVqmNl6P8no2Z_jUUQ-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 6/8] cpu_x86: Add support for marking features as removed from a CPU model Date: Fri, 20 Nov 2020 20:39:05 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The patch adds a new attribute for the 'feature' element in CPU model specification to indicate that a given feature was removed from a CPU model. In other words, older versions of libvirt would consider such feature to be included in the CPU model. Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu/cpu_x86.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index a7ff095456..40bf5b68d0 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -144,6 +144,7 @@ struct _virCPUx86Model { virCPUx86VendorPtr vendor; virCPUx86SignaturesPtr signatures; virCPUx86Data data; + GStrv removedFeatures; }; =20 typedef struct _virCPUx86Map virCPUx86Map; @@ -1241,6 +1242,7 @@ x86ModelFree(virCPUx86ModelPtr model) g_free(model->name); virCPUx86SignaturesFree(model->signatures); virCPUx86DataClear(&model->data); + g_strfreev(model->removedFeatures); g_free(model); } G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUx86Model, x86ModelFree); @@ -1255,6 +1257,7 @@ x86ModelCopy(virCPUx86ModelPtr model) copy->name =3D g_strdup(model->name); copy->signatures =3D virCPUx86SignaturesCopy(model->signatures); x86DataCopy(©->data, &model->data); + copy->removedFeatures =3D g_strdupv(model->removedFeatures); copy->vendor =3D model->vendor; =20 return g_steal_pointer(©); @@ -1575,6 +1578,7 @@ x86ModelParseFeatures(virCPUx86ModelPtr model, =20 for (i =3D 0; i < n; i++) { g_autofree char *ftname =3D NULL; + g_autofree char *removed =3D NULL; virCPUx86FeaturePtr feature; =20 if (!(ftname =3D virXMLPropString(nodes[i], "name"))) { @@ -1591,6 +1595,24 @@ x86ModelParseFeatures(virCPUx86ModelPtr model, return -1; } =20 + if ((removed =3D virXMLPropString(nodes[i], "removed"))) { + int rem; + + if ((rem =3D virTristateBoolTypeFromString(removed)) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Invalid 'removed' attribute for feature = %s " + "in model %s"), + ftname, model->name); + return -1; + } + + if (rem =3D=3D VIR_TRISTATE_BOOL_YES) { + if (virStringListAdd(&model->removedFeatures, ftname) < 0) + return -1; + continue; + } + } + if (x86DataAdd(&model->data, &feature->data)) return -1; } --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901179; cv=none; d=zohomail.com; s=zohoarc; b=XF8Edthp3/1EyMTD27p2QcsxraVBAjFBhps4gAmyLyZHUSOXwlhjQG6n0Qdn42AOFIiSNOhrdedyN68KdAgm7Gz0XwT1HoMPFlcnlFxnMoYEVj2aWEG5fwP4CGzTxS1wpgKNDlZ4D0La3Hk+HJUSEpeOB1D45QFUjfVWJmqx+ss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901179; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BIJfuoLLZXW1XXLi5xuhwZlBXJcxeuY/Nt9ML8gnfdA=; b=PMJWPLurnApwzBTvwWCQJtgGlypeV4Q9NkWjvj9oos6+RRiWBLL+cGVrS5+90nqCVDwlqrW9KVNe+2KUARtOgPPjQnzpGCK9OE3I6Gwf6VBnSiNEqMrXBjWIyGLdfEEvnNDVVBDgYHcTPw3h+kTbAZDVr5yR7ZyOiN76SgOIqAw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605901179247795.9904500664778; Fri, 20 Nov 2020 11:39:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-500-176Jnvn_MoOuyEZE1LBiYw-1; Fri, 20 Nov 2020 14:39:36 -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 ABB19100A643; Fri, 20 Nov 2020 19:39:30 +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 8D1465D9D5; Fri, 20 Nov 2020 19:39:30 +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 593931809CA8; Fri, 20 Nov 2020 19:39:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdH9S023300 for ; Fri, 20 Nov 2020 14:39:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id 38C585D6CF; Fri, 20 Nov 2020 19:39:17 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5F7A5D6BA for ; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id E93692437F5; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BIJfuoLLZXW1XXLi5xuhwZlBXJcxeuY/Nt9ML8gnfdA=; b=KjGAUOr5Nunr+bEql3a5Dky3hzz2hXXQ7TYHknp5JNKTFGRi+kRX5B6jdzQFWtQjvSb0oy 8BAgdelH6kpbtOkcp1Ow5h09q58exxo+9+ikPHF5hVgvhsg08kq7muLi61CkJu2XRHkgRY hTusmiXcD5AGATyMzptaFxMK6qiGL4U= X-MC-Unique: 176Jnvn_MoOuyEZE1LBiYw-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 7/8] cpu_x86: Make sure removed features are always mentioned in CPU def Date: Fri, 20 Nov 2020 20:39:06 +0100 Message-Id: <58712dd056ce8945a314fbd56871a1a1a16a82c7.1605900836.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" For backward compatibility with older versions of libvirt CPU models in our CPU map are mostly immutable. We only changed them in a few specific cases after showing it was safe. Sometimes QEMU developers realize a specific feature should not be part of a particular (or any) CPU model because it can never be enabled automatically without further configuration. But we couldn't follow them because doing so would break migration to older libvirt. If QEMU drops feature F from CPU model M because F could not be enabled automatically anyway, asking for M would never enable F. Even with older QEMU versions. Naively removing F from libvirt's definition of M would seem to work nicely on a single host. Libvirt would consider M to be compatible with hosts CPU that do not support F. However, trying to migrate domains using M without explicitly enabling or disabling F could fail, because older libvirt would think F was enabled (it is part of M there), but QEMU reports it as disabled once started. Thus we can remove such feature from a libvirt's CPU model, but we have to make sure any CPU definition using the affected model will always explicitly mention the state of the removed feature. https://bugzilla.redhat.com/show_bug.cgi?id=3D1798004 Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu/cpu_x86.c | 58 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 40bf5b68d0..2422e258ec 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -804,11 +804,37 @@ x86DataAddSignature(virCPUx86Data *data, } =20 =20 +/* + * Disables features removed from the CPU @model unless they are already + * mentioned in @cpu to make sure these features will always be explicitly + * listed in the CPU definition. + */ +static int +virCPUx86DisableRemovedFeatures(virCPUDefPtr cpu, + virCPUx86ModelPtr model) +{ + char **feat =3D model->removedFeatures; + + if (!feat) + return 0; + + while (*feat) { + if (virCPUDefAddFeatureIfMissing(cpu, *feat, VIR_CPU_FEATURE_DISAB= LE) < 0) + return -1; + + feat++; + } + + return 0; +} + + static virCPUDefPtr x86DataToCPU(const virCPUx86Data *data, virCPUx86ModelPtr model, virCPUx86MapPtr map, - virDomainCapsCPUModelPtr hvModel) + virDomainCapsCPUModelPtr hvModel, + virCPUType cpuType) { g_autoptr(virCPUDef) cpu =3D NULL; g_auto(virCPUx86Data) copy =3D VIR_CPU_X86_DATA_INIT; @@ -851,6 +877,13 @@ x86DataToCPU(const virCPUx86Data *data, x86DataToCPUFeatures(cpu, VIR_CPU_FEATURE_DISABLE, &modelData, map= )) return NULL; =20 + if (cpuType =3D=3D VIR_CPU_TYPE_GUEST) { + if (virCPUx86DisableRemovedFeatures(cpu, model) < 0) + return NULL; + } + + cpu->type =3D cpuType; + return g_steal_pointer(&cpu); } =20 @@ -2197,9 +2230,9 @@ x86Decode(virCPUDefPtr cpu, continue; } =20 - if (!(cpuCandidate =3D x86DataToCPU(&data, candidate, map, hvModel= ))) + if (!(cpuCandidate =3D x86DataToCPU(&data, candidate, map, hvModel, + cpu->type))) return -1; - cpuCandidate->type =3D cpu->type; =20 if ((rc =3D x86DecodeUseCandidate(model, cpuModel, candidate, cpuCandidate, @@ -2962,6 +2995,7 @@ virCPUx86Update(virCPUDefPtr guest, bool relative) { g_autoptr(virCPUx86Model) model =3D NULL; + virCPUx86ModelPtr guestModel; virCPUx86MapPtr map; size_t i; =20 @@ -2998,6 +3032,15 @@ virCPUx86Update(virCPUDefPtr guest, } } =20 + if (!(guestModel =3D x86ModelFind(map, guest->model))) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Unknown CPU model %s"), guest->model); + return -1; + } + + if (virCPUx86DisableRemovedFeatures(guest, guestModel) < 0) + return -1; + return 0; } =20 @@ -3067,6 +3110,9 @@ virCPUx86UpdateLive(virCPUDefPtr cpu, } } =20 + if (virCPUx86DisableRemovedFeatures(cpu, model) < 0) + return -1; + virBufferTrim(&bufAdded, ","); virBufferTrim(&bufRemoved, ","); =20 @@ -3190,6 +3236,7 @@ virCPUx86ExpandFeatures(virCPUDefPtr cpu) } =20 model =3D x86ModelCopy(model); + if (x86DataToCPUFeatures(expanded, host ? -1 : VIR_CPU_FEATURE_REQUIRE, &model->data, map) < 0) return -1; @@ -3206,6 +3253,11 @@ virCPUx86ExpandFeatures(virCPUDefPtr cpu) return -1; } =20 + if (!host) { + if (virCPUx86DisableRemovedFeatures(expanded, model) < 0) + return -1; + } + virCPUDefFreeModel(cpu); =20 return virCPUDefCopyModel(cpu, expanded, false); --=20 2.29.2 From nobody Thu Mar 28 16:39:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605901210; cv=none; d=zohomail.com; s=zohoarc; b=Xf4GMrfgklDEHIFMSScfHgPdraTo76wviFJ45d4fm7fAr41csL3DMfti7fuGVMLxt0NfGCa7BIHws/TlzkzV0ly8YfkXp0zVxTaY5OA5wGkMxtuc3FDJIpDZRW9tSxdErZ+kXuLy9dOHa0VTXtkGaF7Ci72/BOkP4xe6MJX7Svs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605901210; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8Jyhqo1b7OpVHqALUwyGicOYBiarGt7ogJ2Mx7zj8vk=; b=A4jONdfhAO4fAIkyAs9GsuOh/6crTgvoaDg8xWq1CNp2bAToCKtCpaLWQ24OeUSeC4JkOF5vyR9SVbCnveMeUHzTiBZhbUrp1YSJQ9kQU3P+WrOex7SHL53X7IZYP6oI9o20FLCgcKSE5VteqAFe1Ge59/yozlJi8ECRbLojfc0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605901210827530.1825969698107; Fri, 20 Nov 2020 11:40:10 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-4TkoRkD-Mo6x6imkmqVv3Q-1; Fri, 20 Nov 2020 14:39:38 -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 6EE991005D6B; Fri, 20 Nov 2020 19:39:32 +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 4B9F060C17; Fri, 20 Nov 2020 19:39:32 +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 14A4D1809CAF; Fri, 20 Nov 2020 19:39:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AKJdEap023279 for ; Fri, 20 Nov 2020 14:39:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 694D71E5; Fri, 20 Nov 2020 19:39:14 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.194.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E07D56064B for ; Fri, 20 Nov 2020 19:39:13 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id EBA232437F6; Fri, 20 Nov 2020 20:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605901209; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=8Jyhqo1b7OpVHqALUwyGicOYBiarGt7ogJ2Mx7zj8vk=; b=cy9Rq7JMv4kyYnXbeJxnmIc0VMazKd55T+P+fgVs0zmPQi//Qd2rWzqzBEUXoW/s8xsw0a +YijxG3hnlLoMLlrWu1CFP07Qd2zYpZGeomzw6CI9w+oK8IiyNtfZusgNj2itOl/8nMmTN RMJHATlsu9mOFjJLmpl7q7j5KGmpAz8= X-MC-Unique: 4TkoRkD-Mo6x6imkmqVv3Q-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 8/8] cpu_map: Drop 'monitor' from modern x86 CPU models Date: Fri, 20 Nov 2020 20:39:07 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.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-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The feature is never enabled by default on KVM and QEMU dropped it from the models long ago. https://bugzilla.redhat.com/show_bug.cgi?id=3D1798004 Signed-off-by: Jiri Denemark Reviewed-by: Tim Wiederhake --- src/cpu_map/x86_Dhyana.xml | 2 +- src/cpu_map/x86_EPYC-IBPB.xml | 2 +- src/cpu_map/x86_EPYC.xml | 2 +- src/cpu_map/x86_Opteron_G3.xml | 2 +- tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml | 1 + .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml | 1 + .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml | 1 + .../x86_64-cpuid-EPYC-7601-32-Core-ibpb-json.xml | 2 +- tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-json.xml | 2 +- .../x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml | 1 + .../x86_64-cpuid-Hygon-C86-7185-32-core-host.xml | 1 + .../x86_64-cpuid-Hygon-C86-7185-32-core-json.xml | 2 +- tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml | 1 + tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml | 2 +- tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml | 2 +- .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 1 + .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml | 1 + .../x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml | 2 +- tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 1 + tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args | 6 +++--- 34 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/cpu_map/x86_Dhyana.xml b/src/cpu_map/x86_Dhyana.xml index 689daf8649..cfde07f99f 100644 --- a/src/cpu_map/x86_Dhyana.xml +++ b/src/cpu_map/x86_Dhyana.xml @@ -33,7 +33,7 @@ - + diff --git a/src/cpu_map/x86_EPYC-IBPB.xml b/src/cpu_map/x86_EPYC-IBPB.xml index 983c5f4445..fc5aadf52e 100644 --- a/src/cpu_map/x86_EPYC-IBPB.xml +++ b/src/cpu_map/x86_EPYC-IBPB.xml @@ -34,7 +34,7 @@ - + diff --git a/src/cpu_map/x86_EPYC.xml b/src/cpu_map/x86_EPYC.xml index 3ebba9f4ed..3b406de37a 100644 --- a/src/cpu_map/x86_EPYC.xml +++ b/src/cpu_map/x86_EPYC.xml @@ -33,7 +33,7 @@ - + diff --git a/src/cpu_map/x86_Opteron_G3.xml b/src/cpu_map/x86_Opteron_G3.xml index dab59d4f82..cf00af8698 100644 --- a/src/cpu_map/x86_Opteron_G3.xml +++ b/src/cpu_map/x86_Opteron_G3.xml @@ -18,7 +18,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml b/t= ests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml index 0053913327..9d14213a0b 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-guest.xml @@ -2,6 +2,7 @@ EPYC AMD + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml b/te= sts/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml index 7acab0a999..8c2c975fdd 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-host.xml @@ -3,6 +3,7 @@ EPYC AMD + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xm= l b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml index 9164987bbd..1fee2fa9f8 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml @@ -2,6 +2,7 @@ EPYC-IBPB AMD + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml= b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml index 2fa8861e44..c3bbf78396 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml @@ -3,6 +3,7 @@ EPYC-IBPB AMD + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-json.xml= b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-json.xml index af1e7f2f32..45f27a9a1f 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-json.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-ibpb-json.xml @@ -8,7 +8,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-json.xml b/te= sts/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-json.xml index 4450a40f61..5af19749e7 100644 --- a/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-json.xml +++ b/tests/cputestdata/x86_64-cpuid-EPYC-7601-32-Core-json.xml @@ -8,6 +8,6 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xm= l b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml index 08c574255e..5df21521f6 100644 --- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-guest.xml @@ -2,6 +2,7 @@ Dhyana Hygon + diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml= b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml index f1cddb6a19..76c3753505 100644 --- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-host.xml @@ -3,6 +3,7 @@ Dhyana Hygon + diff --git a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-json.xml= b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-json.xml index 0fdd934c08..0408d51c10 100644 --- a/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Hygon-C86-7185-32-core-json.xml @@ -9,6 +9,6 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml b/tests/= cputestdata/x86_64-cpuid-Opteron-1352-guest.xml index a52c4cd303..99c6420579 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-1352-guest.xml @@ -3,6 +3,7 @@ AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml b/tests/c= putestdata/x86_64-cpuid-Opteron-1352-host.xml index 800b092f14..ecd532167a 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-1352-host.xml @@ -4,6 +4,7 @@ AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml b/tests/= cputestdata/x86_64-cpuid-Opteron-2350-guest.xml index a52c4cd303..99c6420579 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-2350-guest.xml @@ -3,6 +3,7 @@ AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml b/tests/c= putestdata/x86_64-cpuid-Opteron-2350-host.xml index 800b092f14..ecd532167a 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-2350-host.xml @@ -4,6 +4,7 @@ AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml b/tests/c= putestdata/x86_64-cpuid-Opteron-2350-json.xml index d128553c13..d874bfc049 100644 --- a/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Opteron-2350-json.xml @@ -15,6 +15,6 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml b/tests/cp= utestdata/x86_64-cpuid-Phenom-B95-guest.xml index ab0e99f97d..f6106fdb1f 100644 --- a/tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95-guest.xml @@ -3,6 +3,7 @@ AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml b/tests/cpu= testdata/x86_64-cpuid-Phenom-B95-json.xml index d161709981..b4198f66a5 100644 --- a/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Phenom-B95-json.xml @@ -15,8 +15,8 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.= xml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml index 0053913327..9d14213a0b 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml @@ -2,6 +2,7 @@ EPYC AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.x= ml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml index 7acab0a999..8c2c975fdd 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml @@ -3,6 +3,7 @@ EPYC AMD + diff --git a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.x= ml b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml index aecc335c1e..9b9af2a6f7 100644 --- a/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Ryzen-7-1800X-Eight-Core-json.xml @@ -8,6 +8,6 @@ - + diff --git a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml b/tests/domain= capsdata/qemu_2.11.0-tcg.x86_64.xml index 00056c7141..3a6971584e 100644 --- a/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_2.11.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml b/tests/domain= capsdata/qemu_2.12.0-tcg.x86_64.xml index 4c867b18d0..049bc7e2e0 100644 --- a/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_2.12.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_3.0.0-tcg.x86_64.xml index 3a2fd5786a..1c650406c2 100644 --- a/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_3.0.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_3.1.0-tcg.x86_64.xml index e9e0cb9329..a7fde52d64 100644 --- a/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_3.1.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_4.0.0-tcg.x86_64.xml index 643cc4a631..cc19a61316 100644 --- a/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.0.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_4.1.0-tcg.x86_64.xml index bb1dacc14c..64bbef0a42 100644 --- a/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.1.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_4.2.0-tcg.x86_64.xml index 622acc47a1..43d6d27e98 100644 --- a/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_5.0.0-tcg.x86_64.xml index 40d691a62d..df562b5383 100644 --- a/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.0.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_5.1.0-tcg.x86_64.xml index 21db6a084a..0069c912dc 100644 --- a/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_5.2.0-tcg.x86_64.xml index ad10e7b8fd..1b9f986a95 100644 --- a/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_5.2.0-tcg.x86_64.xml @@ -34,6 +34,7 @@ AMD + diff --git a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args b/= tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args index 6ee7bed18e..017e7a6c06 100644 --- a/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args +++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.x86_64-4.0.0.args @@ -13,9 +13,9 @@ QEMU_AUDIO_DRV=3Dnone \ -object secret,id=3DmasterKey0,format=3Draw,\ file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc-i440fx-4.0,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --cpu EPYC,acpi=3Don,ss=3Don,hypervisor=3Don,erms=3Don,mpx=3Don,pcommit=3Do= n,clwb=3Don,pku=3Don,\ -la57=3Don,3dnowext=3Don,3dnow=3Don,npt=3Don,vme=3Doff,fma=3Doff,avx=3Doff,= f16c=3Doff,\ -rdrand=3Doff,avx2=3Doff,rdseed=3Doff,sha-ni=3Doff,xsavec=3Doff,fxsr_opt=3D= off,\ +-cpu EPYC,acpi=3Don,ss=3Don,monitor=3Don,hypervisor=3Don,erms=3Don,mpx=3Do= n,pcommit=3Don,\ +clwb=3Don,pku=3Don,la57=3Don,3dnowext=3Don,3dnow=3Don,npt=3Don,vme=3Doff,f= ma=3Doff,avx=3Doff,\ +f16c=3Doff,rdrand=3Doff,avx2=3Doff,rdseed=3Doff,sha-ni=3Doff,xsavec=3Doff,= fxsr_opt=3Doff,\ misalignsse=3Doff,3dnowprefetch=3Doff,osvw=3Doff,topoext=3Doff,nrip-save= =3Doff \ -m 214 \ -overcommit mem-lock=3Doff \ --=20 2.29.2