From nobody Fri May 3 06:23:26 2024 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 From nobody Fri May 3 06:23:26 2024 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=1568659090; cv=none; d=zoho.com; s=zohoarc; b=GN6CQR2vjmCN2AKvBPxh0a/fV+dVPlssab9gIv/qMeDjXpnknSCr3cpnx5M0Ivu8fBhyr8Q2FMK3BREhu9j8VffOtb8UdUg974fX7iBptbWrf5h0ObzU8l7NymsWQd8e/7BpFCpUm9vZ/0t4g119+d65pCJHxjgcWeL8HaOGl48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568659090; 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=lA4W57cc4k6oMvQUVcRRP4QjoTNCnmuulPp8sJDl0mY=; b=JwbRVw7UeZ6AIeY7wymRLg6m2z0F00fXpOEFnv5FtD3RySYXg/HroZkOPi9Co5Hd9McJl6L8nD6zmD3wHQ09nq1AzVfIHJxdVINJZZQaeAyZB5Z+cknq7WqBcvExAvWlNo5VJ6Pq+K6WH7HNsINkIBInD61hoGzKWhrnfGNiwwM= 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 156865909076191.84019179352163; Mon, 16 Sep 2019 11:38:10 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id C2D2810C0930; Mon, 16 Sep 2019 18:38:08 +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 98DE1600F8; Mon, 16 Sep 2019 18:38:08 +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 F150218037C9; Mon, 16 Sep 2019 18:38:07 +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 x8GIbmul013996 for ; Mon, 16 Sep 2019 14:37:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id DE4BF60126; Mon, 16 Sep 2019 18:37:48 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D873D600F8 for ; Mon, 16 Sep 2019 18:37:46 +0000 (UTC) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 B097D3CBC3 for ; Mon, 16 Sep 2019 18:37:44 +0000 (UTC) Received: by mail-qk1-f176.google.com with SMTP id s18so1047935qkj.3 for ; Mon, 16 Sep 2019 11:37:44 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 11:37:42 -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=hc9aWdq2OOYj2CbvqWkOYbpaZ2lyYsnMXuxy6PPbKWs=; b=kpqRLybICuyF1yBVtvps7u+z1qh87OPOR3pnnF7KuPPHfVh/w8Eb5V6bB/b5Xg5qEs DXkTu14xKJTwC/0EuWCiRsXMK5fgWX2mXZFvZzIAYWVB83jhPjC5UDvau3n6Mtuflga0 KjRmUFZYYLLgEVDl8CC4anZf0PHH+loojCzGXNy1RoYXdrgN1EuuBMqN8jzp/eWM0Ygr UdK3iGxQi5f/btFFIGrC7ZOwhtIXDsJRRCT7v4qCrrm0nsmsOBbNELYmMwQJYF6W4Utg Tlh+XJQLZRkxN4CRIMz/Itjnpg8nuCNFDvwd9fNTt9L7GLGJqT39Fh5hFWtAzIo7yl0a 8v5A== 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=hc9aWdq2OOYj2CbvqWkOYbpaZ2lyYsnMXuxy6PPbKWs=; b=cebjalYYVDnurX0ygGbBWwp7szhBxnTqhCu1Hi+uP4jhh8zHESgb9pUpgQEiiVeIa4 WiXn9wHcusPWI0Jy8heKAaBNPAb9u53U8KIalj/3eUaUXn0ujiy3ooVIts/5ci0gW3U+ dQb9n6VCclZ+E3HlBBl56ld0Y4SQZm5nqEjxOq67MqZvNvvfLZEt1odj2oX0/C0GPSPA nyThowOutsyxkMoqMytGkhgFXZqxuqEfmfwXqDo5sx03lSQBR5HvAbWWbgUNtX3Bpdle E3wx8GwRXb8FNCY2NmoucKzAsZhMohLCaODS/zOonFihYYZVA9KLBusnmzNg/RtXeqvV vbxA== X-Gm-Message-State: APjAAAXzWvrwbZWZMxKu5fShmEy4xSFvjNBi+cv6QZ/hCiGZaS+L/DyV SuhfYdObUsxlYfNVgFkbDsBe4Fnb+Z4= X-Google-Smtp-Source: APXvYqy8/5lHkr8A4v3T+Ouq3YBeHRLul5191Y0ckjlc7DAscQI/rtOwF+QDQDFzLfN7pEfxWwk6VQ== X-Received: by 2002:a37:8182:: with SMTP id c124mr1388573qkd.399.1568659062893; Mon, 16 Sep 2019 11:37:42 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Sep 2019 15:37:30 -0300 Message-Id: <20190916183731.11268-3-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.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 16 Sep 2019 18:37:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 16 Sep 2019 18:37:44 +0000 (UTC) for IP:'209.85.222.176' DOMAIN:'mail-qk1-f176.google.com' HELO:'mail-qk1-f176.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.15 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.176 mail-qk1-f176.google.com 209.85.222.176 mail-qk1-f176.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 2/3] qemu: Implement 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 16 Sep 2019 18:38:09 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This patch adds the implementation of the ccf-assist pSeries feature, based on the QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST capability that was added in the previous patch. Signed-off-by: Daniel Henrique Barboza --- docs/formatdomain.html.in | 9 +++++++++ docs/schemas/domaincommon.rng | 5 +++++ src/conf/domain_conf.c | 4 ++++ src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 20 +++++++++++++++++++ src/qemu/qemu_domain.c | 1 + tests/qemuxml2argvdata/pseries-features.args | 2 +- tests/qemuxml2argvdata/pseries-features.xml | 1 + tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmloutdata/pseries-features.xml | 1 + tests/qemuxml2xmltest.c | 1 + 11 files changed, 45 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 86a5261e47..109db25889 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2059,6 +2059,7 @@ <tseg unit=3D'MiB'>48</tseg> </smm> <htm state=3D'on'/> + <ccf-assist state=3D'on'/> <msrs unknown=3D'ignore'/> </features> ... @@ -2357,6 +2358,14 @@ will not be ignored. Since 5.1.0 (bhyve only) +
ccf-assist
+
Configure ccf-assist (Count Cache Flush Assist) availability for + pSeries guests. + Possible values for the state attribute + are on and off. If the attribute is not + defined, the hypervisor default will be used. + Since 5.8.0 (QEMU/KVM only) +
=20

Time keeping

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index cae3be639e..7f55ce1fd2 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5107,6 +5107,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 96e9223e21..1cd18903bd 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -172,6 +172,7 @@ VIR_ENUM_IMPL(virDomainFeature, "htm", "nested-hv", "msrs", + "ccf-assist", ); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -20309,6 +20310,7 @@ virDomainDefParseXML(xmlDocPtr xml, =20 case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: + case VIR_DOMAIN_FEATURE_CCF_ASSIST: if (!(tmp =3D virXMLPropString(nodes[i], "state"))) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("missing state attribute '%s' of feature = '%s'"), @@ -22550,6 +22552,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefP= tr src, case VIR_DOMAIN_FEATURE_VMCOREINFO: case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: + case VIR_DOMAIN_FEATURE_CCF_ASSIST: if (src->features[i] !=3D dst->features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of feature '%s' differs: " @@ -28111,6 +28114,7 @@ virDomainDefFormatFeatures(virBufferPtr buf, case VIR_DOMAIN_FEATURE_VMPORT: case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: + case VIR_DOMAIN_FEATURE_CCF_ASSIST: switch ((virTristateSwitch) def->features[i]) { case VIR_TRISTATE_SWITCH_LAST: case VIR_TRISTATE_SWITCH_ABSENT: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 82631ecb07..6a9121f73b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1740,6 +1740,7 @@ typedef enum { VIR_DOMAIN_FEATURE_HTM, VIR_DOMAIN_FEATURE_NESTED_HV, VIR_DOMAIN_FEATURE_MSRS, + VIR_DOMAIN_FEATURE_CCF_ASSIST, =20 VIR_DOMAIN_FEATURE_LAST } virDomainFeature; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f795f2e987..a52d9d2198 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7377,6 +7377,26 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, virBufferAsprintf(&buf, ",cap-nested-hv=3D%s", str); } =20 + if (def->features[VIR_DOMAIN_FEATURE_CCF_ASSIST] !=3D VIR_TRISTATE_SWI= TCH_ABSENT) { + const char *str; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_AS= SIST)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("ccf-assist configuration is not supported by= this " + "QEMU binary")); + return -1; + } + + str =3D virTristateSwitchTypeToString(def->features[VIR_DOMAIN_FEA= TURE_CCF_ASSIST]); + if (!str) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Invalid setting for ccf-assist state")); + return -1; + } + + virBufferAsprintf(&buf, ",cap-ccf-assist=3D%s", str); + } + if (cpu && cpu->model && cpu->mode =3D=3D VIR_CPU_MODE_HOST_MODEL && qemuDomainIsPSeries(def) && diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index bd247628cb..b7b9c4561a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4655,6 +4655,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def, case VIR_DOMAIN_FEATURE_HPT: case VIR_DOMAIN_FEATURE_HTM: case VIR_DOMAIN_FEATURE_NESTED_HV: + case VIR_DOMAIN_FEATURE_CCF_ASSIST: if (def->features[i] !=3D VIR_TRISTATE_SWITCH_ABSENT && !qemuDomainIsPSeries(def)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, diff --git a/tests/qemuxml2argvdata/pseries-features.args b/tests/qemuxml2a= rgvdata/pseries-features.args index 9fde54b37a..7aa357a54e 100644 --- a/tests/qemuxml2argvdata/pseries-features.args +++ b/tests/qemuxml2argvdata/pseries-features.args @@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=3Dnone \ -name guest \ -S \ -machine pseries,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,resize-hpt=3D= required,\ -cap-hpt-max-page-size=3D1048576k,cap-htm=3Don,cap-nested-hv=3Doff \ +cap-hpt-max-page-size=3D1048576k,cap-htm=3Don,cap-nested-hv=3Doff,cap-ccf-= assist=3Don \ -m 512 \ -realtime mlock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ diff --git a/tests/qemuxml2argvdata/pseries-features.xml b/tests/qemuxml2ar= gvdata/pseries-features.xml index 6f7d32b065..8ccc1b73d8 100644 --- a/tests/qemuxml2argvdata/pseries-features.xml +++ b/tests/qemuxml2argvdata/pseries-features.xml @@ -12,6 +12,7 @@ + /usr/bin/qemu-system-ppc64 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index abff3d1c61..4667b81d72 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1937,6 +1937,7 @@ mymain(void) QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, + QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); DO_TEST_FAILURE("pseries-features", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); diff --git a/tests/qemuxml2xmloutdata/pseries-features.xml b/tests/qemuxml2= xmloutdata/pseries-features.xml index 7e12bc9c03..a5df840394 100644 --- a/tests/qemuxml2xmloutdata/pseries-features.xml +++ b/tests/qemuxml2xmloutdata/pseries-features.xml @@ -14,6 +14,7 @@ + destroy diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d5c66d8791..b9364f942f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -608,6 +608,7 @@ mymain(void) QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, + QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); =20 DO_TEST("pseries-serial-native", --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 06:23:26 2024 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=PqLZ4UmOh/QrgzST1T2RUxxpyGi09mh8HqpxKxuhQs1V3C3vUYhCb2k5Us8XcEPlOE2nVqONW4hUjB1/h9SNYZOc2WNhd1rCqcDjoRkk9ESAKWYj7yGzULjz8MSGA1w7Et04TsIhw7mSm1vVe54GBnUWVYHEMgMKDGtTJalsDOc= 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=we8BHH7vOMaNIH+YRzNYPW67cfMtnlW3PElrW/brx60=; b=GhXvbyr36FJnjBvbnQ+zRdeIjWV2dupOug/dVFwtmsIMtiCiaMFixsMv0tz6IMLhg8qG6pppZ2T4CyCKLWeveq9Ai8hycxZ39Rb76y/unpQSEBMtaStHGeHVI/zRNX5+UYxD41XUH+U5qqBmxrVSSQqL2LE0dX2L+QeIGgjdJvA= 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 1568659072092417.58212724484054; Mon, 16 Sep 2019 11:37:52 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 202543090FC2; Mon, 16 Sep 2019 18:37:50 +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 E9C7260BE1; 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 5608C1808876; Mon, 16 Sep 2019 18:37:48 +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 x8GIblwx013988 for ; Mon, 16 Sep 2019 14:37:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1CFF55C22C; Mon, 16 Sep 2019 18:37:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx25.extmail.prod.ext.phx2.redhat.com [10.5.110.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04C975C1D6 for ; Mon, 16 Sep 2019 18:37:47 +0000 (UTC) Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) (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 CFF2C10C0930 for ; Mon, 16 Sep 2019 18:37:45 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id u184so1039774qkd.4 for ; Mon, 16 Sep 2019 11:37:45 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 11:37:43 -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=o/0PzZmvS18qhF6Wv8CivUVwDUoh5A2fpTUvn/V5QM0=; b=ZO1qRcQ4Iurv3tJLAgkvFfpp3cUVqDZYJbqpVy+22jouZSp69H17yk/UzRIknd+IIW 3GMnH5RzDElIrvro+XkYWa6POkbrBJmzit5NZ+AX5E/D67mHsS1AYQdV0uoUh5sh5+T8 jnB4EE8gMpNF6y95UDeWVaWgEFZkTDSSb8EjQZFTOScK7nCTwIQv+U71xzCnDWgkl/xP 3nm7ayJjI74KuTnxcMUeRl+5K7f1lEdHSNIoIh0pwR7pzI+GS9MggBFcBfDawzfgLBH2 X6pPlEhtOOba5P86F04LhmcDHTl7tOGAj48QuYF+3mhdAsLE/R5Ndkcbx3uEEEgld18M mSEQ== 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=o/0PzZmvS18qhF6Wv8CivUVwDUoh5A2fpTUvn/V5QM0=; b=QwE/m1gagRCoXjcMYXuL9n+ImQMuHfzws5B+hOFVDtas/vb+fYx8DfVYevBRk67xH4 xL4zwbkrAaqQA3CsJ4Ta8Cqw9IhOgOaJ1OLboCyXucQKqysjJ28GzjsnANTXpVICVokI jvwVbe6Wimq4B7rdvg+e3qRJt4jWb/i5ZEb6bSKmSdl2IcDThAaEp1w3APNG57qrVHdO 1U8LhUYU9HAWb03GOKcAk+35pK9m2idFNQPKkcCo5FtBkcI5a9qf92b+Jx5bN3zt6aCa 0cof+xoqUwf5hdOi7JJOHpn7dnVdW2VcPs0Ey/S/tj8BQTVdNcaG0XpzPIjyygbAZzsz geqQ== X-Gm-Message-State: APjAAAWe+L9XgL51EZN1cNJyqsQof6iA6t5bZfP81kk6+CYUhkNBdvM8 S1O/wfRVj28MYfMMMuKh4UdF3TgxgMg= X-Google-Smtp-Source: APXvYqxfAPgCl7LhI/QbbSYSPVr4+RByxAnXfE0RAOatNuCNgWoh79ik85Q9MXbC3Wlvz8HIgkRYfA== X-Received: by 2002:a37:6250:: with SMTP id w77mr1385503qkb.153.1568659064076; Mon, 16 Sep 2019 11:37:44 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 16 Sep 2019 15:37:31 -0300 Message-Id: <20190916183731.11268-4-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.66]); Mon, 16 Sep 2019 18:37:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Mon, 16 Sep 2019 18:37:45 +0000 (UTC) for IP:'209.85.222.196' DOMAIN:'mail-qk1-f196.google.com' HELO:'mail-qk1-f196.google.com' FROM:'danielhb413@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.15 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS) 209.85.222.196 mail-qk1-f196.google.com 209.85.222.196 mail-qk1-f196.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.66 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 3/3] news: Update 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); 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" Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index f6aee74884..c2e95227c6 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -41,6 +41,15 @@
+ + + qemu: Implement the ccf-assist pSeries feature + + + Users can now decide whether ccf-assist (Count Cache Flush Assis= t) + support should be available to pSeries guests. + +
--=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list