Merge branch 'c10s' into a10s
This commit is contained in:
commit
e86c40f9d6
72
libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch
Normal file
72
libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
From 0fec05230ebee98159489f1b301d869f75a502f4 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <0fec05230ebee98159489f1b301d869f75a502f4.1737018560.git.jdenemar@redhat.com>
|
||||||
|
From: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Date: Mon, 6 Jan 2025 16:11:01 +0100
|
||||||
|
Subject: [PATCH] conf: Adjust hyperv tlbflush formatting
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Commit 247357cc292a added support for direct and extended modes for
|
||||||
|
tlbflush, but forgot to do the formatting as well.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
(cherry picked from commit 9df14f51735eeb4221a25ccd408a2dccf0a35b59)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73088
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
---
|
||||||
|
src/conf/domain_conf.c | 11 ++++++++++-
|
||||||
|
tests/qemuxmlconfdata/hyperv.x86_64-latest.xml | 5 ++++-
|
||||||
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index c8254d2146..1f0b67ca28 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -27974,7 +27974,6 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
||||||
|
case VIR_DOMAIN_HYPERV_RESET:
|
||||||
|
case VIR_DOMAIN_HYPERV_FREQUENCIES:
|
||||||
|
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
|
||||||
|
- case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||||
|
case VIR_DOMAIN_HYPERV_IPI:
|
||||||
|
case VIR_DOMAIN_HYPERV_EVMCS:
|
||||||
|
case VIR_DOMAIN_HYPERV_AVIC:
|
||||||
|
@@ -28004,6 +28003,16 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||||
|
+ if (def->hyperv_features[j] != VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ virBufferAddLit(&hypervChildBuf, "<direct state='on'/>\n");
|
||||||
|
+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ virBufferAddLit(&hypervChildBuf, "<extended state='on'/>\n");
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case VIR_DOMAIN_HYPERV_LAST:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
diff --git a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml b/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml
|
||||||
|
index 36d9161fa8..49537188af 100644
|
||||||
|
--- a/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml
|
||||||
|
+++ b/tests/qemuxmlconfdata/hyperv.x86_64-latest.xml
|
||||||
|
@@ -22,7 +22,10 @@
|
||||||
|
<vendor_id state='on' value='KVM Hv'/>
|
||||||
|
<frequencies state='on'/>
|
||||||
|
<reenlightenment state='on'/>
|
||||||
|
- <tlbflush state='on'/>
|
||||||
|
+ <tlbflush state='on'>
|
||||||
|
+ <direct state='on'/>
|
||||||
|
+ <extended state='on'/>
|
||||||
|
+ </tlbflush>
|
||||||
|
<ipi state='on'/>
|
||||||
|
<evmcs state='on'/>
|
||||||
|
<avic state='on'/>
|
||||||
|
--
|
||||||
|
2.47.1
|
@ -0,0 +1,213 @@
|
|||||||
|
From fe06935a2497f26850fce25e3e461cd020697b4c Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <fe06935a2497f26850fce25e3e461cd020697b4c.1737018560.git.jdenemar@redhat.com>
|
||||||
|
From: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Date: Fri, 20 Dec 2024 12:27:22 +0100
|
||||||
|
Subject: [PATCH] conf, docs: Add support for direct and extended tlbflush
|
||||||
|
features
|
||||||
|
|
||||||
|
Similarly to stimer-direct these are subelements of <tlbflush/> in the
|
||||||
|
domain XML.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit ac08b362da724f1dd7aa6f05c0a9e7a960a7f024)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73088
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
---
|
||||||
|
docs/formatdomain.rst | 13 ++++++++-----
|
||||||
|
src/conf/domain_conf.c | 26 +++++++++++++++++++++++++-
|
||||||
|
src/conf/domain_conf.h | 2 ++
|
||||||
|
src/conf/schemas/domaincommon.rng | 21 ++++++++++++++++++++-
|
||||||
|
src/cpu/cpu_x86.c | 7 +++++++
|
||||||
|
src/cpu/cpu_x86_data.h | 2 ++
|
||||||
|
6 files changed, 64 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
|
||||||
|
index 60bee8bd4f..8d787ef59a 100644
|
||||||
|
--- a/docs/formatdomain.rst
|
||||||
|
+++ b/docs/formatdomain.rst
|
||||||
|
@@ -1993,7 +1993,10 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
|
||||||
|
<vendor_id state='on' value='KVM Hv'/>
|
||||||
|
<frequencies state='on'/>
|
||||||
|
<reenlightenment state='on'/>
|
||||||
|
- <tlbflush state='on'/>
|
||||||
|
+ <tlbflush state='on'>
|
||||||
|
+ <direct state='on'/>
|
||||||
|
+ <extended state='on'/>
|
||||||
|
+ </tlbflush>
|
||||||
|
<ipi state='on'/>
|
||||||
|
<evmcs state='on'/>
|
||||||
|
<emsr_bitmap state='on'/>
|
||||||
|
@@ -2068,9 +2071,9 @@ are:
|
||||||
|
Enable various features improving behavior of guests running Microsoft
|
||||||
|
Windows.
|
||||||
|
|
||||||
|
- =============== ====================================================================== ============================================ =======================================================
|
||||||
|
+ =============== ====================================================================== ============================================ ========================================================================
|
||||||
|
Feature Description Value Since
|
||||||
|
- =============== ====================================================================== ============================================ =======================================================
|
||||||
|
+ =============== ====================================================================== ============================================ ========================================================================
|
||||||
|
relaxed Relax constraints on timers on, off :since:`1.0.0 (QEMU 2.0)`
|
||||||
|
vapic Enable virtual APIC on, off :since:`1.1.0 (QEMU 2.0)`
|
||||||
|
spinlocks Enable spinlock support on, off; retries - at least 4095 :since:`1.1.0 (QEMU 2.0)`
|
||||||
|
@@ -2082,13 +2085,13 @@ are:
|
||||||
|
vendor_id Set hypervisor vendor id on, off; value - string, up to 12 characters :since:`1.3.3 (QEMU 2.5)`
|
||||||
|
frequencies Expose frequency MSRs on, off :since:`4.7.0 (QEMU 2.12)`
|
||||||
|
reenlightenment Enable re-enlightenment notification on migration on, off :since:`4.7.0 (QEMU 3.0)`
|
||||||
|
- tlbflush Enable PV TLB flush support on, off :since:`4.7.0 (QEMU 3.0)`
|
||||||
|
+ tlbflush Enable PV TLB flush support on, off; direct - on,off; extended - on,off :since:`4.7.0 (QEMU 3.0), direct and extended modes 11.0.0 (QEMU 7.1.0)`
|
||||||
|
ipi Enable PV IPI support on, off :since:`4.10.0 (QEMU 3.1)`
|
||||||
|
evmcs Enable Enlightened VMCS on, off :since:`4.10.0 (QEMU 3.1)`
|
||||||
|
avic Enable use Hyper-V SynIC with hardware APICv/AVIC on, off :since:`8.10.0 (QEMU 6.2)`
|
||||||
|
emsr_bitmap Avoid unnecessary updates to L2 MSR Bitmap upon vmexits. on, off :since:`10.7.0 (QEMU 7.1)`
|
||||||
|
xmm_input Enable XMM Fast Hypercall Input on, off :since:`10.7.0 (QEMU 7.1)`
|
||||||
|
- =============== ====================================================================== ============================================ =======================================================
|
||||||
|
+ =============== ====================================================================== ============================================ ========================================================================
|
||||||
|
|
||||||
|
:since:`Since 8.0.0`, the hypervisor can be configured further by setting
|
||||||
|
the ``mode`` attribute to one of the following values:
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index 4ad8289b89..c2164f6377 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -16672,7 +16672,6 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
|
||||||
|
case VIR_DOMAIN_HYPERV_RESET:
|
||||||
|
case VIR_DOMAIN_HYPERV_FREQUENCIES:
|
||||||
|
case VIR_DOMAIN_HYPERV_REENLIGHTENMENT:
|
||||||
|
- case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||||
|
case VIR_DOMAIN_HYPERV_IPI:
|
||||||
|
case VIR_DOMAIN_HYPERV_EVMCS:
|
||||||
|
case VIR_DOMAIN_HYPERV_AVIC:
|
||||||
|
@@ -16680,6 +16679,31 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def,
|
||||||
|
case VIR_DOMAIN_HYPERV_XMM_INPUT:
|
||||||
|
break;
|
||||||
|
|
||||||
|
+ case VIR_DOMAIN_HYPERV_TLBFLUSH:
|
||||||
|
+ if (value != VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ child = xmlFirstElementChild(node);
|
||||||
|
+ while (child) {
|
||||||
|
+ if (STREQ((const char *)child->name, "direct")) {
|
||||||
|
+ if (virXMLPropTristateSwitch(child, "state", VIR_XML_PROP_REQUIRED,
|
||||||
|
+ &def->hyperv_tlbflush_direct) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ } else if (STREQ((const char *)child->name, "extended")) {
|
||||||
|
+ if (virXMLPropTristateSwitch(child, "state", VIR_XML_PROP_REQUIRED,
|
||||||
|
+ &def->hyperv_tlbflush_extended) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ } else {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
+ _("unsupported Hyper-V tlbflush feature: %1$s"),
|
||||||
|
+ child->name);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ child = xmlNextElementSibling(child);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case VIR_DOMAIN_HYPERV_STIMER:
|
||||||
|
if (value != VIR_TRISTATE_SWITCH_ON)
|
||||||
|
break;
|
||||||
|
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||||
|
index a187ab4083..9f7c28343f 100644
|
||||||
|
--- a/src/conf/domain_conf.h
|
||||||
|
+++ b/src/conf/domain_conf.h
|
||||||
|
@@ -3101,6 +3101,8 @@ struct _virDomainDef {
|
||||||
|
virDomainXenPassthroughMode xen_passthrough_mode;
|
||||||
|
unsigned int hyperv_spinlocks;
|
||||||
|
virTristateSwitch hyperv_stimer_direct;
|
||||||
|
+ virTristateSwitch hyperv_tlbflush_direct;
|
||||||
|
+ virTristateSwitch hyperv_tlbflush_extended;
|
||||||
|
virGICVersion gic_version;
|
||||||
|
virDomainHPTResizing hpt_resizing;
|
||||||
|
unsigned long long hpt_maxpagesize; /* Stored in KiB */
|
||||||
|
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
|
||||||
|
index b3fdbf7ffb..7121519ca3 100644
|
||||||
|
--- a/src/conf/schemas/domaincommon.rng
|
||||||
|
+++ b/src/conf/schemas/domaincommon.rng
|
||||||
|
@@ -8027,7 +8027,7 @@
|
||||||
|
</optional>
|
||||||
|
<optional>
|
||||||
|
<element name="tlbflush">
|
||||||
|
- <ref name="featurestate"/>
|
||||||
|
+ <ref name="tlbflush"/>
|
||||||
|
</element>
|
||||||
|
</optional>
|
||||||
|
<optional>
|
||||||
|
@@ -8075,6 +8075,25 @@
|
||||||
|
</interleave>
|
||||||
|
</define>
|
||||||
|
|
||||||
|
+ <!-- Hyper-V tlbflush features -->
|
||||||
|
+ <define name="tlbflush">
|
||||||
|
+ <interleave>
|
||||||
|
+ <optional>
|
||||||
|
+ <ref name="featurestate"/>
|
||||||
|
+ </optional>
|
||||||
|
+ <optional>
|
||||||
|
+ <element name="direct">
|
||||||
|
+ <ref name="featurestate"/>
|
||||||
|
+ </element>
|
||||||
|
+ </optional>
|
||||||
|
+ <optional>
|
||||||
|
+ <element name="extended">
|
||||||
|
+ <ref name="featurestate"/>
|
||||||
|
+ </element>
|
||||||
|
+ </optional>
|
||||||
|
+ </interleave>
|
||||||
|
+ </define>
|
||||||
|
+
|
||||||
|
<!-- Optional KVM features -->
|
||||||
|
<define name="kvm">
|
||||||
|
<element name="kvm">
|
||||||
|
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||||
|
index 13695802da..6d72d446c9 100644
|
||||||
|
--- a/src/cpu/cpu_x86.c
|
||||||
|
+++ b/src/cpu/cpu_x86.c
|
||||||
|
@@ -99,6 +99,8 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT,
|
||||||
|
|
||||||
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT,
|
||||||
|
0x40000003, 0x0, 0x00080000);
|
||||||
|
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH_DIRECT,
|
||||||
|
+ 0x40000003, 0x0, 0x00004000);
|
||||||
|
|
||||||
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH,
|
||||||
|
0x40000004, 0x00000004, 0x0);
|
||||||
|
@@ -109,6 +111,9 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI,
|
||||||
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS,
|
||||||
|
0x40000004, 0x00004000, 0x0);
|
||||||
|
|
||||||
|
+KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH_EXT,
|
||||||
|
+ 0x40000004, 0x0, 0x00004000);
|
||||||
|
+
|
||||||
|
KVM_FEATURE_DEF(VIR_CPU_x86_HV_EMSR_BITMAP,
|
||||||
|
0x4000000A, 0x00080000, 0x0);
|
||||||
|
static virCPUx86Feature x86_kvm_features[] =
|
||||||
|
@@ -130,6 +135,8 @@ static virCPUx86Feature x86_kvm_features[] =
|
||||||
|
KVM_FEATURE(VIR_CPU_x86_HV_EVMCS),
|
||||||
|
KVM_FEATURE(VIR_CPU_x86_HV_STIMER_DIRECT),
|
||||||
|
KVM_FEATURE(VIR_CPU_x86_HV_EMSR_BITMAP),
|
||||||
|
+ KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH_DIRECT),
|
||||||
|
+ KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH_EXT),
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct _virCPUx86Signature virCPUx86Signature;
|
||||||
|
diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h
|
||||||
|
index 43ad2faeb1..448acbbeb2 100644
|
||||||
|
--- a/src/cpu/cpu_x86_data.h
|
||||||
|
+++ b/src/cpu/cpu_x86_data.h
|
||||||
|
@@ -60,6 +60,8 @@ struct _virCPUx86MSR {
|
||||||
|
#define VIR_CPU_x86_HV_FREQUENCIES "hv-frequencies"
|
||||||
|
#define VIR_CPU_x86_HV_REENLIGHTENMENT "hv-reenlightenment"
|
||||||
|
#define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush"
|
||||||
|
+#define VIR_CPU_x86_HV_TLBFLUSH_EXT "hv-tlbflush-ext"
|
||||||
|
+#define VIR_CPU_x86_HV_TLBFLUSH_DIRECT "hv-tlbflush-direct"
|
||||||
|
#define VIR_CPU_x86_HV_IPI "hv-ipi"
|
||||||
|
#define VIR_CPU_x86_HV_EVMCS "hv-evmcs"
|
||||||
|
#define VIR_CPU_x86_HV_AVIC "hv-avic"
|
||||||
|
--
|
||||||
|
2.47.1
|
112
libvirt-conf-refactor-hyperv-features-formatting.patch
Normal file
112
libvirt-conf-refactor-hyperv-features-formatting.patch
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
From 2a281383aea04bc6e414ca225e6bc0998fca2724 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <2a281383aea04bc6e414ca225e6bc0998fca2724.1737018560.git.jdenemar@redhat.com>
|
||||||
|
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||||
|
Date: Mon, 6 Jan 2025 17:20:57 +0100
|
||||||
|
Subject: [PATCH] conf: refactor hyperv features formatting
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Add a nested buffer for whatever sub-elements a particular
|
||||||
|
hyperv feature might have.
|
||||||
|
|
||||||
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||||
|
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
(cherry picked from commit ad6b4d1fef275036b31a2bee435144871ebbcfbb)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73088
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
---
|
||||||
|
src/conf/domain_conf.c | 46 +++++++++++++++++-------------------------
|
||||||
|
1 file changed, 19 insertions(+), 27 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index c2164f6377..c8254d2146 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -27954,13 +27954,15 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
||||||
|
|
||||||
|
virBufferAsprintf(&childBuf, "<hyperv mode='%s'>\n",
|
||||||
|
virDomainHyperVModeTypeToString(def->features[i]));
|
||||||
|
- virBufferAdjustIndent(&childBuf, 2);
|
||||||
|
+
|
||||||
|
for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) {
|
||||||
|
+ g_auto(virBuffer) hypervAttrBuf = VIR_BUFFER_INITIALIZER;
|
||||||
|
+ g_auto(virBuffer) hypervChildBuf = VIR_BUFFER_INIT_CHILD(&tmpChildBuf);
|
||||||
|
+
|
||||||
|
if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ABSENT)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- virBufferAsprintf(&childBuf, "<%s state='%s'",
|
||||||
|
- virDomainHypervTypeToString(j),
|
||||||
|
+ virBufferAsprintf(&hypervAttrBuf, " state='%s'",
|
||||||
|
virTristateSwitchTypeToString(def->hyperv_features[j]));
|
||||||
|
|
||||||
|
switch ((virDomainHyperv) j) {
|
||||||
|
@@ -27978,49 +27980,39 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
||||||
|
case VIR_DOMAIN_HYPERV_AVIC:
|
||||||
|
case VIR_DOMAIN_HYPERV_EMSR_BITMAP:
|
||||||
|
case VIR_DOMAIN_HYPERV_XMM_INPUT:
|
||||||
|
- virBufferAddLit(&childBuf, "/>\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
||||||
|
- if (def->hyperv_features[j] != VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
- virBufferAddLit(&childBuf, "/>\n");
|
||||||
|
- break;
|
||||||
|
+ if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
+ virBufferAsprintf(&hypervAttrBuf,
|
||||||
|
+ " retries='%d'", def->hyperv_spinlocks);
|
||||||
|
}
|
||||||
|
- virBufferAsprintf(&childBuf, " retries='%d'/>\n",
|
||||||
|
- def->hyperv_spinlocks);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_HYPERV_STIMER:
|
||||||
|
- if (def->hyperv_features[j] != VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
- virBufferAddLit(&childBuf, "/>\n");
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
- if (def->hyperv_stimer_direct == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
- virBufferAddLit(&childBuf, ">\n");
|
||||||
|
- virBufferAdjustIndent(&childBuf, 2);
|
||||||
|
- virBufferAddLit(&childBuf, "<direct state='on'/>\n");
|
||||||
|
- virBufferAdjustIndent(&childBuf, -2);
|
||||||
|
- virBufferAddLit(&childBuf, "</stimer>\n");
|
||||||
|
- } else {
|
||||||
|
- virBufferAddLit(&childBuf, "/>\n");
|
||||||
|
+ if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ON &&
|
||||||
|
+ def->hyperv_stimer_direct == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
+ virBufferAddLit(&hypervChildBuf, "<direct state='on'/>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_HYPERV_VENDOR_ID:
|
||||||
|
- if (def->hyperv_features[j] != VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
- virBufferAddLit(&childBuf, "/>\n");
|
||||||
|
- break;
|
||||||
|
+ if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
+ virBufferEscapeString(&hypervAttrBuf, " value='%s'",
|
||||||
|
+ def->hyperv_vendor_id);
|
||||||
|
}
|
||||||
|
- virBufferEscapeString(&childBuf, " value='%s'/>\n",
|
||||||
|
- def->hyperv_vendor_id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_HYPERV_LAST:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ virXMLFormatElement(&tmpChildBuf, virDomainHypervTypeToString(j),
|
||||||
|
+ &hypervAttrBuf, &hypervChildBuf);
|
||||||
|
}
|
||||||
|
- virBufferAdjustIndent(&childBuf, -2);
|
||||||
|
+
|
||||||
|
+ virBufferAddBuffer(&childBuf, &tmpChildBuf);
|
||||||
|
virBufferAddLit(&childBuf, "</hyperv>\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.1
|
457
libvirt-cpu_map-Add-GraniteRapids-v2-CPU-model.patch
Normal file
457
libvirt-cpu_map-Add-GraniteRapids-v2-CPU-model.patch
Normal file
@ -0,0 +1,457 @@
|
|||||||
|
From 4dbeaa7e1ce9fffb3e2a2b19ba10cc3d2c19091d Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <4dbeaa7e1ce9fffb3e2a2b19ba10cc3d2c19091d.1734696366.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Wed, 18 Dec 2024 13:46:25 +0100
|
||||||
|
Subject: [PATCH] cpu_map: Add GraniteRapids-v2 CPU model
|
||||||
|
|
||||||
|
Introduced by QEMU 9.2.0
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 41a6de76bc6e31a206d9d82c84c5d485b710fe01)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-71897
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/cpu_map/index.xml | 1 +
|
||||||
|
src/cpu_map/meson.build | 1 +
|
||||||
|
src/cpu_map/x86_GraniteRapids-v2.xml | 206 ++++++++++++++++++
|
||||||
|
.../domaincapsdata/qemu_9.2.0-q35.x86_64.xml | 57 +++++
|
||||||
|
.../domaincapsdata/qemu_9.2.0-tcg.x86_64.xml | 47 ++++
|
||||||
|
tests/domaincapsdata/qemu_9.2.0.x86_64.xml | 57 +++++
|
||||||
|
6 files changed, 369 insertions(+)
|
||||||
|
create mode 100644 src/cpu_map/x86_GraniteRapids-v2.xml
|
||||||
|
|
||||||
|
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
|
||||||
|
index 8e74195312..dba2f21811 100644
|
||||||
|
--- a/src/cpu_map/index.xml
|
||||||
|
+++ b/src/cpu_map/index.xml
|
||||||
|
@@ -121,6 +121,7 @@
|
||||||
|
<include filename='x86_SapphireRapids-v3.xml'/>
|
||||||
|
<include filename='x86_GraniteRapids.xml'/>
|
||||||
|
<include filename='x86_GraniteRapids-v1.xml'/>
|
||||||
|
+ <include filename='x86_GraniteRapids-v2.xml'/>
|
||||||
|
<include filename='x86_SierraForest.xml'/>
|
||||||
|
<include filename='x86_SierraForest-v1.xml'/>
|
||||||
|
<include filename='x86_Denverton.xml'/>
|
||||||
|
diff --git a/src/cpu_map/meson.build b/src/cpu_map/meson.build
|
||||||
|
index fa7faa4016..9a1c048620 100644
|
||||||
|
--- a/src/cpu_map/meson.build
|
||||||
|
+++ b/src/cpu_map/meson.build
|
||||||
|
@@ -77,6 +77,7 @@ cpumap_data = [
|
||||||
|
'x86_EPYC.xml',
|
||||||
|
'x86_features.xml',
|
||||||
|
'x86_GraniteRapids-v1.xml',
|
||||||
|
+ 'x86_GraniteRapids-v2.xml',
|
||||||
|
'x86_GraniteRapids.xml',
|
||||||
|
'x86_Haswell-IBRS.xml',
|
||||||
|
'x86_Haswell-noTSX-IBRS.xml',
|
||||||
|
diff --git a/src/cpu_map/x86_GraniteRapids-v2.xml b/src/cpu_map/x86_GraniteRapids-v2.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..855a43d4ad
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/cpu_map/x86_GraniteRapids-v2.xml
|
||||||
|
@@ -0,0 +1,206 @@
|
||||||
|
+<cpus>
|
||||||
|
+ <model name='GraniteRapids-v2'>
|
||||||
|
+ <decode host='on' guest='off'/>
|
||||||
|
+ <signature family='6' model='173'/>
|
||||||
|
+ <vendor name='Intel'/>
|
||||||
|
+ <feature name='3dnowprefetch'/>
|
||||||
|
+ <feature name='abm'/>
|
||||||
|
+ <feature name='adx'/>
|
||||||
|
+ <feature name='aes'/>
|
||||||
|
+ <feature name='amx-bf16'/>
|
||||||
|
+ <feature name='amx-fp16'/>
|
||||||
|
+ <feature name='amx-int8'/>
|
||||||
|
+ <feature name='amx-tile'/>
|
||||||
|
+ <feature name='apic'/>
|
||||||
|
+ <feature name='arat'/>
|
||||||
|
+ <feature name='arch-capabilities'/>
|
||||||
|
+ <feature name='avx'/>
|
||||||
|
+ <feature name='avx-vnni'/>
|
||||||
|
+ <feature name='avx10'/>
|
||||||
|
+ <feature name='avx10-128'/>
|
||||||
|
+ <feature name='avx10-256'/>
|
||||||
|
+ <feature name='avx10-512'/>
|
||||||
|
+ <feature name='avx2'/>
|
||||||
|
+ <feature name='avx512-bf16'/>
|
||||||
|
+ <feature name='avx512-fp16'/>
|
||||||
|
+ <feature name='avx512-vpopcntdq'/>
|
||||||
|
+ <feature name='avx512bitalg'/>
|
||||||
|
+ <feature name='avx512bw'/>
|
||||||
|
+ <feature name='avx512cd'/>
|
||||||
|
+ <feature name='avx512dq'/>
|
||||||
|
+ <feature name='avx512f'/>
|
||||||
|
+ <feature name='avx512ifma'/>
|
||||||
|
+ <feature name='avx512vbmi'/>
|
||||||
|
+ <feature name='avx512vbmi2'/>
|
||||||
|
+ <feature name='avx512vl'/>
|
||||||
|
+ <feature name='avx512vnni'/>
|
||||||
|
+ <feature name='bmi1'/>
|
||||||
|
+ <feature name='bmi2'/>
|
||||||
|
+ <feature name='bus-lock-detect'/>
|
||||||
|
+ <feature name='cldemote'/>
|
||||||
|
+ <feature name='clflush'/>
|
||||||
|
+ <feature name='clflushopt'/>
|
||||||
|
+ <feature name='clwb'/>
|
||||||
|
+ <feature name='cmov'/>
|
||||||
|
+ <feature name='cx16'/>
|
||||||
|
+ <feature name='cx8'/>
|
||||||
|
+ <feature name='de'/>
|
||||||
|
+ <feature name='erms'/>
|
||||||
|
+ <feature name='f16c'/>
|
||||||
|
+ <feature name='fbsdp-no'/>
|
||||||
|
+ <feature name='fma'/>
|
||||||
|
+ <feature name='fpu'/>
|
||||||
|
+ <feature name='fsgsbase'/>
|
||||||
|
+ <feature name='fsrc'/>
|
||||||
|
+ <feature name='fsrm'/>
|
||||||
|
+ <feature name='fsrs'/>
|
||||||
|
+ <feature name='fxsr'/>
|
||||||
|
+ <feature name='fzrm'/>
|
||||||
|
+ <feature name='gfni'/>
|
||||||
|
+ <feature name='hle'/>
|
||||||
|
+ <feature name='ibrs-all'/>
|
||||||
|
+ <feature name='invpcid'/>
|
||||||
|
+ <feature name='la57'/>
|
||||||
|
+ <feature name='lahf_lm'/>
|
||||||
|
+ <feature name='lm'/>
|
||||||
|
+ <feature name='mca'/>
|
||||||
|
+ <feature name='mcdt-no'/>
|
||||||
|
+ <feature name='mce'/>
|
||||||
|
+ <feature name='mds-no'/>
|
||||||
|
+ <feature name='mmx'/>
|
||||||
|
+ <feature name='movbe'/>
|
||||||
|
+ <feature name='movdir64b'/>
|
||||||
|
+ <feature name='movdiri'/>
|
||||||
|
+ <feature name='msr'/>
|
||||||
|
+ <feature name='mtrr'/>
|
||||||
|
+ <feature name='nx'/>
|
||||||
|
+ <feature name='pae'/>
|
||||||
|
+ <feature name='pat'/>
|
||||||
|
+ <feature name='pbrsb-no'/>
|
||||||
|
+ <feature name='pcid'/>
|
||||||
|
+ <feature name='pclmuldq'/>
|
||||||
|
+ <feature name='pdpe1gb'/>
|
||||||
|
+ <feature name='pge'/>
|
||||||
|
+ <feature name='pku'/>
|
||||||
|
+ <feature name='pni'/>
|
||||||
|
+ <feature name='popcnt'/>
|
||||||
|
+ <feature name='prefetchiti'/>
|
||||||
|
+ <feature name='pschange-mc-no'/>
|
||||||
|
+ <feature name='psdp-no'/>
|
||||||
|
+ <feature name='pse'/>
|
||||||
|
+ <feature name='pse36'/>
|
||||||
|
+ <feature name='rdctl-no'/>
|
||||||
|
+ <feature name='rdpid'/>
|
||||||
|
+ <feature name='rdrand'/>
|
||||||
|
+ <feature name='rdseed'/>
|
||||||
|
+ <feature name='rdtscp'/>
|
||||||
|
+ <feature name='rtm'/>
|
||||||
|
+ <feature name='sbdr-ssdp-no'/>
|
||||||
|
+ <feature name='sep'/>
|
||||||
|
+ <feature name='serialize'/>
|
||||||
|
+ <feature name='sha-ni'/>
|
||||||
|
+ <feature name='skip-l1dfl-vmentry'/>
|
||||||
|
+ <feature name='smap'/>
|
||||||
|
+ <feature name='smep'/>
|
||||||
|
+ <feature name='spec-ctrl'/>
|
||||||
|
+ <feature name='ss'/>
|
||||||
|
+ <feature name='ssbd'/>
|
||||||
|
+ <feature name='sse'/>
|
||||||
|
+ <feature name='sse2'/>
|
||||||
|
+ <feature name='sse4.1'/>
|
||||||
|
+ <feature name='sse4.2'/>
|
||||||
|
+ <feature name='ssse3'/>
|
||||||
|
+ <feature name='syscall'/>
|
||||||
|
+ <feature name='taa-no'/>
|
||||||
|
+ <feature name='tsc'/>
|
||||||
|
+ <feature name='tsc-deadline'/>
|
||||||
|
+ <feature name='tsc_adjust'/>
|
||||||
|
+ <feature name='tsx-ldtrk'/>
|
||||||
|
+ <feature name='umip'/>
|
||||||
|
+ <feature name='vaes'/>
|
||||||
|
+ <feature name='vme'/>
|
||||||
|
+ <feature name='vmx-activity-hlt'/>
|
||||||
|
+ <feature name='vmx-apicv-register'/>
|
||||||
|
+ <feature name='vmx-apicv-vid'/>
|
||||||
|
+ <feature name='vmx-apicv-x2apic'/>
|
||||||
|
+ <feature name='vmx-apicv-xapic'/>
|
||||||
|
+ <feature name='vmx-cr3-load-noexit'/>
|
||||||
|
+ <feature name='vmx-cr3-store-noexit'/>
|
||||||
|
+ <feature name='vmx-cr8-load-exit'/>
|
||||||
|
+ <feature name='vmx-cr8-store-exit'/>
|
||||||
|
+ <feature name='vmx-desc-exit'/>
|
||||||
|
+ <feature name='vmx-entry-ia32e-mode'/>
|
||||||
|
+ <feature name='vmx-entry-load-efer'/>
|
||||||
|
+ <feature name='vmx-entry-load-pat'/>
|
||||||
|
+ <feature name='vmx-entry-load-perf-global-ctrl'/>
|
||||||
|
+ <feature name='vmx-entry-noload-debugctl'/>
|
||||||
|
+ <feature name='vmx-ept'/>
|
||||||
|
+ <feature name='vmx-ept-1gb'/>
|
||||||
|
+ <feature name='vmx-ept-2mb'/>
|
||||||
|
+ <feature name='vmx-ept-execonly'/>
|
||||||
|
+ <feature name='vmx-eptad'/>
|
||||||
|
+ <feature name='vmx-eptp-switching'/>
|
||||||
|
+ <feature name='vmx-exit-ack-intr'/>
|
||||||
|
+ <feature name='vmx-exit-load-efer'/>
|
||||||
|
+ <feature name='vmx-exit-load-pat'/>
|
||||||
|
+ <feature name='vmx-exit-load-perf-global-ctrl'/>
|
||||||
|
+ <feature name='vmx-exit-nosave-debugctl'/>
|
||||||
|
+ <feature name='vmx-exit-save-efer'/>
|
||||||
|
+ <feature name='vmx-exit-save-pat'/>
|
||||||
|
+ <feature name='vmx-exit-save-preemption-timer'/>
|
||||||
|
+ <feature name='vmx-flexpriority'/>
|
||||||
|
+ <feature name='vmx-hlt-exit'/>
|
||||||
|
+ <feature name='vmx-ins-outs'/>
|
||||||
|
+ <feature name='vmx-intr-exit'/>
|
||||||
|
+ <feature name='vmx-invept'/>
|
||||||
|
+ <feature name='vmx-invept-all-context'/>
|
||||||
|
+ <feature name='vmx-invept-single-context'/>
|
||||||
|
+ <feature name='vmx-invlpg-exit'/>
|
||||||
|
+ <feature name='vmx-invpcid-exit'/>
|
||||||
|
+ <feature name='vmx-invvpid-all-context'/>
|
||||||
|
+ <feature name='vmx-invvpid-single-addr'/>
|
||||||
|
+ <feature name='vmx-invvpid-single-context-noglobals'/>
|
||||||
|
+ <feature name='vmx-io-bitmap'/>
|
||||||
|
+ <feature name='vmx-io-exit'/>
|
||||||
|
+ <feature name='vmx-monitor-exit'/>
|
||||||
|
+ <feature name='vmx-movdr-exit'/>
|
||||||
|
+ <feature name='vmx-msr-bitmap'/>
|
||||||
|
+ <feature name='vmx-mtf'/>
|
||||||
|
+ <feature name='vmx-mwait-exit'/>
|
||||||
|
+ <feature name='vmx-nmi-exit'/>
|
||||||
|
+ <feature name='vmx-page-walk-4'/>
|
||||||
|
+ <feature name='vmx-page-walk-5'/>
|
||||||
|
+ <feature name='vmx-pause-exit'/>
|
||||||
|
+ <feature name='vmx-pml'/>
|
||||||
|
+ <feature name='vmx-posted-intr'/>
|
||||||
|
+ <feature name='vmx-preemption-timer'/>
|
||||||
|
+ <feature name='vmx-rdpmc-exit'/>
|
||||||
|
+ <feature name='vmx-rdrand-exit'/>
|
||||||
|
+ <feature name='vmx-rdseed-exit'/>
|
||||||
|
+ <feature name='vmx-rdtsc-exit'/>
|
||||||
|
+ <feature name='vmx-rdtscp-exit'/>
|
||||||
|
+ <feature name='vmx-secondary-ctls'/>
|
||||||
|
+ <feature name='vmx-shadow-vmcs'/>
|
||||||
|
+ <feature name='vmx-store-lma'/>
|
||||||
|
+ <feature name='vmx-true-ctls'/>
|
||||||
|
+ <feature name='vmx-tsc-offset'/>
|
||||||
|
+ <feature name='vmx-unrestricted-guest'/>
|
||||||
|
+ <feature name='vmx-vintr-pending'/>
|
||||||
|
+ <feature name='vmx-vmfunc'/>
|
||||||
|
+ <feature name='vmx-vmwrite-vmexit-fields'/>
|
||||||
|
+ <feature name='vmx-vnmi'/>
|
||||||
|
+ <feature name='vmx-vnmi-pending'/>
|
||||||
|
+ <feature name='vmx-vpid'/>
|
||||||
|
+ <feature name='vmx-wbinvd-exit'/>
|
||||||
|
+ <feature name='vmx-xsaves'/>
|
||||||
|
+ <feature name='vpclmulqdq'/>
|
||||||
|
+ <feature name='wbnoinvd'/>
|
||||||
|
+ <feature name='x2apic'/>
|
||||||
|
+ <feature name='xfd'/>
|
||||||
|
+ <feature name='xgetbv1'/>
|
||||||
|
+ <feature name='xsave'/>
|
||||||
|
+ <feature name='xsavec'/>
|
||||||
|
+ <feature name='xsaveopt'/>
|
||||||
|
+ <feature name='xsaves'/>
|
||||||
|
+ </model>
|
||||||
|
+</cpus>
|
||||||
|
diff --git a/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
|
||||||
|
index 99445e5f44..d5db9af49e 100644
|
||||||
|
--- a/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
|
||||||
|
+++ b/tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml
|
||||||
|
@@ -565,6 +565,63 @@
|
||||||
|
<feature name='xfd'/>
|
||||||
|
<feature name='xsaves'/>
|
||||||
|
</blockers>
|
||||||
|
+ <model usable='no' vendor='Intel'>GraniteRapids-v2</model>
|
||||||
|
+ <blockers model='GraniteRapids-v2'>
|
||||||
|
+ <feature name='amx-bf16'/>
|
||||||
|
+ <feature name='amx-fp16'/>
|
||||||
|
+ <feature name='amx-int8'/>
|
||||||
|
+ <feature name='amx-tile'/>
|
||||||
|
+ <feature name='avx-vnni'/>
|
||||||
|
+ <feature name='avx10'/>
|
||||||
|
+ <feature name='avx10-128'/>
|
||||||
|
+ <feature name='avx10-256'/>
|
||||||
|
+ <feature name='avx10-512'/>
|
||||||
|
+ <feature name='avx512-bf16'/>
|
||||||
|
+ <feature name='avx512-fp16'/>
|
||||||
|
+ <feature name='avx512-vpopcntdq'/>
|
||||||
|
+ <feature name='avx512bitalg'/>
|
||||||
|
+ <feature name='avx512bw'/>
|
||||||
|
+ <feature name='avx512cd'/>
|
||||||
|
+ <feature name='avx512dq'/>
|
||||||
|
+ <feature name='avx512f'/>
|
||||||
|
+ <feature name='avx512ifma'/>
|
||||||
|
+ <feature name='avx512vbmi'/>
|
||||||
|
+ <feature name='avx512vbmi2'/>
|
||||||
|
+ <feature name='avx512vl'/>
|
||||||
|
+ <feature name='avx512vnni'/>
|
||||||
|
+ <feature name='bus-lock-detect'/>
|
||||||
|
+ <feature name='cldemote'/>
|
||||||
|
+ <feature name='erms'/>
|
||||||
|
+ <feature name='fbsdp-no'/>
|
||||||
|
+ <feature name='fsrc'/>
|
||||||
|
+ <feature name='fsrm'/>
|
||||||
|
+ <feature name='fsrs'/>
|
||||||
|
+ <feature name='fzrm'/>
|
||||||
|
+ <feature name='gfni'/>
|
||||||
|
+ <feature name='hle'/>
|
||||||
|
+ <feature name='ibrs-all'/>
|
||||||
|
+ <feature name='invpcid'/>
|
||||||
|
+ <feature name='la57'/>
|
||||||
|
+ <feature name='mcdt-no'/>
|
||||||
|
+ <feature name='movdir64b'/>
|
||||||
|
+ <feature name='movdiri'/>
|
||||||
|
+ <feature name='pbrsb-no'/>
|
||||||
|
+ <feature name='pcid'/>
|
||||||
|
+ <feature name='pku'/>
|
||||||
|
+ <feature name='prefetchiti'/>
|
||||||
|
+ <feature name='psdp-no'/>
|
||||||
|
+ <feature name='rtm'/>
|
||||||
|
+ <feature name='sbdr-ssdp-no'/>
|
||||||
|
+ <feature name='serialize'/>
|
||||||
|
+ <feature name='spec-ctrl'/>
|
||||||
|
+ <feature name='ss'/>
|
||||||
|
+ <feature name='taa-no'/>
|
||||||
|
+ <feature name='tsx-ldtrk'/>
|
||||||
|
+ <feature name='vaes'/>
|
||||||
|
+ <feature name='vpclmulqdq'/>
|
||||||
|
+ <feature name='xfd'/>
|
||||||
|
+ <feature name='xsaves'/>
|
||||||
|
+ </blockers>
|
||||||
|
<model usable='no' vendor='Intel' canonical='Haswell-v1'>Haswell</model>
|
||||||
|
<blockers model='Haswell'>
|
||||||
|
<feature name='erms'/>
|
||||||
|
diff --git a/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
|
||||||
|
index 8bf967c99f..7ccdc11412 100644
|
||||||
|
--- a/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
|
||||||
|
+++ b/tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml
|
||||||
|
@@ -733,6 +733,53 @@
|
||||||
|
<feature name='xsavec'/>
|
||||||
|
<feature name='xsaves'/>
|
||||||
|
</blockers>
|
||||||
|
+ <model usable='no' vendor='Intel'>GraniteRapids-v2</model>
|
||||||
|
+ <blockers model='GraniteRapids-v2'>
|
||||||
|
+ <feature name='amx-bf16'/>
|
||||||
|
+ <feature name='amx-fp16'/>
|
||||||
|
+ <feature name='amx-int8'/>
|
||||||
|
+ <feature name='amx-tile'/>
|
||||||
|
+ <feature name='arch-capabilities'/>
|
||||||
|
+ <feature name='avx-vnni'/>
|
||||||
|
+ <feature name='avx10'/>
|
||||||
|
+ <feature name='avx10-128'/>
|
||||||
|
+ <feature name='avx10-256'/>
|
||||||
|
+ <feature name='avx10-512'/>
|
||||||
|
+ <feature name='avx512-bf16'/>
|
||||||
|
+ <feature name='avx512-fp16'/>
|
||||||
|
+ <feature name='avx512-vpopcntdq'/>
|
||||||
|
+ <feature name='avx512bitalg'/>
|
||||||
|
+ <feature name='avx512bw'/>
|
||||||
|
+ <feature name='avx512cd'/>
|
||||||
|
+ <feature name='avx512dq'/>
|
||||||
|
+ <feature name='avx512f'/>
|
||||||
|
+ <feature name='avx512ifma'/>
|
||||||
|
+ <feature name='avx512vbmi'/>
|
||||||
|
+ <feature name='avx512vbmi2'/>
|
||||||
|
+ <feature name='avx512vl'/>
|
||||||
|
+ <feature name='avx512vnni'/>
|
||||||
|
+ <feature name='bus-lock-detect'/>
|
||||||
|
+ <feature name='cldemote'/>
|
||||||
|
+ <feature name='gfni'/>
|
||||||
|
+ <feature name='hle'/>
|
||||||
|
+ <feature name='invpcid'/>
|
||||||
|
+ <feature name='mcdt-no'/>
|
||||||
|
+ <feature name='movdir64b'/>
|
||||||
|
+ <feature name='movdiri'/>
|
||||||
|
+ <feature name='pcid'/>
|
||||||
|
+ <feature name='prefetchiti'/>
|
||||||
|
+ <feature name='rtm'/>
|
||||||
|
+ <feature name='serialize'/>
|
||||||
|
+ <feature name='spec-ctrl'/>
|
||||||
|
+ <feature name='ssbd'/>
|
||||||
|
+ <feature name='tsc-deadline'/>
|
||||||
|
+ <feature name='tsc_adjust'/>
|
||||||
|
+ <feature name='tsx-ldtrk'/>
|
||||||
|
+ <feature name='vpclmulqdq'/>
|
||||||
|
+ <feature name='xfd'/>
|
||||||
|
+ <feature name='xsavec'/>
|
||||||
|
+ <feature name='xsaves'/>
|
||||||
|
+ </blockers>
|
||||||
|
<model usable='no' vendor='Intel' canonical='Haswell-v1'>Haswell</model>
|
||||||
|
<blockers model='Haswell'>
|
||||||
|
<feature name='hle'/>
|
||||||
|
diff --git a/tests/domaincapsdata/qemu_9.2.0.x86_64.xml b/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
|
||||||
|
index 40aa971144..05a5ce4bee 100644
|
||||||
|
--- a/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
|
||||||
|
+++ b/tests/domaincapsdata/qemu_9.2.0.x86_64.xml
|
||||||
|
@@ -564,6 +564,63 @@
|
||||||
|
<feature name='xfd'/>
|
||||||
|
<feature name='xsaves'/>
|
||||||
|
</blockers>
|
||||||
|
+ <model usable='no' vendor='Intel'>GraniteRapids-v2</model>
|
||||||
|
+ <blockers model='GraniteRapids-v2'>
|
||||||
|
+ <feature name='amx-bf16'/>
|
||||||
|
+ <feature name='amx-fp16'/>
|
||||||
|
+ <feature name='amx-int8'/>
|
||||||
|
+ <feature name='amx-tile'/>
|
||||||
|
+ <feature name='avx-vnni'/>
|
||||||
|
+ <feature name='avx10'/>
|
||||||
|
+ <feature name='avx10-128'/>
|
||||||
|
+ <feature name='avx10-256'/>
|
||||||
|
+ <feature name='avx10-512'/>
|
||||||
|
+ <feature name='avx512-bf16'/>
|
||||||
|
+ <feature name='avx512-fp16'/>
|
||||||
|
+ <feature name='avx512-vpopcntdq'/>
|
||||||
|
+ <feature name='avx512bitalg'/>
|
||||||
|
+ <feature name='avx512bw'/>
|
||||||
|
+ <feature name='avx512cd'/>
|
||||||
|
+ <feature name='avx512dq'/>
|
||||||
|
+ <feature name='avx512f'/>
|
||||||
|
+ <feature name='avx512ifma'/>
|
||||||
|
+ <feature name='avx512vbmi'/>
|
||||||
|
+ <feature name='avx512vbmi2'/>
|
||||||
|
+ <feature name='avx512vl'/>
|
||||||
|
+ <feature name='avx512vnni'/>
|
||||||
|
+ <feature name='bus-lock-detect'/>
|
||||||
|
+ <feature name='cldemote'/>
|
||||||
|
+ <feature name='erms'/>
|
||||||
|
+ <feature name='fbsdp-no'/>
|
||||||
|
+ <feature name='fsrc'/>
|
||||||
|
+ <feature name='fsrm'/>
|
||||||
|
+ <feature name='fsrs'/>
|
||||||
|
+ <feature name='fzrm'/>
|
||||||
|
+ <feature name='gfni'/>
|
||||||
|
+ <feature name='hle'/>
|
||||||
|
+ <feature name='ibrs-all'/>
|
||||||
|
+ <feature name='invpcid'/>
|
||||||
|
+ <feature name='la57'/>
|
||||||
|
+ <feature name='mcdt-no'/>
|
||||||
|
+ <feature name='movdir64b'/>
|
||||||
|
+ <feature name='movdiri'/>
|
||||||
|
+ <feature name='pbrsb-no'/>
|
||||||
|
+ <feature name='pcid'/>
|
||||||
|
+ <feature name='pku'/>
|
||||||
|
+ <feature name='prefetchiti'/>
|
||||||
|
+ <feature name='psdp-no'/>
|
||||||
|
+ <feature name='rtm'/>
|
||||||
|
+ <feature name='sbdr-ssdp-no'/>
|
||||||
|
+ <feature name='serialize'/>
|
||||||
|
+ <feature name='spec-ctrl'/>
|
||||||
|
+ <feature name='ss'/>
|
||||||
|
+ <feature name='taa-no'/>
|
||||||
|
+ <feature name='tsx-ldtrk'/>
|
||||||
|
+ <feature name='vaes'/>
|
||||||
|
+ <feature name='vpclmulqdq'/>
|
||||||
|
+ <feature name='xfd'/>
|
||||||
|
+ <feature name='xsaves'/>
|
||||||
|
+ </blockers>
|
||||||
|
<model usable='no' vendor='Intel' canonical='Haswell-v1'>Haswell</model>
|
||||||
|
<blockers model='Haswell'>
|
||||||
|
<feature name='erms'/>
|
||||||
|
--
|
||||||
|
2.47.1
|
51
libvirt-cpu_map-Add-avx10-CPU-features.patch
Normal file
51
libvirt-cpu_map-Add-avx10-CPU-features.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From ab3e7f96a75447a1fd8d5f31cc8acf4b61377074 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <ab3e7f96a75447a1fd8d5f31cc8acf4b61377074.1734696366.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Wed, 18 Dec 2024 13:30:16 +0100
|
||||||
|
Subject: [PATCH] cpu_map: Add avx10* CPU features
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 30f05acf354437a776b528487bb70ddccf324cd2)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-71897
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/cpu_map/x86_features.xml | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
|
||||||
|
index 08bf014604..8be8fab42e 100644
|
||||||
|
--- a/src/cpu_map/x86_features.xml
|
||||||
|
+++ b/src/cpu_map/x86_features.xml
|
||||||
|
@@ -469,6 +469,9 @@
|
||||||
|
<feature name='prefetchiti'>
|
||||||
|
<cpuid eax_in='0x00000007' ecx_in='0x00000001' edx='0x00004000'/>
|
||||||
|
</feature>
|
||||||
|
+ <feature name='avx10'>
|
||||||
|
+ <cpuid eax_in='0x00000007' ecx_in='0x00000001' edx='0x00080000'/>
|
||||||
|
+ </feature>
|
||||||
|
|
||||||
|
<!-- cpuid level 0x00000007, 0x0002 (edx) -->
|
||||||
|
<feature name='mcdt-no'>
|
||||||
|
@@ -541,6 +544,17 @@
|
||||||
|
<cpuid eax_in='0x00000014' ecx_in='0x00000000' ecx='0x80000000'/>
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
+ <!-- cpuid level 0x00000024, 0x0000 (ebx) -->
|
||||||
|
+ <feature name='avx10-128'>
|
||||||
|
+ <cpuid eax_in='0x00000024' ecx_in='0x00000000' ebx='0x00010000'/>
|
||||||
|
+ </feature>
|
||||||
|
+ <feature name='avx10-256'>
|
||||||
|
+ <cpuid eax_in='0x00000024' ecx_in='0x00000000' ebx='0x00020000'/>
|
||||||
|
+ </feature>
|
||||||
|
+ <feature name='avx10-512'>
|
||||||
|
+ <cpuid eax_in='0x00000024' ecx_in='0x00000000' ebx='0x00040000'/>
|
||||||
|
+ </feature>
|
||||||
|
+
|
||||||
|
<!-- cpuid level 0x80000001 (ecx) -->
|
||||||
|
<feature name='lahf_lm'>
|
||||||
|
<alias name='lahf-lm' source='qemu'/>
|
||||||
|
--
|
||||||
|
2.47.1
|
41
libvirt-cpu_map-Add-sha512-sm3-and-sm4-CPU-features.patch
Normal file
41
libvirt-cpu_map-Add-sha512-sm3-and-sm4-CPU-features.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 153ee694e806ebf1ba684c1b7ddfa7a90c9d3adf Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <153ee694e806ebf1ba684c1b7ddfa7a90c9d3adf.1734696366.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Wed, 18 Dec 2024 13:27:40 +0100
|
||||||
|
Subject: [PATCH] cpu_map: Add sha512, sm3, and sm4 CPU features
|
||||||
|
|
||||||
|
Introduced by Clearwater Forest platform.
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 212b7d8e280cabddef1f0996bd9553c6a55babd8)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-71898
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/cpu_map/x86_features.xml | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
|
||||||
|
index 8be8fab42e..0e1fee6e98 100644
|
||||||
|
--- a/src/cpu_map/x86_features.xml
|
||||||
|
+++ b/src/cpu_map/x86_features.xml
|
||||||
|
@@ -416,6 +416,15 @@
|
||||||
|
</feature>
|
||||||
|
|
||||||
|
<!-- cpuid level 0x00000007, 0x0001 (eax) -->
|
||||||
|
+ <feature name='sha512'>
|
||||||
|
+ <cpuid eax_in='0x00000007' ecx_in='0x00000001' eax='0x00000001'/>
|
||||||
|
+ </feature>
|
||||||
|
+ <feature name='sm3'>
|
||||||
|
+ <cpuid eax_in='0x00000007' ecx_in='0x00000001' eax='0x00000002'/>
|
||||||
|
+ </feature>
|
||||||
|
+ <feature name='sm4'>
|
||||||
|
+ <cpuid eax_in='0x00000007' ecx_in='0x00000001' eax='0x00000004'/>
|
||||||
|
+ </feature>
|
||||||
|
<feature name='avx-vnni'>
|
||||||
|
<cpuid eax_in='0x00000007' ecx_in='0x00000001' eax='0x00000010'/>
|
||||||
|
</feature>
|
||||||
|
--
|
||||||
|
2.47.1
|
@ -0,0 +1,108 @@
|
|||||||
|
From fe11cbb1c588d045c69ed1242a0b4b95f309ba92 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <fe11cbb1c588d045c69ed1242a0b4b95f309ba92.1737018560.git.jdenemar@redhat.com>
|
||||||
|
From: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Date: Fri, 20 Dec 2024 12:28:24 +0100
|
||||||
|
Subject: [PATCH] qemu: Add support for direct and extended tlbflush features
|
||||||
|
|
||||||
|
They require special handling since they are dependent on the basic
|
||||||
|
tlbflush feature itself and therefore are not handled automatically as
|
||||||
|
part of virDomainHyperv enum, just like the stimer-direct feature.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-7122
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
(cherry picked from commit 247357cc292a83c8628592562cbb4fa621cdc5b0)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73088
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_command.c | 6 +++++
|
||||||
|
src/qemu/qemu_process.c | 24 +++++++++++++++++++
|
||||||
|
.../qemuxmlconfdata/hyperv.x86_64-latest.args | 2 +-
|
||||||
|
tests/qemuxmlconfdata/hyperv.xml | 5 +++-
|
||||||
|
4 files changed, 35 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index dcb9c4934e..1f28de6194 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -6350,6 +6350,12 @@ qemuBuildCpuCommandLine(virCommand *cmd,
|
||||||
|
if ((i == VIR_DOMAIN_HYPERV_STIMER) &&
|
||||||
|
(def->hyperv_stimer_direct == VIR_TRISTATE_SWITCH_ON))
|
||||||
|
virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_STIMER_DIRECT);
|
||||||
|
+ if (i == VIR_DOMAIN_HYPERV_TLBFLUSH) {
|
||||||
|
+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_TLBFLUSH_DIRECT);
|
||||||
|
+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON)
|
||||||
|
+ virBufferAsprintf(&buf, ",%s=on", VIR_CPU_x86_HV_TLBFLUSH_EXT);
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_HYPERV_SPINLOCKS:
|
||||||
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||||
|
index bee7a39e4e..7297263d33 100644
|
||||||
|
--- a/src/qemu/qemu_process.c
|
||||||
|
+++ b/src/qemu/qemu_process.c
|
||||||
|
@@ -4281,6 +4281,30 @@ qemuProcessVerifyHypervFeatures(virDomainDef *def,
|
||||||
|
"direct");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
+ if (i == VIR_DOMAIN_HYPERV_TLBFLUSH) {
|
||||||
|
+ if (def->hyperv_tlbflush_direct == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
+ rc = virCPUDataCheckFeature(cpu, VIR_CPU_x86_HV_TLBFLUSH_DIRECT);
|
||||||
|
+ if (rc < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
+ _("host doesn't support hyperv tlbflush '%1$s' feature"),
|
||||||
|
+ "direct");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (def->hyperv_tlbflush_extended == VIR_TRISTATE_SWITCH_ON) {
|
||||||
|
+ rc = virCPUDataCheckFeature(cpu, VIR_CPU_x86_HV_TLBFLUSH_EXT);
|
||||||
|
+ if (rc < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
+ _("host doesn't support hyperv tlbflush '%1$s' feature"),
|
||||||
|
+ "extended");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/tests/qemuxmlconfdata/hyperv.x86_64-latest.args b/tests/qemuxmlconfdata/hyperv.x86_64-latest.args
|
||||||
|
index 2aafafb340..5a32b80e71 100644
|
||||||
|
--- a/tests/qemuxmlconfdata/hyperv.x86_64-latest.args
|
||||||
|
+++ b/tests/qemuxmlconfdata/hyperv.x86_64-latest.args
|
||||||
|
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||||
|
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
|
||||||
|
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=on \
|
||||||
|
-accel tcg \
|
||||||
|
--cpu 'qemu64,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x2fff,hv-vpindex=on,hv-runtime=on,hv-synic=on,hv-stimer=on,hv-reset=on,hv-vendor-id=KVM Hv,hv-frequencies=on,hv-reenlightenment=on,hv-tlbflush=on,hv-ipi=on,hv-evmcs=on,hv-avic=on,hv-emsr-bitmap=on,hv-xmm-input=on' \
|
||||||
|
+-cpu 'qemu64,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x2fff,hv-vpindex=on,hv-runtime=on,hv-synic=on,hv-stimer=on,hv-reset=on,hv-vendor-id=KVM Hv,hv-frequencies=on,hv-reenlightenment=on,hv-tlbflush=on,hv-tlbflush-direct=on,hv-tlbflush-ext=on,hv-ipi=on,hv-evmcs=on,hv-avic=on,hv-emsr-bitmap=on,hv-xmm-input=on' \
|
||||||
|
-m size=219136k \
|
||||||
|
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||||
|
-overcommit mem-lock=off \
|
||||||
|
diff --git a/tests/qemuxmlconfdata/hyperv.xml b/tests/qemuxmlconfdata/hyperv.xml
|
||||||
|
index a1e3cbbdf8..8c323f6578 100644
|
||||||
|
--- a/tests/qemuxmlconfdata/hyperv.xml
|
||||||
|
+++ b/tests/qemuxmlconfdata/hyperv.xml
|
||||||
|
@@ -22,7 +22,10 @@
|
||||||
|
<vendor_id state='on' value='KVM Hv'/>
|
||||||
|
<frequencies state='on'/>
|
||||||
|
<reenlightenment state='on'/>
|
||||||
|
- <tlbflush state='on'/>
|
||||||
|
+ <tlbflush state='on'>
|
||||||
|
+ <direct state='on'/>
|
||||||
|
+ <extended state='on'/>
|
||||||
|
+ </tlbflush>
|
||||||
|
<ipi state='on'/>
|
||||||
|
<evmcs state='on'/>
|
||||||
|
<avic state='on'/>
|
||||||
|
--
|
||||||
|
2.47.1
|
154
libvirt-qemu-Enable-I-O-APIC-even-more-frequently.patch
Normal file
154
libvirt-qemu-Enable-I-O-APIC-even-more-frequently.patch
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
From 349536b9f6f1df1f652cee5e25b3d2eae42e8170 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <349536b9f6f1df1f652cee5e25b3d2eae42e8170.1734696366.git.jdenemar@redhat.com>
|
||||||
|
From: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Date: Wed, 18 Dec 2024 11:07:26 +0100
|
||||||
|
Subject: [PATCH] qemu: Enable I/O APIC even more frequently
|
||||||
|
|
||||||
|
In my previous commit v10.10.0-48-g2d222ecf6e I've made us enable
|
||||||
|
I/O APIC when there is an IOMMU with EIM. This works well. What
|
||||||
|
does not work is case when there's just an IOMMU without EIM but
|
||||||
|
with 256+ vCPUS. Problem is that post parsing happens in two
|
||||||
|
stages: general domain post parse (where
|
||||||
|
qemuDomainDefEnableDefaultFeatures() is called) and then per
|
||||||
|
device post parse (where qemuDomainIOMMUDefPostParse() is
|
||||||
|
called). Now, in aforementioned case it is the device post parse
|
||||||
|
phase where EIM is enabled but the code that would enable
|
||||||
|
VIR_DOMAIN_FEATURE_IOAPIC has already run.
|
||||||
|
|
||||||
|
To resolve this, make the domain post parse callback "foresee"
|
||||||
|
the future enabling of EIM so that it can turn on I/O APIC
|
||||||
|
beforehand.
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-65844
|
||||||
|
Fixes: 2d222ecf6e73614a400b830ac56e9aaa1bc55ecc
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
(cherry picked from commit 0162f2008e36df489f6f04e4d6002543acfa171d)
|
||||||
|
https://issues.redhat.com/browse/RHEL-71414
|
||||||
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_postparse.c | 21 +++++++++---
|
||||||
|
...m-autoadd-v2.x86_64-latest.abi-update.args | 1 +
|
||||||
|
...im-autoadd-v2.x86_64-latest.abi-update.xml | 1 +
|
||||||
|
.../intel-iommu-eim-autoadd-v2.xml | 32 +++++++++++++++++++
|
||||||
|
tests/qemuxmlconftest.c | 1 +
|
||||||
|
5 files changed, 51 insertions(+), 5 deletions(-)
|
||||||
|
create mode 120000 tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.args
|
||||||
|
create mode 120000 tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.xml
|
||||||
|
create mode 100644 tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.xml
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
|
||||||
|
index f48f172c37..049a6ef2dc 100644
|
||||||
|
--- a/src/qemu/qemu_postparse.c
|
||||||
|
+++ b/src/qemu/qemu_postparse.c
|
||||||
|
@@ -783,6 +783,15 @@ qemuDomainPstoreDefPostParse(virDomainPstoreDef *pstore,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+static bool
|
||||||
|
+qemuDomainNeedsIOMMUWithEIM(const virDomainDef *def)
|
||||||
|
+{
|
||||||
|
+ return ARCH_IS_X86(def->os.arch) &&
|
||||||
|
+ virDomainDefGetVcpusMax(def) > QEMU_MAX_VCPUS_WITHOUT_EIM &&
|
||||||
|
+ qemuDomainIsQ35(def);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
static int
|
||||||
|
qemuDomainIOMMUDefPostParse(virDomainIOMMUDef *iommu,
|
||||||
|
const virDomainDef *def,
|
||||||
|
@@ -793,9 +802,7 @@ qemuDomainIOMMUDefPostParse(virDomainIOMMUDef *iommu,
|
||||||
|
* (EIM) is not explicitly turned off, let's enable it. If we didn't then
|
||||||
|
* guest will have troubles with interrupts. */
|
||||||
|
if (parseFlags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE &&
|
||||||
|
- ARCH_IS_X86(def->os.arch) &&
|
||||||
|
- virDomainDefGetVcpusMax(def) > QEMU_MAX_VCPUS_WITHOUT_EIM &&
|
||||||
|
- qemuDomainIsQ35(def) &&
|
||||||
|
+ qemuDomainNeedsIOMMUWithEIM(def) &&
|
||||||
|
iommu && iommu->model == VIR_DOMAIN_IOMMU_MODEL_INTEL) {
|
||||||
|
|
||||||
|
/* eim requires intremap. */
|
||||||
|
@@ -1548,9 +1555,13 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
|
||||||
|
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* IOMMU with intremap requires split I/O APIC */
|
||||||
|
+ /* IOMMU with intremap requires split I/O APIC. But it may happen that
|
||||||
|
+ * domain already has IOMMU without inremap. This will be fixed in
|
||||||
|
+ * qemuDomainIOMMUDefPostParse() but there domain definition can't be
|
||||||
|
+ * modified so change it now. */
|
||||||
|
if (def->iommu &&
|
||||||
|
- def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
|
||||||
|
+ (def->iommu->intremap == VIR_TRISTATE_SWITCH_ON ||
|
||||||
|
+ qemuDomainNeedsIOMMUWithEIM(def)) &&
|
||||||
|
def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_DOMAIN_IOAPIC_NONE) {
|
||||||
|
def->features[VIR_DOMAIN_FEATURE_IOAPIC] = VIR_DOMAIN_IOAPIC_QEMU;
|
||||||
|
}
|
||||||
|
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.args b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.args
|
||||||
|
new file mode 120000
|
||||||
|
index 0000000000..a7fdee3d71
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.args
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+intel-iommu-eim-autoadd.x86_64-latest.abi-update.args
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.xml b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.xml
|
||||||
|
new file mode 120000
|
||||||
|
index 0000000000..928ea1b4c8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.x86_64-latest.abi-update.xml
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+intel-iommu-eim-autoadd.x86_64-latest.abi-update.xml
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.xml b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..b39ee55786
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd-v2.xml
|
||||||
|
@@ -0,0 +1,32 @@
|
||||||
|
+<domain type='kvm'>
|
||||||
|
+ <name>QEMUGuest1</name>
|
||||||
|
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
+ <memory unit='KiB'>219100</memory>
|
||||||
|
+ <currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
+ <vcpu placement='static'>288</vcpu>
|
||||||
|
+ <os>
|
||||||
|
+ <type arch='x86_64' machine='q35'>hvm</type>
|
||||||
|
+ <boot dev='hd'/>
|
||||||
|
+ </os>
|
||||||
|
+ <cpu mode='custom' match='exact' check='none'>
|
||||||
|
+ <model fallback='forbid'>qemu64</model>
|
||||||
|
+ </cpu>
|
||||||
|
+ <clock offset='utc'/>
|
||||||
|
+ <on_poweroff>destroy</on_poweroff>
|
||||||
|
+ <on_reboot>restart</on_reboot>
|
||||||
|
+ <on_crash>destroy</on_crash>
|
||||||
|
+ <devices>
|
||||||
|
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
|
+ <controller type='pci' index='0' model='pcie-root'/>
|
||||||
|
+ <controller type='usb' index='0' model='none'/>
|
||||||
|
+ <controller type='sata' index='0'>
|
||||||
|
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
|
||||||
|
+ </controller>
|
||||||
|
+ <input type='mouse' bus='ps2'/>
|
||||||
|
+ <input type='keyboard' bus='ps2'/>
|
||||||
|
+ <iommu model="intel"/>
|
||||||
|
+ <audio id='1' type='none'/>
|
||||||
|
+ <watchdog model='itco' action='reset'/>
|
||||||
|
+ <memballoon model='none'/>
|
||||||
|
+ </devices>
|
||||||
|
+</domain>
|
||||||
|
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
|
||||||
|
index f3c8d0ae34..53a0237a42 100644
|
||||||
|
--- a/tests/qemuxmlconftest.c
|
||||||
|
+++ b/tests/qemuxmlconftest.c
|
||||||
|
@@ -2771,6 +2771,7 @@ mymain(void)
|
||||||
|
DO_TEST_CAPS_LATEST("intel-iommu-dma-translation");
|
||||||
|
DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine");
|
||||||
|
DO_TEST_CAPS_LATEST_ABI_UPDATE("intel-iommu-eim-autoadd");
|
||||||
|
+ DO_TEST_CAPS_LATEST_ABI_UPDATE("intel-iommu-eim-autoadd-v2");
|
||||||
|
DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64");
|
||||||
|
DO_TEST_CAPS_LATEST("virtio-iommu-x86_64");
|
||||||
|
DO_TEST_CAPS_VER_PARSE_ERROR("virtio-iommu-x86_64", "6.1.0");
|
||||||
|
--
|
||||||
|
2.47.1
|
@ -0,0 +1,60 @@
|
|||||||
|
From b8b6465c2d637ad1f07469de7bc71004a312e7be Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <b8b6465c2d637ad1f07469de7bc71004a312e7be.1737018560.git.jdenemar@redhat.com>
|
||||||
|
From: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Date: Fri, 10 Jan 2025 18:25:20 +0100
|
||||||
|
Subject: [PATCH] qemu_migration: Do not consider post-copy active in
|
||||||
|
postcopy-recover
|
||||||
|
|
||||||
|
The postcopy-recover migration state in QEMU means a connection for the
|
||||||
|
migration stream was established. Depending on the schedulers on both
|
||||||
|
hosts a relative timing of the corresponding MIGRATION event on the
|
||||||
|
source host and the destination host may differ. Specifically it's
|
||||||
|
possible that the source sees postcopy-recover while the destination is
|
||||||
|
still in postcopy-paused.
|
||||||
|
|
||||||
|
Currently the Perform phase on the source host ends when we get
|
||||||
|
postcopy-recover event and the Finish phase on the destination host is
|
||||||
|
called. If this is fast enough we can still see postcopy-paused state
|
||||||
|
when the Finish phase starts waiting for migration to complete. This is
|
||||||
|
interpreted as a failure and reported back to the caller. Even though
|
||||||
|
the recovery may actually start just a few moments later.
|
||||||
|
|
||||||
|
To avoid this race we now don't consider post-copy migration active in
|
||||||
|
postcopy-recover state and keep waiting for postcopy-active event (in
|
||||||
|
the success path). Thus the Finish phase is entered only after the
|
||||||
|
migration switches to postcopy-active. In this state QEMU guarantees the
|
||||||
|
destination already switched at least to postcopy-recover and we won't
|
||||||
|
be confused be seeing an old postcopy-failed state.
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73085
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
Reviewed-by: Michal Privoznik <mprivozn@redhat.com
|
||||||
|
(cherry picked from commit a71985f6f3fec52e2a6f4e3991ed9bf6280bdb4b)
|
||||||
|
|
||||||
|
https://issues.redhat.com/browse/RHEL-73699
|
||||||
|
|
||||||
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||||
|
---
|
||||||
|
src/qemu/qemu_migration.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||||
|
index 26a92d8ee2..b2b172a26c 100644
|
||||||
|
--- a/src/qemu/qemu_migration.c
|
||||||
|
+++ b/src/qemu/qemu_migration.c
|
||||||
|
@@ -1872,11 +1872,11 @@ qemuMigrationUpdateJobType(virDomainJobData *jobData)
|
||||||
|
|
||||||
|
switch ((qemuMonitorMigrationStatus) priv->stats.mig.status) {
|
||||||
|
case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY:
|
||||||
|
- case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER:
|
||||||
|
jobData->status = VIR_DOMAIN_JOB_STATUS_POSTCOPY;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER_SETUP:
|
||||||
|
+ case QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY_RECOVER:
|
||||||
|
jobData->status = VIR_DOMAIN_JOB_STATUS_POSTCOPY_RECOVER;
|
||||||
|
break;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.1
|
26
libvirt.spec
26
libvirt.spec
@ -293,7 +293,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 10.10.0
|
Version: 10.10.0
|
||||||
Release: 2%{?dist}%{?extra_release}.alma.1
|
Release: 4%{?dist}%{?extra_release}.alma.1
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1
|
||||||
URL: https://libvirt.org/
|
URL: https://libvirt.org/
|
||||||
|
|
||||||
@ -329,6 +329,15 @@ Patch25: libvirt-cpu_map-Add-Opteron_G3-v1-CPU-model.patch
|
|||||||
Patch26: libvirt-cpu_map-Add-Opteron_G4-v1-CPU-model.patch
|
Patch26: libvirt-cpu_map-Add-Opteron_G4-v1-CPU-model.patch
|
||||||
Patch27: libvirt-cpu_map-Add-Opteron_G5-v1-CPU-model.patch
|
Patch27: libvirt-cpu_map-Add-Opteron_G5-v1-CPU-model.patch
|
||||||
Patch28: libvirt-cpu_map-Add-EPYC-Genoa-v1-CPU-model.patch
|
Patch28: libvirt-cpu_map-Add-EPYC-Genoa-v1-CPU-model.patch
|
||||||
|
Patch29: libvirt-qemu-Enable-I-O-APIC-even-more-frequently.patch
|
||||||
|
Patch30: libvirt-cpu_map-Add-avx10-CPU-features.patch
|
||||||
|
Patch31: libvirt-cpu_map-Add-GraniteRapids-v2-CPU-model.patch
|
||||||
|
Patch32: libvirt-cpu_map-Add-sha512-sm3-and-sm4-CPU-features.patch
|
||||||
|
Patch33: libvirt-conf-docs-Add-support-for-direct-and-extended-tlbflush-features.patch
|
||||||
|
Patch34: libvirt-qemu-Add-support-for-direct-and-extended-tlbflush-features.patch
|
||||||
|
Patch35: libvirt-conf-refactor-hyperv-features-formatting.patch
|
||||||
|
Patch36: libvirt-conf-Adjust-hyperv-tlbflush-formatting.patch
|
||||||
|
Patch37: libvirt-qemu_migration-Do-not-consider-post-copy-active-in-postcopy-recover.patch
|
||||||
|
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
@ -2654,9 +2663,22 @@ exit 0
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jan 08 2025 Eduard Abdullin <eabdullin@almalinux.org> - 10.10.0-2.alma.1
|
* Fri Jan 24 2025 Eduard Abdullin <eabdullin@almalinux.org> - 10.10.0-4.alma.1
|
||||||
- Enable building for ppc64le
|
- Enable building for ppc64le
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-4
|
||||||
|
- conf, docs: Add support for direct and extended tlbflush features (RHEL-73088)
|
||||||
|
- qemu: Add support for direct and extended tlbflush features (RHEL-73088)
|
||||||
|
- conf: refactor hyperv features formatting (RHEL-73088)
|
||||||
|
- conf: Adjust hyperv tlbflush formatting (RHEL-73088)
|
||||||
|
- qemu_migration: Do not consider post-copy active in postcopy-recover (RHEL-73699)
|
||||||
|
|
||||||
|
* Fri Dec 20 2024 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-3
|
||||||
|
- qemu: Enable I/O APIC even more frequently (RHEL-71414)
|
||||||
|
- cpu_map: Add avx10* CPU features (RHEL-71897)
|
||||||
|
- cpu_map: Add GraniteRapids-v2 CPU model (RHEL-71897)
|
||||||
|
- cpu_map: Add sha512, sm3, and sm4 CPU features (RHEL-71898)
|
||||||
|
|
||||||
* Tue Dec 17 2024 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-2
|
* Tue Dec 17 2024 Jiri Denemark <jdenemar@redhat.com> - 10.10.0-2
|
||||||
- util: Fix typo in virNetDevOpenvswitchInterfaceSetQos (RHEL-69840)
|
- util: Fix typo in virNetDevOpenvswitchInterfaceSetQos (RHEL-69840)
|
||||||
- qemu: tpm: do not update profile name for transient domains (RHEL-69774)
|
- qemu: tpm: do not update profile name for transient domains (RHEL-69774)
|
||||||
|
Loading…
Reference in New Issue
Block a user