libvirt/SOURCES/libvirt-qemu-Add-the-QEMU_CAPS_CPU_KVM_NO_ADJVTIME-capability.patch
2021-10-08 13:11:20 +00:00

83 lines
2.9 KiB
Diff

From 694540f2c93ccee78e203c5fe92be5e1a05a2281 Mon Sep 17 00:00:00 2001
Message-Id: <694540f2c93ccee78e203c5fe92be5e1a05a2281@dist-git>
From: Andrea Bolognani <abologna@redhat.com>
Date: Fri, 14 Feb 2020 13:12:34 +0100
Subject: [PATCH] qemu: Add the QEMU_CAPS_CPU_KVM_NO_ADJVTIME capability
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We will use this capability to detect whether the QEMU binary
supports the kvm-no-adjvtime CPU feature.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 204e2306e582524b46c4e26e1f0aa354aa50d006)
Conflicts:
* src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
+ tpm-spapr has not been backported
https://bugzilla.redhat.com/show_bug.cgi?id=1762634
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Message-Id: <20200214121237.623948-4-abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
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 10c17323be..6912a6f72b 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -557,6 +557,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 350 */
"virtio-net.failover",
+ "cpu.kvm-no-adjvtime",
);
@@ -1557,6 +1558,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[]
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxCPU[] = {
{ "unavailable-features", QEMU_CAPS_CPU_UNAVAILABLE_FEATURES },
+ { "kvm-no-adjvtime", QEMU_CAPS_CPU_KVM_NO_ADJVTIME },
};
static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 6ab0eabd3f..4ccb0c55bc 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -538,6 +538,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 350 */
QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
+ QEMU_CAPS_CPU_KVM_NO_ADJVTIME, /* cpu.kvm-no-adjvtime */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 6b365dd75d..e871ba528e 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -178,6 +178,7 @@
<flag name='drive-nvme'/>
<flag name='smp-dies'/>
<flag name='virtio-net.failover'/>
+ <flag name='cpu.kvm-no-adjvtime'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700241</microcodeVersion>
--
2.25.0