From nobody Fri Apr 26 06:57:30 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=1570565400; cv=none; d=zoho.com; s=zohoarc; b=LCQwIYmkVYIEeuOwQyQqbHe87htBXCHvCpuZ4kL4L6+x/lwn1tRWXWpjhAFXYpZMdPASwSdcAmDlfp3f+ZD/Wa0/DTzi77llUQ2Z/rYiSTpG/cbtEzhc5GHjXEn4RMb5EuPaFUa71RAFj61kG0BKJv/bfq86j5XPnukYKpIT+2g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570565400; 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; bh=B+FAEJ15W2iIv0iGH1KJVes2HLzaFZvA5jHI9M/eB2Q=; b=BpMG3F3PyBx06AHLP4kMcKU3sfLYRSrZepJJRjVvT+tp6QEKZfB+hN2i4rpevGVhe6YvJC6w/9OOOzkHJXmkvJVn1DzGbwmdLIbQ7sfVSqdEIysQL8mQwa0B7yuNXGzJspHXTavXgIK/LjbM4YxM0ef7pcPtKVMBnMWxeHhHejY= 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 157056540029046.567361418801056; Tue, 8 Oct 2019 13:10:00 -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 7553210DCC9D; Tue, 8 Oct 2019 20:09:58 +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 17A1160BE0; Tue, 8 Oct 2019 20:09:58 +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 A019718089DC; Tue, 8 Oct 2019 20:09:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x98K6gBU021583 for ; Tue, 8 Oct 2019 16:06:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id CE67D5D9CD; Tue, 8 Oct 2019 20:06:42 +0000 (UTC) Received: from mx1.redhat.com (ext-mx27.extmail.prod.ext.phx2.redhat.com [10.5.110.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C61035DAAC for ; Tue, 8 Oct 2019 20:06:38 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (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 B9E60A26664 for ; Tue, 8 Oct 2019 20:06:37 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id z67so1648qkb.12 for ; Tue, 08 Oct 2019 13:06:37 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:e8e7:3739:3e28:be31:8030]) by smtp.gmail.com with ESMTPSA id e4sm8689410qkl.135.2019.10.08.13.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 13:06:35 -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=VXEKu8smDZeaL9NuJdsjAPhmp8lSgnGhJImENTq60nU=; b=XFNTn+fGXo0kjvz2kz4wCoepKJt2fsF1UitsQ+n/B5FQ5CeOSwwYzZ0rTqUpoRrTal EH39EbPXEC5hTr2sJ7PkiS7Bb0F2+B0LQReF61oSQS2iybykykv1skSyxtGg2Pabdjm9 MUivrUcz+5/QBZtqpNdBPkDVgQRTF8WHP29XrRbv3MwNZ9bVOinm5rbQJ32m6E+QcFB+ PrOxkjnG1NJPj1EGPL3K5zZUZOhKbRPcOxrP/lJUM1n1lTB4jh6IEaYUgySYEnC8kak3 ljzOuMUtga5y9AF0bNe353E60m0KnUhV0POHV4GH2UmSZcH6rfFvJTv2q7UKSlQncWBE xJZw== 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=VXEKu8smDZeaL9NuJdsjAPhmp8lSgnGhJImENTq60nU=; b=UCxkuaDMMbUTb+hPCRShF8vMKjenRYfTCc7YhXoeC85KXQsWV6vHdJYgVB8zf848/g uXLLtHiBqOx3bK+SWq55BDH5DIcmiLlTZKcjEMUE7UgwmmXFKA1FAJ3Sj1KU0BlVpTn6 UwAzo9JeZDVtiaa02hpzHCaTXnRPJgOVeHKJtkQsx8DQOoa0z635o5l2pW4FKJoP4cIm +1eD4WBP4KRjvtyt3LX6LwUiScdrOY8tUkl+2qnts2HeSDyHdwfgArZFApzCYt8qmIFg 6yGf5tys52XvL0NBYSHc1kS8XZ6/YEptWNajzhOMGywcA9wr4Bz/MkEzx7Apu8rLhGWL CvLw== X-Gm-Message-State: APjAAAU0AhXkfZSIMDFt5ALC3vAGToTY9nFcM70r9/cZz2Xyilrx6eLM 7MY4/DPgeTBf896sc/KHH44PkOwM X-Google-Smtp-Source: APXvYqyuaQUm19zd5O9oeUgmFnJp3K6rkimWcons1UVw4tx0ereo9vnPQQ9+EeOv/FtIfbCMFXA0NQ== X-Received: by 2002:a37:b045:: with SMTP id z66mr28637785qke.428.1570565196518; Tue, 08 Oct 2019 13:06:36 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Tue, 8 Oct 2019 17:06:23 -0300 Message-Id: <20191008200625.22877-2-danielhb413@gmail.com> In-Reply-To: <20191008200625.22877-1-danielhb413@gmail.com> References: <20191008200625.22877-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.68]); Tue, 08 Oct 2019 20:06:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Tue, 08 Oct 2019 20:06:37 +0000 (UTC) for IP:'209.85.222.195' DOMAIN:'mail-qk1-f195.google.com' HELO:'mail-qk1-f195.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.195 mail-qk1-f195.google.com 209.85.222.195 mail-qk1-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.68 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v2 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 08 Oct 2019 20:09:59 +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 46a056340b..b73534c0d1 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -545,6 +545,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "incremental-backup", "query-cpu-model-baseline", "query-cpu-model-comparison", + "machine.pseries.cap-ccf-assist", ); =20 =20 @@ -1440,6 +1441,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 72da3691f2..3da8e3d0f0 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -526,6 +526,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_INCREMENTAL_BACKUP, /* incremental backup is supported */ QEMU_CAPS_QUERY_CPU_MODEL_BASELINE, /* qmp query-cpu-model-baseline */ QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON, /* qmp query-cpu-model-compariso= n */ + 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 9ea6f4d046..5edd2c1c31 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml @@ -170,6 +170,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 Apr 26 06:57:30 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=1570565448; cv=none; d=zoho.com; s=zohoarc; b=MQjaztXYRVVwyiVHrOAGTVXmhciF4vyilr7uuc7J3ZE1h3VA+M/IaBwGbN9iGtqMLGY8Zo107sKJTHUjKQ1lpZiE8IJe6mWFeyh3ysDyD3/K2no+lu4zZeCVUzPOkurBcMX4qLyWOoZYoEX/6WDn9RKSdA+3IiPNgsQgqVNi0Zo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570565448; 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; bh=KdnQJu8dbWKj4F9kuXSi1KcRJtHXUOP3J1mC0Bt+FOs=; b=C1BQRaIhtaTVzPYxLUnYqW3wKJTDcXux/b27E5H1AZDI75i7qIJXqO8k1CO91NJ9XDaVT6XVI26E2hBn6ZuWqNu9Tii4iDmR26eI6dqVDukt41BLvlOVfxlluUTsutN6/RCCpOkxfkuEvopKlYp458EVr/3dRVSpbso7W6DTbVc= 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 1570565448313422.2713343875454; Tue, 8 Oct 2019 13:10:48 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 838F13084025; Tue, 8 Oct 2019 20:10:46 +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 582BF5D6A7; Tue, 8 Oct 2019 20:10:46 +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 0F1CA18037CA; Tue, 8 Oct 2019 20:10:46 +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 x98K6jMn021595 for ; Tue, 8 Oct 2019 16:06:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3BEA360A9F; Tue, 8 Oct 2019 20:06:45 +0000 (UTC) Received: from mx1.redhat.com (ext-mx28.extmail.prod.ext.phx2.redhat.com [10.5.110.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36EBC60A35 for ; Tue, 8 Oct 2019 20:06:42 +0000 (UTC) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 1E44B88135D for ; Tue, 8 Oct 2019 20:06:40 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id m61so6320qte.7 for ; Tue, 08 Oct 2019 13:06:40 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:e8e7:3739:3e28:be31:8030]) by smtp.gmail.com with ESMTPSA id e4sm8689410qkl.135.2019.10.08.13.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 13:06:37 -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=MTYKXNFyfcjzpd0H7Vsd3itUGyIIv+n/JnJ1I1fQi0E=; b=jNK4Py7tQzQIE5k6Sh09sV4JifulzK/qThB0ky3wfZ2FKwf7BxyEzmbcN80/Gvz7dv ZNUmPLfI14HhkZswnaM6HB04iSzvsQzJthmmquefKkdrj7Wi1pO/7eoH8vde+mHbvSi4 iy+O04eO/tsE2SVeH0fTrtgYpC068DMRQJFkfkDF874jkkRoXbbPmpS96I8NCtX4xjp+ WhcemPFE5vy7Sj5Fm8fXEi/YdiIUhvCVtFpJOIwl4nD1Na92XWf40hFrsslbAoZCNu3y pqDS+7sTyW05BqmRh7CsEK8PEBo7ianD/hW6AXq7dd8QvlzUhO4OXKw5aKWZ5nThOwiI a+6Q== 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=MTYKXNFyfcjzpd0H7Vsd3itUGyIIv+n/JnJ1I1fQi0E=; b=ghu2z8q8JH/9aa+2tkokLF20teGfmM+o5/kGtgI899TogBuXMyRlmazk1boP4wZzte Lmgju+t7hZrMO7WcBCySg7HfxqpTKZOTgzPrm6E4+1txxUe8OCQP6bxeEW4+mtkdSlu6 YjTVwQ1SuVzSG+ZZf1zKFf+YXPdfHryD49a8duMW21mB6Gfzgg1VT6ZSG1NlfGQzq9Mv rpKq238OizLPcN01JBPTgOsu9Ge4vjdPLGg/K8FF6HJVR0hMYOVgh6ACWhhJk7HMKd68 cOTZ/QswUdP4pdZ8uxFnl1N0KrJU/aOC2SF1SZNQKnMyUFdgQCwg+/J1gWNl0YwBZcS8 8heA== X-Gm-Message-State: APjAAAWTx2nnk5+yn6w6nsVHq0tuWuAeUwXw21qOsmLQZdUYSzojCy37 ao1Ot7AwwOoxu9yiyTHvkGU2PpcG X-Google-Smtp-Source: APXvYqw2rJlX9pXCP9t8dDuBNga+7H6o3btnwMwu8SSp1UbobL5fb48FGQuQ2fVgY5j7IlB4rUGO3A== X-Received: by 2002:a0c:b4d2:: with SMTP id h18mr34577573qvf.208.1570565198256; Tue, 08 Oct 2019 13:06:38 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Tue, 8 Oct 2019 17:06:24 -0300 Message-Id: <20191008200625.22877-3-danielhb413@gmail.com> In-Reply-To: <20191008200625.22877-1-danielhb413@gmail.com> References: <20191008200625.22877-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.69]); Tue, 08 Oct 2019 20:06:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Tue, 08 Oct 2019 20:06:40 +0000 (UTC) for IP:'209.85.160.171' DOMAIN:'mail-qt1-f171.google.com' HELO:'mail-qt1-f171.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.160.171 mail-qt1-f171.google.com 209.85.160.171 mail-qt1-f171.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.69 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v2 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 08 Oct 2019 20:10:47 +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 Reviewed-by: Cole Robinson --- 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 647f96f651..059781a0c3 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 40eb4a2d75..0d6ff86044 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5120,6 +5120,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a53cd6a725..dd2e7fb6b9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -171,6 +171,7 @@ VIR_ENUM_IMPL(virDomainFeature, "htm", "nested-hv", "msrs", + "ccf-assist", ); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, @@ -20396,6 +20397,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'"), @@ -22621,6 +22623,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: " @@ -28187,6 +28190,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 2884af49d8..e8662e4bc5 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1755,6 +1755,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 cbf25d5f07..3bd841919d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7409,6 +7409,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 b4175a846e..ecbe21449c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4730,6 +4730,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 db79301f0e..14a2a140dc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1960,6 +1960,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 Apr 26 06:57:30 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=1570565452; cv=none; d=zoho.com; s=zohoarc; b=nkpypSV/Z4EKUyuo7CTzA9FDuu0iVVNqQPrX+Ip9vzItSc3ge+12ibJ0suc4Q94/MjTPLMoEIIspAakUTs1uEuyelqK+9NoeIDWN1/0A1mPl03ws8mkeok1pF1SrgvvD8EUgGO4Q2wN5keZbPHOwNcSLlSBvVVK+kRmBGLu6AyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570565452; 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; bh=YxgRPUBP+j8HG2wJUttrI+8GDckDjv5bQf36Y8lneNs=; b=cgow23LjffepKX+8SIb3ZyxAso+Am6+DFGfxLCikwAL0nC7DXKck6YNDb9cUMtTaaOSutxhPFY39zNajVp2yIq35m3wCXjsNJslxuJeJLxVIGSvfc06+RC/Y8Fl21+dfbekeTsRQuCX0XJmyCppnoea9w/szHKgsOBHVTDQOnNU= 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 1570565452757878.9963114426345; Tue, 8 Oct 2019 13:10:52 -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 391A53024562; Tue, 8 Oct 2019 20:10: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 104416012A; Tue, 8 Oct 2019 20:10:50 +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 C435B180B536; Tue, 8 Oct 2019 20:10:49 +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 x98K6lGQ021605 for ; Tue, 8 Oct 2019 16:06:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 175676012A; Tue, 8 Oct 2019 20:06:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx21.extmail.prod.ext.phx2.redhat.com [10.5.110.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E5BA600CE for ; Tue, 8 Oct 2019 20:06:44 +0000 (UTC) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 B2FA718C426F for ; Tue, 8 Oct 2019 20:06:43 +0000 (UTC) Received: by mail-qk1-f170.google.com with SMTP id x134so77834qkb.0 for ; Tue, 08 Oct 2019 13:06:43 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:e8e7:3739:3e28:be31:8030]) by smtp.gmail.com with ESMTPSA id e4sm8689410qkl.135.2019.10.08.13.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2019 13:06:40 -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=wGCIXdRubX6yyPYaAmYOz9BjPxu0melP+xX8K26jqmU=; b=KNIDvNMWI8aLsR8IciGdu3e6et4gs8cCNydJrQ7hgyEQv42xPhbV29L78RCeiQIx0L h7IZ438mIVY70RHRO3Xx6pO1APx7M2VfsVruHSoBDek/Y37anLZTT2C+a7+qeO3RAk9w ZZzOlrUIAyixSqwuRxPsT/BHVyimF/90925FUGmMSW6RZFe/cpsjfIoeicALghxaXTAj 0D2bZE5SwhqYtSwgilPILVw6Mr93BengKneUXMIz9yaUMT18HtcaDfelk1unCk5LXVpT TEZBeyVL/KLxoOSj4nsOZNqed5OSjW2s0xMHBblC5zy0D7+qaeAFqCKo3uC9IZk4Tq0l DOWg== 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=wGCIXdRubX6yyPYaAmYOz9BjPxu0melP+xX8K26jqmU=; b=IsbcF2fWE3mbcB6J8TZ0y4oibn5Pal/WnlaUyvE6WlRqYqm8PiEDi+78funpjr6j8j EFGrlGfIZbm7Ary003WTdqS8+asivgJbFaqFXpucvUKcN4aBv1McMwEBFA3b4LNr8n4V nJZhCbsIPMOaN7jNn6hN2V6dzW9Yeia4O0Ix1I/uLIoB06FQl7aH8eCy6XpEQsRLpY5U XaKaRTYy9K7A3uBVGJ2qaZOW8A6sRsZ6VJbYYrw4588YrPZ0j34582It7wgtO1zL9hl6 LOuh0IuTY01aTaEi0Xg+jRU/VLoPwB8Q/w54Ns+YZxb4ZsVeCxa+05zk8khpP8aIMT29 3Ctw== X-Gm-Message-State: APjAAAWBPEwTysOuvyx+TLN914PH39EuYu7AP0rQJ3Xx+TCkzPm5VoL1 sZ3aPa6/+U9YzDhUIgGV0CVpstfJ X-Google-Smtp-Source: APXvYqxdnunmvR+aPq8GoyMKUXruQa8WNox5OWPaY0NtG2cGF/SPXID7oQwcN2pu4E2WEXAvMhvO6A== X-Received: by 2002:a37:498f:: with SMTP id w137mr30401135qka.419.1570565202128; Tue, 08 Oct 2019 13:06:42 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Tue, 8 Oct 2019 17:06:25 -0300 Message-Id: <20191008200625.22877-4-danielhb413@gmail.com> In-Reply-To: <20191008200625.22877-1-danielhb413@gmail.com> References: <20191008200625.22877-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.62]); Tue, 08 Oct 2019 20:06:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Tue, 08 Oct 2019 20:06:43 +0000 (UTC) for IP:'209.85.222.170' DOMAIN:'mail-qk1-f170.google.com' HELO:'mail-qk1-f170.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.170 mail-qk1-f170.google.com 209.85.222.170 mail-qk1-f170.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.62 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v2 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 08 Oct 2019 20:10:51 +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 d9c402e6bb..b8002368ae 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