From nobody Sun Feb 8 21:41:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1560937174; cv=none; d=zoho.com; s=zohoarc; b=OPFH4ztCSJLBcuyLteweAHOGOl1A6s08bPZL3mJXbjfH4YRqk2vMT140j0JpZB2/E2DY/ZgktpSwZCzXgaYkhs4hwZ478++eQzQwsxBAH9KyAwGtvLBJ1gkK9WpfdpQjl0oV8yqi+UarRj6a242lsg7Zbw0jErpKc9FTVbuc+gM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560937174; 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:ARC-Authentication-Results; bh=Qdo0tEQ6fgzofMs2T7VkNxamEbfOnIToVEfdNZts5wU=; b=i/E80PkyLqAdJyF+uIwutZJ8Lz8zzdAc1AM2+Cgvw8EuQ2q4CbV9jxGHs/RSHy/kzrUzLDStYSIJCouxzxXeiSdu2nYPqG6837yE81te5O2bCiMojqauh4FCAodRHrOn81cy9e9ngc+vRMVfOLiRmW1Ey4ml/0RkA+/vOO8rQwQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560937174847407.53660115920604; Wed, 19 Jun 2019 02:39:34 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 082973082B68; Wed, 19 Jun 2019 09: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 D267360634; Wed, 19 Jun 2019 09:39:23 +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 8EE8B1806B20; Wed, 19 Jun 2019 09:39:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5J9cRv4024298 for ; Wed, 19 Jun 2019 05:38:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id D368B84EF; Wed, 19 Jun 2019 09:38:27 +0000 (UTC) Received: from orkuz.int.mamuti.net (ovpn-204-21.brq.redhat.com [10.40.204.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5EB960FDE for ; Wed, 19 Jun 2019 09:38:25 +0000 (UTC) Received: by orkuz.int.mamuti.net (Postfix, from userid 500) id 7B5712A117B; Wed, 19 Jun 2019 11:38:23 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 11:37:58 +0200 Message-Id: <43e5fc756c9948c4662d04b7ed2d295ab9c971a8.1560936842.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/24] qemu: Drop qemuFeatureNoEffect 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 19 Jun 2019 09:39:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We already have virQEMUCapsCPUFilterFeatures for filtering features which QEMU does not know about. Let's move osxsave and ospke from qemuFeatureNoEffect there. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 9 ++++++++- src/qemu/qemu_command.c | 24 ++---------------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d0fdd1da9f..5f989a2613 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2823,6 +2823,11 @@ virQEMUCapsProbeQMPSEVCapabilities(virQEMUCapsPtr qe= muCaps, } =20 =20 +/* + * Filter for features which should never be passed to QEMU. Either because + * QEMU never supported them or they were dropped as they never did anythi= ng + * useful. + */ bool virQEMUCapsCPUFilterFeatures(const char *name, void *opaque) @@ -2834,7 +2839,9 @@ virQEMUCapsCPUFilterFeatures(const char *name, =20 if (STREQ(name, "cmt") || STREQ(name, "mbm_total") || - STREQ(name, "mbm_local")) + STREQ(name, "mbm_local") || + STREQ(name, "osxsave") || + STREQ(name, "ospke")) return false; =20 return true; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 59dc134785..6cc165a118 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7038,27 +7038,6 @@ qemuBuildGlobalControllerCommandLine(virCommandPtr c= md, return 0; } =20 -/** - * qemuFeatureNoEffect: - * @feature: CPU Feature - * - * Returns true, if the feature is known to have (never had) an effect on = QEMU. - * Those features might be dropped in qemu without a longer deprecation cy= cle - * and must therefore be known e.g. to no more define them on command line. - */ -static bool -qemuFeatureNoEffect(virCPUFeatureDefPtr feature) -{ - if (!feature->name) - return false; - - if (STREQ(feature->name, "osxsave")) - return true; - if (STREQ(feature->name, "ospke")) - return true; - - return false; -} =20 static int qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, @@ -7127,7 +7106,8 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, virBufferAsprintf(buf, ",vendor=3D%s", cpu->vendor_id); =20 for (i =3D 0; i < cpu->nfeatures; i++) { - if (qemuFeatureNoEffect(&(cpu->features[i]))) + if (!virQEMUCapsCPUFilterFeatures(cpu->features[i].name, + (virArch *)&def->os.arch)) continue; switch ((virCPUFeaturePolicy) cpu->features[i].policy) { case VIR_CPU_FEATURE_FORCE: --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list