From nobody Tue May 7 06:44:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1580488814252816.0340783333626; Fri, 31 Jan 2020 08:40:14 -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-6-Vvh4fenWPNineW8XE1fCbQ-1; Fri, 31 Jan 2020 11:40:10 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BAC7E19057DE; Fri, 31 Jan 2020 16:40:02 +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 629E119C4F; Fri, 31 Jan 2020 16:40:02 +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 C57ED18089CE; Fri, 31 Jan 2020 16:40:01 +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 00VGdx1E024283 for ; Fri, 31 Jan 2020 11:39:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id F22CF100EBA8; Fri, 31 Jan 2020 16:39:58 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 534521001925 for ; Fri, 31 Jan 2020 16:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580488813; 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=mT1XgnZ9Ukh1t/0lOpj3S8Gop1ayWSwiClNYflT/548=; b=fY/c/+n0kuvquLsOR+woEgaUZ80AK2qrXiqZo5CNXpPzEYlvHKGkVFQKb9CFTgB+Y8rpf1 kGQahx6JcFc0d9lqpMrezUGvcU8xlMUxKbZAhawq4Rph684NxDWuej87hJeJhy+bV2CYA5 aRCpM8hRHzc+V940lrcS/7FkSPyayyA= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/5] tests: Add capabilities for QEMU 5.0.0 on aarch64 Date: Fri, 31 Jan 2020 17:39:48 +0100 Message-Id: <20200131163952.525863-2-abologna@redhat.com> In-Reply-To: <20200131163952.525863-1-abologna@redhat.com> References: <20200131163952.525863-1-abologna@redhat.com> 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.84 on 10.5.11.23 X-MC-Unique: Vvh4fenWPNineW8XE1fCbQ-1 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 the first QEMU version that supports the kvm-no-adjvtime CPU feature. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- This patch has been trimmed. .../qemu_5.0.0-virt.aarch64.xml | 156 + tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 150 + .../caps_5.0.0.aarch64.replies | 22717 ++++++++++++++++ .../caps_5.0.0.aarch64.xml | 456 + 4 files changed, 23479 insertions(+) create mode 100644 tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml create mode 100644 tests/domaincapsdata/qemu_5.0.0.aarch64.xml create mode 100644 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies create mode 100644 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml diff --git a/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml b/tests/domai= ncapsdata/qemu_5.0.0-virt.aarch64.xml new file mode 100644 index 0000000000..f92ae951ca --- /dev/null +++ b/tests/domaincapsdata/qemu_5.0.0-virt.aarch64.xml @@ -0,0 +1,156 @@ + + /usr/bin/qemu-system-aarch64 + kvm + virt-5.0 + aarch64 [...] diff --git a/tests/domaincapsdata/qemu_5.0.0.aarch64.xml b/tests/domaincaps= data/qemu_5.0.0.aarch64.xml new file mode 100644 index 0000000000..232aacec2f --- /dev/null +++ b/tests/domaincapsdata/qemu_5.0.0.aarch64.xml @@ -0,0 +1,150 @@ + + /usr/bin/qemu-system-aarch64 + kvm + integratorcp + aarch64 [...] diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_5.0.0.aarch64.replies new file mode 100644 index 0000000000..a3136a0966 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies @@ -0,0 +1,22717 @@ +{ + "execute": "qmp_capabilities", + "id": "libvirt-1" +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "execute": "query-version", + "id": "libvirt-2" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 2, + "major": 4 + }, + "package": "v4.2.0-1157-gadcd6e93b9" + }, + "id": "libvirt-2" +} [...] +{ + "execute": "query-cpu-model-expansion", + "arguments": { + "type": "full", + "model": { + "name": "host" + } + }, + "id": "libvirt-42" +} + +{ + "return": { + "model": { + "name": "host", + "props": { + "sve768": false, + "sve128": false, + "sve1024": false, + "sve1280": false, + "sve896": false, + "sve256": false, + "sve1536": false, + "sve1792": false, + "sve384": false, + "sve": false, + "sve2048": false, + "kvm-no-adjvtime": false, + "sve512": false, + "aarch64": true, + "pmu": true, + "sve1920": false, + "sve1152": false, + "sve640": false, + "sve1408": false, + "sve1664": false + } + } + }, + "id": "libvirt-42" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml new file mode 100644 index 0000000000..538b40dd5b --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -0,0 +1,456 @@ + + /usr/bin/qemu-system-aarch64 [...] + 4002050 + 0 + 61700241 + v4.2.0-1157-gadcd6e93b9 + aarch64 + + + + + + + + + + + + + + + + + + + + + + [...] --=20 2.24.1 From nobody Tue May 7 06:44:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580488820408678.4407577560476; Fri, 31 Jan 2020 08:40:20 -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-249-YQWSpxxvNTK-FI_ulhoHnw-1; Fri, 31 Jan 2020 11:40:16 -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 D8F00801A10; Fri, 31 Jan 2020 16:40:09 +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 B12005DA81; Fri, 31 Jan 2020 16:40:09 +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 3B42B85CE1; Fri, 31 Jan 2020 16:40:09 +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 00VGdxTc024291 for ; Fri, 31 Jan 2020 11:39:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id C31F7100EBA8; Fri, 31 Jan 2020 16:39:59 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BE421001925 for ; Fri, 31 Jan 2020 16:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580488819; 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=quBY7L4bmQMXdEQngzXrk7Z2rJ4maKKkCehjZmrT3tk=; b=P8O3EfrBAkOCC6QndS8G4ZLgp+52MwT1ho6Ro/tgmoq8Mzzg2XTYCbPjt38iPLGXWAob7n 9USZgpekMxTLljVuDa8jlNg4TfBTnmiy2aNzKbkjrX+Hecdi+dX62ecnZ3yCyrCSLeFkgX opbOWUTpPqL32K6C9u0Osaxjk+c3D2g= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/5] qemu: Add the QEMU_CAPS_CPU_KVM_NO_ADJVTIME capability Date: Fri, 31 Jan 2020 17:39:49 +0100 Message-Id: <20200131163952.525863-3-abologna@redhat.com> In-Reply-To: <20200131163952.525863-1-abologna@redhat.com> References: <20200131163952.525863-1-abologna@redhat.com> 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.14 X-MC-Unique: YQWSpxxvNTK-FI_ulhoHnw-1 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" We will use this capability to detect whether the QEMU binary supports the kvm-no-adjvtime CPU feature. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8b7fde2bcc..4aa77c787d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -559,6 +559,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "i8042", "rng-builtin", "virtio-net.failover", + "cpu.kvm-no-adjvtime", ); =20 =20 @@ -1561,6 +1562,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsMemoryBackendMemfd[] =20 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxCPU[] =3D { { "unavailable-features", QEMU_CAPS_CPU_UNAVAILABLE_FEATURES }, + { "kvm-no-adjvtime", QEMU_CAPS_CPU_KVM_NO_ADJVTIME }, }; =20 static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index d86f54a481..db2334d4bf 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -540,6 +540,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */ QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */ QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */ + QEMU_CAPS_CPU_KVM_NO_ADJVTIME, /* -cpu ...,kvm-no-adjvtime */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index 538b40dd5b..c05cea2eb7 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -179,6 +179,7 @@ + 4002050 0 61700241 --=20 2.24.1 From nobody Tue May 7 06:44:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1580488823531577.3816561948549; Fri, 31 Jan 2020 08:40:23 -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-270-NR_Nme90M_24o_zqgo2jYw-1; Fri, 31 Jan 2020 11:40:20 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2B9788F4E8; Fri, 31 Jan 2020 16:40:14 +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 036035C3FA; Fri, 31 Jan 2020 16:40:14 +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 A560385CE4; Fri, 31 Jan 2020 16:40:13 +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 00VGe02W024298 for ; Fri, 31 Jan 2020 11:40:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 964AF100EBA8; Fri, 31 Jan 2020 16:40:00 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E8EB1001925 for ; Fri, 31 Jan 2020 16:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580488822; 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=laIt8o4R02d4JaKYHYPminbqNPUAmJ0S760SEndwP8k=; b=Nyh7Wg9v+QPNWRm/91tHHlo1cXz5W+I/74/rXcx4giSuCQ72LPKRi/X4m6gNP4BakfQ26C xF57tGvdbOCmxSsIWPmuyvrqwqXBm/DzG+Lg0GbWXB3w4clwPtkoXG/gYwxy4MVVhL1oG5 NB3GumXcC442gMKgq+5Sh6YzINdRSlA= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 3/5] cpu: Add the kvm-no-adjvtime CPU feature Date: Fri, 31 Jan 2020 17:39:50 +0100 Message-Id: <20200131163952.525863-4-abologna@redhat.com> In-Reply-To: <20200131163952.525863-1-abologna@redhat.com> References: <20200131163952.525863-1-abologna@redhat.com> 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.16 X-MC-Unique: NR_Nme90M_24o_zqgo2jYw-1 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 currently available on ARM only, and so it only needs to be known to the corresponding CPU driver. Signed-off-by: Andrea Bolognani --- src/cpu_map/arm_features.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu_map/arm_features.xml b/src/cpu_map/arm_features.xml index 8a53384463..13d00f07a8 100644 --- a/src/cpu_map/arm_features.xml +++ b/src/cpu_map/arm_features.xml @@ -19,4 +19,7 @@ =20 + + + --=20 2.24.1 From nobody Tue May 7 06:44:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1580488828708255.9619668166216; Fri, 31 Jan 2020 08:40: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-133-qy2ywIM5PI-VtuGUOWSBug-1; Fri, 31 Jan 2020 11:40:25 -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 30AD31089561; Fri, 31 Jan 2020 16:40:18 +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 0B036100EBA8; Fri, 31 Jan 2020 16:40:18 +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 BC3A318089C8; Fri, 31 Jan 2020 16:40:17 +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 00VGe1uO024306 for ; Fri, 31 Jan 2020 11:40:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6875D100EBA8; Fri, 31 Jan 2020 16:40:01 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E40B41001925 for ; Fri, 31 Jan 2020 16:40:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580488827; 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=d5MAUORSvuijvj3z7d7gKiQMUTBslzit72f7004Tu+E=; b=N6bc2Eipn8hk6MFUv21G9ObzaMARKiR6rXEVOgdAJZoiaDQTNxNNZ1q7H05yx2UQf+x8c4 6up2ydvXLstKh4R5nKpGWzrHkq3K74vQjFjQF4nxHEH+4vjnHGvk7M4m1WOI4FzO6o8gF6 PNbryABBggO/1IUlD2mgUQPA5KRBK4Q= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 4/5] qemu: Validate the kvm-no-adjvtime CPU feature Date: Fri, 31 Jan 2020 17:39:51 +0100 Message-Id: <20200131163952.525863-5-abologna@redhat.com> In-Reply-To: <20200131163952.525863-1-abologna@redhat.com> References: <20200131163952.525863-1-abologna@redhat.com> 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.84 on 10.5.11.22 X-MC-Unique: qy2ywIM5PI-VtuGUOWSBug-1 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" Error out if the QEMU binary doesn't support it. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_domain.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d3045b4bcd..8b0c91d6c1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4625,7 +4625,8 @@ qemuDomainDefSetDefaultCPU(virDomainDefPtr def, =20 =20 static int -qemuDomainDefCPUPostParse(virDomainDefPtr def) +qemuDomainDefCPUPostParse(virDomainDefPtr def, + virQEMUCapsPtr qemuCaps) { virCPUFeatureDefPtr sveFeature =3D NULL; bool sveVectorLengthsProvided =3D false; @@ -4696,6 +4697,15 @@ qemuDomainDefCPUPostParse(virDomainDefPtr def) } else if (STRPREFIX(feature->name, "sve")) { sveVectorLengthsProvided =3D true; } + + if (STREQ(feature->name, "kvm-no-adjvtime") && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_KVM_NO_ADJVTIME)) + { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("The '%s' feature is not supported by this " + "QEMU binary"), feature->name); + return -1; + } } =20 if (sveVectorLengthsProvided) { @@ -4858,7 +4868,7 @@ qemuDomainDefPostParse(virDomainDefPtr def, if (qemuDomainDefVcpusPostParse(def) < 0) return -1; =20 - if (qemuDomainDefCPUPostParse(def) < 0) + if (qemuDomainDefCPUPostParse(def, qemuCaps) < 0) return -1; =20 if (qemuDomainDefTsegPostParse(def, qemuCaps) < 0) --=20 2.24.1 From nobody Tue May 7 06:44:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580488825520448.58361135281643; Fri, 31 Jan 2020 08:40:25 -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-37-us7dtZIPOuyOpz9QVwU5YA-1; Fri, 31 Jan 2020 11:40:13 -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 F2EEC1089552; Fri, 31 Jan 2020 16:40:05 +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 BBDF977920; Fri, 31 Jan 2020 16:40:05 +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 5716F85CE0; Fri, 31 Jan 2020 16:40:05 +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 00VGe2ek024317 for ; Fri, 31 Jan 2020 11:40:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3ACCF100EBA8; Fri, 31 Jan 2020 16:40:02 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.43.2.246]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B67EE1001925 for ; Fri, 31 Jan 2020 16:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580488824; 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=RKHzFbb48VZrjWJEE7pZOLL/5eCWeym4XrvfCGM7Ka4=; b=H7362lU72/0YkeO4EE6lUHAnT5C6FQKuZYL20AfpRTQNyV4UDn4HJXp/EQkrsdi5mcI/qM iHFKbssGzAOTie58vfZ9eaJ5gNNEeX4R14GQlWRgcjsMaIHw9FaqSwZO3VnM7/1jSIkz5O Mxpo5A1eHYSg2MwRGw8ZvwzNUj+Xd+w= From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/5] tests: Add tests for the kvm-no-adjvtime CPU feature Date: Fri, 31 Jan 2020 17:39:52 +0100 Message-Id: <20200131163952.525863-6-abologna@redhat.com> In-Reply-To: <20200131163952.525863-1-abologna@redhat.com> References: <20200131163952.525863-1-abologna@redhat.com> 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 X-MC-Unique: us7dtZIPOuyOpz9QVwU5YA-1 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" Signed-off-by: Andrea Bolognani --- .../aarch64-features-misc.aarch64-latest.args | 32 +++++++++++++++++++ .../aarch64-features-misc.xml | 17 ++++++++++ tests/qemuxml2argvtest.c | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 tests/qemuxml2argvdata/aarch64-features-misc.aarch64-la= test.args create mode 100644 tests/qemuxml2argvdata/aarch64-features-misc.xml diff --git a/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.ar= gs b/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args new file mode 100644 index 0000000000..f1d1017d59 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-misc.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-guest/master-key.aes \ +-machine virt,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff,gic-version=3D3 \ +-cpu host,kvm-no-adjvtime=3Don \ +-m 1024 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-features-misc.xml b/tests/qemux= ml2argvdata/aarch64-features-misc.xml new file mode 100644 index 0000000000..49e197ad87 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-misc.xml @@ -0,0 +1,17 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1 + + hvm + + + + + + /usr/bin/qemu-system-aarch64 + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a36183bf34..81b82bcd1f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2725,6 +2725,8 @@ mymain(void) /* SVE aarch64 CPU features work on modern QEMU */ DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); =20 + DO_TEST_CAPS_ARCH_LATEST("aarch64-features-misc", "aarch64"); + qemuTestSetHostArch(&driver, VIR_ARCH_NONE); =20 DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY); --=20 2.24.1