From nobody Sun Feb 8 08:22:22 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1568659072; cv=none; d=zoho.com; s=zohoarc; b=n5M4Z1EXDadVTup1Z94QULg2pl2rnDa8woChL5WiedyAmCTNwKQ77/jzMvnhbJlUjQk3xQlt2/lMUv0cFv3/KSBswa64Nvg2aBq9rjRpnTxHG7ecW3RWEKoisjD609RIZe4kUe9WFqowmOp1jfHbzKNaC+FWP/3Ar62h/rHCg6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568659072; h=Content-Type:Content-Transfer-Encoding:Cc: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=dXx9fiLQmGvwztpJfFgQTIZ615sNmMWSshEG8sghCUA=; b=BOtjSCsfqrtwyq7sTMOKeq0/lJvOCHdJUThTTXie8tj9/+dBMmyFuBDspGgSyoR4WyH7aP2bGnoFDeMMiyFRWDi/s+QAntIeWSBjQW5RyeODf1WYWOrRh+uivnWU4CUnrz+TJrRnX3UifJRIVkyUuvHfuiBv5GULxB5OcFhUBsw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail 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 1568659072343935.7764850318569; Mon, 16 Sep 2019 11:37:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 033D686E86F; Mon, 16 Sep 2019 18:37:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBED35C1D6; Mon, 16 Sep 2019 18:37:49 +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 AACD34EE68; Mon, 16 Sep 2019 18:37:48 +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 x8GIbkJ6013983 for ; Mon, 16 Sep 2019 14:37:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id D8C1260606; Mon, 16 Sep 2019 18:37:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx30.extmail.prod.ext.phx2.redhat.com [10.5.110.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D316A60600 for ; Mon, 16 Sep 2019 18:37:44 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4EF2490B20 for ; Mon, 16 Sep 2019 18:37:42 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id u40so1030834qth.11 for ; Mon, 16 Sep 2019 11:37:42 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:b52b:8547:7e5f:a036:2e43]) by smtp.gmail.com with ESMTPSA id w11sm20659826qtj.10.2019.09.16.11.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 11:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GLiemOd43+S3fREQcrrV8V9EAdes+1CqlPq+WaPMBE4=; b=PkXb8kbsfO0fEm91L/zvd7uCwl3kCZUi7ReQnUCs+8dIqLM74gYMrKgViskShWTlqu 2zgJgbPTPFVgKewdKV9qDTaePN90JjeADVpc2Y+ZMNV5vBoLdquf+5Dsw7/LLLowp2jl v6kmmdpB15IS6fjl19DoA8Z7mZcGt4vweit6hx8jByxy0/PtWJYWyDlzHdVebmGau47J AMrNwbQdx5BuNlXwrB4AX4/ulLs7xXZ7xMu3r3V4A1B6WJStkVJp46ViwHicJbIaL+rg NwHNKAMVmiw6MRDExKj3EHVvO/e40/pOjdgCmMqKYCgwjCBOkvRMbWGDLc4pkbmsCJTy WklA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GLiemOd43+S3fREQcrrV8V9EAdes+1CqlPq+WaPMBE4=; b=XO6DHWV8b7fVGx/4JJYwOMAXLniKYSJxiatPww8P4EkV4ev3lKkSdrQhJ3EzA8bfwL HKTTPjgLXKTkfLxhFPPW1O1LsyVyTrQOqgLTay0V3oE95+LhSsMSswDVvNGGMnFNrCM0 MQ3gcLC70qcUOVabmQUZad17u/2JiuMELwZvDPV8oRdL5f4oFM7e7zzRYmUVORMO+ye8 wrb99l6VpYMTwq+k+imgSjzdXWRcBhElne1G36YGb1LeScgBMh0KFbUhju2Dx2O9TkDi +aWbO2TeB7SKchPvS+zEGjLRIEoH7DLrgD/7n4ii/ljDGfs5dj2AZNjHvfCGADRc2Nr7 WTNQ== X-Gm-Message-State: APjAAAU8E84YYn37ZmBQk5/JyNLLg/L/SkszDFGOSswvIIfMQd3o+zcv UuezHLIo/T0J+z3l0QbOW7Sj4p9F X-Google-Smtp-Source: APXvYqxumRzAHXiD9sz6+5a7RIXpFY7LdTkoAK2LSaE0Zyyvq2BDogLWHW3A6dJxZEkGpXK37IMF3A== X-Received: by 2002:aed:3c52:: with SMTP id u18mr1101875qte.194.1568659061457; Mon, 16 Sep 2019 11:37:41 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Sep 2019 15:37:29 -0300 Message-Id: <20190916183731.11268-2-danielhb413@gmail.com> In-Reply-To: <20190916183731.11268-1-danielhb413@gmail.com> References: <20190916183731.11268-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 16 Sep 2019 18:37:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Mon, 16 Sep 2019 18:37:42 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.131 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.71 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 1/3] qemu: Add capability for the ccf-assist pSeries feature 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Mon, 16 Sep 2019 18:37:50 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Linux kernel 5.1 added a new PPC KVM capability named KVM_PPC_CPU_CHAR_BCCTR_FLUSH_ASSIST, which is exposed to the QEMU guest since QEMU commit 8ff43ee404d under a new sPAPR capability called SPAPR_CAP_CCF_ASSIST. This cap indicates whether the processor supports hardware acceleration for the count cache flush workaround, which is a software workaround that flushes the count cache on context switch. If the processor has this hardware acceleration, the software flush can be shortened, resulting in performance gain. This hardware acceleration is defaulted to 'off' in QEMU. The reason is that earlier versions of the Power 9 processor didn't support it (it is available on Power 9 DD2.3 and newer), and defaulting this option to 'on' would break migration compatibility between the Power 9 processor class. However, the user running a P9 DD2.3+ hypervisor might want to create guests with ccf-assist=3Don, accepting the downside of only being able to migrate them only between other P9 DD2.3+ hosts running upstream kernel 5.1+, to get a performance boost. This patch adds this new capability to Libvirt, with the name of QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9b19930964..17d9edee8f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -539,6 +539,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "migration-file-drop-cache", "net-socket-dgram", "dbus-vmstate", + "machine.pseries.cap-ccf-assist", ); =20 =20 @@ -1430,6 +1431,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsMachi= nePropsPSeries[] =3D { { "cap-hpt-max-page-size", QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_= SIZE }, { "cap-htm", QEMU_CAPS_MACHINE_PSERIES_CAP_HTM }, { "cap-nested-hv", QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV }, + { "cap-ccf-assist", QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsVirt[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 54f91151c6..2747a8b3d8 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -520,6 +520,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_MIGRATION_FILE_DROP_CACHE, /* migration with disk cache on i= s safe for type=3D'file' disks */ QEMU_CAPS_NET_SOCKET_DGRAM, /* -net socket,fd=3D with dgram socket */ QEMU_CAPS_DBUS_VMSTATE, /* -object dbus-vmstate */ + QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST, /* -machine pseries.cap-ccf-= assist */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml b/tests/qemuca= pabilitiesdata/caps_4.0.0.ppc64.xml index 73859becab..a88c8f327f 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -171,6 +171,7 @@ + 4000000 0 42900758 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list