Compare commits
No commits in common. "a9-ppc64le" and "c8-stream-rhel" have entirely different histories.
a9-ppc64le
...
c8-stream-
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/libvirt-10.0.0.tar.xz
|
||||
SOURCES/libvirt-8.0.0.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
7a2e402bfb1ad295544de6cd527c4c04e85c5096 SOURCES/libvirt-10.0.0.tar.xz
|
||||
e440412e9b45d7e24f0ef492d8edf5cf2cbd3f4c SOURCES/libvirt-8.0.0.tar.xz
|
||||
|
@ -1,78 +0,0 @@
|
||||
From 577c4ca414b26c8586f2586978e55c948bec0a32 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Mon, 11 Mar 2024 15:37:32 +0100
|
||||
Subject: [PATCH] conf: cpu: Introduce virCPUDefListFeatures
|
||||
|
||||
The function returns a list of explicitly mentioned features in the CPU
|
||||
definition.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
---
|
||||
src/conf/cpu_conf.c | 24 ++++++++++++++++++++++++
|
||||
src/conf/cpu_conf.h | 3 +++
|
||||
src/libvirt_private.syms | 1 +
|
||||
3 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
|
||||
index 6e6e1b9a897..4dca7e57ec7 100644
|
||||
--- a/src/conf/cpu_conf.c
|
||||
+++ b/src/conf/cpu_conf.c
|
||||
@@ -982,6 +982,30 @@ virCPUDefFindFeature(const virCPUDef *def,
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * virCPUDefListExplicitFeatures:
|
||||
+ * @def: CPU definition
|
||||
+ *
|
||||
+ * Provides a list of feature names explicitly mentioned in the CPU definition
|
||||
+ * regardless of the policy. The caller is responsible for freeing the list.
|
||||
+ *
|
||||
+ * Returns a NULL-terminated list of feature names.
|
||||
+ */
|
||||
+char **
|
||||
+virCPUDefListExplicitFeatures(const virCPUDef *def)
|
||||
+{
|
||||
+ char **list;
|
||||
+ size_t i;
|
||||
+
|
||||
+ list = g_new0(char *, def->nfeatures + 1);
|
||||
+
|
||||
+ for (i = 0; i < def->nfeatures; i++)
|
||||
+ list[i] = g_strdup(def->features[i].name);
|
||||
+
|
||||
+ return list;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int
|
||||
virCPUDefFilterFeatures(virCPUDef *cpu,
|
||||
virCPUDefFeatureFilter filter,
|
||||
diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h
|
||||
index 2694022fed1..b10c23ee828 100644
|
||||
--- a/src/conf/cpu_conf.h
|
||||
+++ b/src/conf/cpu_conf.h
|
||||
@@ -270,6 +270,9 @@ virCPUDefCheckFeatures(virCPUDef *cpu,
|
||||
void *opaque,
|
||||
char ***features);
|
||||
|
||||
+char **
|
||||
+virCPUDefListExplicitFeatures(const virCPUDef *def);
|
||||
+
|
||||
virCPUDef **
|
||||
virCPUDefListParse(const char **xmlCPUs,
|
||||
unsigned int ncpus,
|
||||
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
||||
index 98a925933ef..6b6bcc368ac 100644
|
||||
--- a/src/libvirt_private.syms
|
||||
+++ b/src/libvirt_private.syms
|
||||
@@ -111,6 +111,7 @@ virCPUDefFree;
|
||||
virCPUDefFreeFeatures;
|
||||
virCPUDefFreeModel;
|
||||
virCPUDefIsEqual;
|
||||
+virCPUDefListExplicitFeatures;
|
||||
virCPUDefListFree;
|
||||
virCPUDefListParse;
|
||||
virCPUDefNew;
|
@ -1,212 +0,0 @@
|
||||
From 5fbfa5ab8a3bf914d2deacd0d281b16aafd593b5 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:50:48 +0100
|
||||
Subject: [PATCH] cpu: x86: Add support for adding features to existing CPU
|
||||
models
|
||||
|
||||
This is not a good idea in general, but we can (and have to) do it in
|
||||
specific cases when a feature has always been part of a CPU model in
|
||||
hypervisor's definition, but we ignored it and did not include the
|
||||
feature in our definition.
|
||||
|
||||
Blindly adding the features to the CPU map and not adding them to
|
||||
existing CPU models breaks migration between old and new libvirt in both
|
||||
directions. New libvirt would complain the features got unexpectedly
|
||||
enabled (as they were not mentioned in the incoming domain XML) even
|
||||
though they were also enabled on the source and the old libvirt just
|
||||
didn't know about them. On the other hand, old libvirt would refuse to
|
||||
accept incoming migration of a domain started by new libvirt because the
|
||||
domain XML would contain CPU features unknown to the old libvirt.
|
||||
|
||||
This is exactly what happened when several vmx-* features were added a
|
||||
few releases back. Migration between libvirt releases before and after
|
||||
the addition is now broken.
|
||||
|
||||
This patch adds support for added these features to existing CPU models
|
||||
by marking them with added='yes'. The features will not be considered
|
||||
part of the CPU model and will be described explicitly via additional
|
||||
<feature/> elements, but the compatibility check will not complain if
|
||||
they are enabled by the hypervisor even though they were not explicitly
|
||||
mentioned in the CPU definition and incoming migration from old libvirt
|
||||
will succeed.
|
||||
|
||||
To fix outgoing migration to old libvirt, we also need to drop all those
|
||||
features from domain XML unless they were explicitly requested by the
|
||||
user. This will be handled by a later patch.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
---
|
||||
src/cpu/cpu_x86.c | 74 ++++++++++++++++++++++++++++++++++++++--
|
||||
src/cpu/cpu_x86.h | 3 ++
|
||||
src/libvirt_private.syms | 1 +
|
||||
3 files changed, 75 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||
index e8409ce616f..0fad761809c 100644
|
||||
--- a/src/cpu/cpu_x86.c
|
||||
+++ b/src/cpu/cpu_x86.c
|
||||
@@ -148,6 +148,17 @@ struct _virCPUx86Model {
|
||||
virCPUx86Signatures *signatures;
|
||||
virCPUx86Data data;
|
||||
GStrv removedFeatures;
|
||||
+
|
||||
+ /* Features added to the CPU model after its original version was released.
|
||||
+ * Such features are not really considered part of the model, but the
|
||||
+ * compatibility check will not complain if they are enabled by the
|
||||
+ * hypervisor even though they were not explicitly mentioned in the CPU
|
||||
+ * definition. This should only be used for features which were always
|
||||
+ * included in the CPU model by the hypervisor, but libvirt didn't support
|
||||
+ * them when introducing the CPU model. In other words, they were enabled,
|
||||
+ * but we ignored them.
|
||||
+ */
|
||||
+ GStrv addedFeatures;
|
||||
};
|
||||
|
||||
typedef struct _virCPUx86Map virCPUx86Map;
|
||||
@@ -1276,6 +1287,7 @@ x86ModelFree(virCPUx86Model *model)
|
||||
virCPUx86SignaturesFree(model->signatures);
|
||||
virCPUx86DataClear(&model->data);
|
||||
g_strfreev(model->removedFeatures);
|
||||
+ g_strfreev(model->addedFeatures);
|
||||
g_free(model);
|
||||
}
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUx86Model, x86ModelFree);
|
||||
@@ -1291,6 +1303,7 @@ x86ModelCopy(virCPUx86Model *model)
|
||||
copy->signatures = virCPUx86SignaturesCopy(model->signatures);
|
||||
x86DataCopy(©->data, &model->data);
|
||||
copy->removedFeatures = g_strdupv(model->removedFeatures);
|
||||
+ copy->addedFeatures = g_strdupv(model->addedFeatures);
|
||||
copy->vendor = model->vendor;
|
||||
|
||||
return g_steal_pointer(©);
|
||||
@@ -1596,17 +1609,20 @@ x86ModelParseFeatures(virCPUx86Model *model,
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
size_t i;
|
||||
size_t nremoved = 0;
|
||||
+ size_t nadded = 0;
|
||||
int n;
|
||||
|
||||
if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) <= 0)
|
||||
return n;
|
||||
|
||||
model->removedFeatures = g_new0(char *, n + 1);
|
||||
+ model->addedFeatures = g_new0(char *, n + 1);
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
g_autofree char *ftname = NULL;
|
||||
virCPUx86Feature *feature;
|
||||
virTristateBool rem;
|
||||
+ virTristateBool added;
|
||||
|
||||
if (!(ftname = virXMLPropString(nodes[i], "name"))) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
@@ -1632,10 +1648,21 @@ x86ModelParseFeatures(virCPUx86Model *model,
|
||||
continue;
|
||||
}
|
||||
|
||||
+ if (virXMLPropTristateBool(nodes[i], "added",
|
||||
+ VIR_XML_PROP_NONE,
|
||||
+ &added) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (added == VIR_TRISTATE_BOOL_YES) {
|
||||
+ model->addedFeatures[nadded++] = g_strdup(ftname);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
x86DataAdd(&model->data, &feature->data);
|
||||
}
|
||||
|
||||
model->removedFeatures = g_renew(char *, model->removedFeatures, nremoved + 1);
|
||||
+ model->addedFeatures = g_renew(char *, model->addedFeatures, nadded + 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3022,11 +3049,18 @@ virCPUx86UpdateLive(virCPUDef *cpu,
|
||||
if (expected == VIR_CPU_FEATURE_DISABLE &&
|
||||
x86DataIsSubset(&enabled, &feature->data)) {
|
||||
VIR_DEBUG("Feature '%s' enabled by the hypervisor", feature->name);
|
||||
- if (cpu->check == VIR_CPU_CHECK_FULL)
|
||||
+
|
||||
+ /* Extra features enabled by the hypervisor are ignored by
|
||||
+ * check='full' in case they were added to the model later for
|
||||
+ * backward compatibility with the older definition of the model.
|
||||
+ */
|
||||
+ if (cpu->check == VIR_CPU_CHECK_FULL &&
|
||||
+ !g_strv_contains((const char **) model->addedFeatures, feature->name)) {
|
||||
virBufferAsprintf(&bufAdded, "%s,", feature->name);
|
||||
- else if (virCPUDefUpdateFeature(cpu, feature->name,
|
||||
- VIR_CPU_FEATURE_REQUIRE) < 0)
|
||||
+ } else if (virCPUDefUpdateFeature(cpu, feature->name,
|
||||
+ VIR_CPU_FEATURE_REQUIRE) < 0) {
|
||||
return -1;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (x86DataIsSubset(&disabled, &feature->data) ||
|
||||
@@ -3491,6 +3525,40 @@ virCPUx86FeatureFilterDropMSR(const char *name,
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * virCPUx86GetAddedFeatures:
|
||||
+ * @modelName: CPU model
|
||||
+ * @features: where to store a pointer to the list of added features
|
||||
+ *
|
||||
+ * Gets a list of features added to a specified CPU model after its original
|
||||
+ * version was already released. The @features will be set to NULL if the list
|
||||
+ * is empty or it will point to internal structures and thus it must not be
|
||||
+ * freed or modified by the caller. The pointer is valid for the whole lifetime
|
||||
+ * of the process.
|
||||
+ *
|
||||
+ * Returns 0 on success, -1 otherwise.
|
||||
+ */
|
||||
+int
|
||||
+virCPUx86GetAddedFeatures(const char *modelName,
|
||||
+ const char * const **features)
|
||||
+{
|
||||
+ virCPUx86Map *map;
|
||||
+ virCPUx86Model *model;
|
||||
+
|
||||
+ if (!(map = virCPUx86GetMap()))
|
||||
+ return -1;
|
||||
+
|
||||
+ if (!(model = x86ModelFind(map, modelName))) {
|
||||
+ virReportError(VIR_ERR_INVALID_ARG,
|
||||
+ _("unknown CPU model %1$s"), modelName);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ *features = (const char **) model->addedFeatures;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
struct cpuArchDriver cpuDriverX86 = {
|
||||
.name = "x86",
|
||||
.arch = archs,
|
||||
diff --git a/src/cpu/cpu_x86.h b/src/cpu/cpu_x86.h
|
||||
index 2721fc90970..2cd965fea4c 100644
|
||||
--- a/src/cpu/cpu_x86.h
|
||||
+++ b/src/cpu/cpu_x86.h
|
||||
@@ -48,3 +48,6 @@ bool virCPUx86FeatureFilterSelectMSR(const char *name,
|
||||
bool virCPUx86FeatureFilterDropMSR(const char *name,
|
||||
virCPUFeaturePolicy policy,
|
||||
void *opaque);
|
||||
+
|
||||
+int virCPUx86GetAddedFeatures(const char *modelName,
|
||||
+ const char * const **features);
|
||||
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
||||
index 887659784a6..98a925933ef 100644
|
||||
--- a/src/libvirt_private.syms
|
||||
+++ b/src/libvirt_private.syms
|
||||
@@ -1543,6 +1543,7 @@ virCPUx86DataSetSignature;
|
||||
virCPUx86DataSetVendor;
|
||||
virCPUx86FeatureFilterDropMSR;
|
||||
virCPUx86FeatureFilterSelectMSR;
|
||||
+virCPUx86GetAddedFeatures;
|
||||
|
||||
# datatypes.h
|
||||
virConnectClass;
|
49
SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch
Normal file
49
SOURCES/libvirt-Add-VIR_MIGRATE_ZEROCOPY-flag.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 9c2fd182a02d64004e30900c52e3fcdb550de0bd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9c2fd182a02d64004e30900c52e3fcdb550de0bd@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 22 Jun 2022 16:35:50 +0200
|
||||
Subject: [PATCH] Add VIR_MIGRATE_ZEROCOPY flag
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The flag can be used to enable zero-copy mechanism for migrating memory
|
||||
pages.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 8744beecb36600e773c8a8c4823db2bf4b3e262d)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2089433
|
||||
|
||||
Conflicts:
|
||||
include/libvirt/libvirt-domain.h
|
||||
- post-copy recovery not backported
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
include/libvirt/libvirt-domain.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
|
||||
index 5f0a9b7572..792973ce2d 100644
|
||||
--- a/include/libvirt/libvirt-domain.h
|
||||
+++ b/include/libvirt/libvirt-domain.h
|
||||
@@ -860,6 +860,14 @@ typedef enum {
|
||||
*/
|
||||
VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES = (1 << 18),
|
||||
|
||||
+ /* Use zero-copy mechanism for migrating memory pages. For QEMU/KVM this
|
||||
+ * means QEMU will be temporarily allowed to lock all guest pages in host's
|
||||
+ * memory, although only those that are queued for transfer will be locked
|
||||
+ * at the same time.
|
||||
+ *
|
||||
+ * Since: 8.5.0
|
||||
+ */
|
||||
+ VIR_MIGRATE_ZEROCOPY = (1 << 20),
|
||||
} virDomainMigrateFlags;
|
||||
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,358 +0,0 @@
|
||||
From ce330dd7e5405573c77801a418345804049315ab Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:00:15 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Broadwell*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Broadwell-IBRS.xml | 75 ++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 75 ++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Broadwell-noTSX.xml | 75 ++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Broadwell.xml | 75 ++++++++++++++++++++++++
|
||||
4 files changed, 300 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Broadwell-IBRS.xml b/src/cpu_map/x86_Broadwell-IBRS.xml
|
||||
index 9033d5fcd51..14849032981 100644
|
||||
--- a/src/cpu_map/x86_Broadwell-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Broadwell-IBRS.xml
|
||||
@@ -59,6 +59,81 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
|
||||
index c044b60e36e..13f08435b76 100644
|
||||
--- a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
|
||||
@@ -57,6 +57,81 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Broadwell-noTSX.xml b/src/cpu_map/x86_Broadwell-noTSX.xml
|
||||
index 637f29ba1cf..4293b3aeee3 100644
|
||||
--- a/src/cpu_map/x86_Broadwell-noTSX.xml
|
||||
+++ b/src/cpu_map/x86_Broadwell-noTSX.xml
|
||||
@@ -56,6 +56,81 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Broadwell.xml b/src/cpu_map/x86_Broadwell.xml
|
||||
index 82939a45091..37dd1dabcfb 100644
|
||||
--- a/src/cpu_map/x86_Broadwell.xml
|
||||
+++ b/src/cpu_map/x86_Broadwell.xml
|
||||
@@ -58,6 +58,81 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
@ -1,184 +0,0 @@
|
||||
From 5db61952252fa2ab88cc79f064f8f1b61b6c95cb Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:01:25 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Cascadelake*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 76 ++++++++++++++++++++
|
||||
src/cpu_map/x86_Cascadelake-Server.xml | 74 +++++++++++++++++++
|
||||
2 files changed, 150 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
|
||||
index bfd4629836b..056f43d0887 100644
|
||||
--- a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
|
||||
+++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml
|
||||
@@ -70,6 +70,82 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Cascadelake-Server.xml b/src/cpu_map/x86_Cascadelake-Server.xml
|
||||
index 335e9cb5841..88e51c20678 100644
|
||||
--- a/src/cpu_map/x86_Cascadelake-Server.xml
|
||||
+++ b/src/cpu_map/x86_Cascadelake-Server.xml
|
||||
@@ -72,6 +72,80 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
@ -1,47 +0,0 @@
|
||||
From 9cb8c372cd75647e09fac96e6995adab5e8dde79 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:04:45 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Conroe
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Conroe.xml | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Conroe.xml b/src/cpu_map/x86_Conroe.xml
|
||||
index 4cacee6142e..955297ffc30 100644
|
||||
--- a/src/cpu_map/x86_Conroe.xml
|
||||
+++ b/src/cpu_map/x86_Conroe.xml
|
||||
@@ -31,5 +31,31 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,98 +0,0 @@
|
||||
From cbee851581fc82ea95d7b6309b85e22f9d1ba0d3 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:05:01 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Cooperlake
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Cooperlake.xml | 76 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 76 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Cooperlake.xml b/src/cpu_map/x86_Cooperlake.xml
|
||||
index ceca687334f..af428f2781c 100644
|
||||
--- a/src/cpu_map/x86_Cooperlake.xml
|
||||
+++ b/src/cpu_map/x86_Cooperlake.xml
|
||||
@@ -81,6 +81,82 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
@ -1,350 +0,0 @@
|
||||
From b44679c31f2d46e88ce655c03aef4c3e9ab621ac Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:01:50 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Haswell*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Haswell-IBRS.xml | 73 ++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Haswell-noTSX-IBRS.xml | 73 ++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Haswell-noTSX.xml | 73 ++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Haswell.xml | 73 ++++++++++++++++++++++++++
|
||||
4 files changed, 292 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Haswell-IBRS.xml b/src/cpu_map/x86_Haswell-IBRS.xml
|
||||
index 0ffe2bae0d4..57b980d14fe 100644
|
||||
--- a/src/cpu_map/x86_Haswell-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Haswell-IBRS.xml
|
||||
@@ -55,6 +55,79 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
|
||||
index 75d709c0098..fcae023ffb5 100644
|
||||
--- a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml
|
||||
@@ -53,6 +53,79 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Haswell-noTSX.xml b/src/cpu_map/x86_Haswell-noTSX.xml
|
||||
index b0a0faa856d..7404052065a 100644
|
||||
--- a/src/cpu_map/x86_Haswell-noTSX.xml
|
||||
+++ b/src/cpu_map/x86_Haswell-noTSX.xml
|
||||
@@ -52,6 +52,79 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_Haswell.xml b/src/cpu_map/x86_Haswell.xml
|
||||
index ee16b30f198..99986c5c45c 100644
|
||||
--- a/src/cpu_map/x86_Haswell.xml
|
||||
+++ b/src/cpu_map/x86_Haswell.xml
|
||||
@@ -54,6 +54,79 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
@ -1,183 +0,0 @@
|
||||
From a6f3eafc402fbaf18b2e23e93c8c7339317c7d97 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:02:47 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Icelake*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Icelake-Server-noTSX.xml | 77 ++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Icelake-Server.xml | 72 ++++++++++++++++++++++
|
||||
2 files changed, 149 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Icelake-Server-noTSX.xml
|
||||
index 7c9c32c9776..072f8145c42 100644
|
||||
--- a/src/cpu_map/x86_Icelake-Server-noTSX.xml
|
||||
+++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml
|
||||
@@ -80,6 +80,83 @@
|
||||
<feature name='umip'/>
|
||||
<feature name='vaes'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-5' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='vpclmulqdq'/>
|
||||
<feature name='wbnoinvd'/>
|
||||
<feature name='x2apic'/>
|
||||
diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-Server.xml
|
||||
index b4685bead05..3a35145d7f0 100644
|
||||
--- a/src/cpu_map/x86_Icelake-Server.xml
|
||||
+++ b/src/cpu_map/x86_Icelake-Server.xml
|
||||
@@ -82,6 +82,78 @@
|
||||
<feature name='umip'/>
|
||||
<feature name='vaes'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='vpclmulqdq'/>
|
||||
<feature name='wbnoinvd'/>
|
||||
<feature name='x2apic'/>
|
@ -1,168 +0,0 @@
|
||||
From 4b707f8bb0003b87f67474bfac02a2feac26c96f Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:04:01 +0100
|
||||
Subject: [PATCH] Add vmx-* features to IvyBridge*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_IvyBridge-IBRS.xml | 67 ++++++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_IvyBridge.xml | 67 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 134 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_IvyBridge-IBRS.xml b/src/cpu_map/x86_IvyBridge-IBRS.xml
|
||||
index 430bc3232db..27d85d86c4e 100644
|
||||
--- a/src/cpu_map/x86_IvyBridge-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_IvyBridge-IBRS.xml
|
||||
@@ -47,6 +47,73 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_IvyBridge.xml b/src/cpu_map/x86_IvyBridge.xml
|
||||
index eaf5d02e827..72031cfdc62 100644
|
||||
--- a/src/cpu_map/x86_IvyBridge.xml
|
||||
+++ b/src/cpu_map/x86_IvyBridge.xml
|
||||
@@ -46,6 +46,73 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
@ -1,154 +0,0 @@
|
||||
From a539910c942f5993b967f8265756e3a10363e4f4 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:04:21 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Nehalem*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Nehalem-IBRS.xml | 61 ++++++++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Nehalem.xml | 61 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 122 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Nehalem-IBRS.xml b/src/cpu_map/x86_Nehalem-IBRS.xml
|
||||
index 00d0d2fe51a..0cfee14c0f7 100644
|
||||
--- a/src/cpu_map/x86_Nehalem-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Nehalem-IBRS.xml
|
||||
@@ -38,5 +38,66 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
||||
diff --git a/src/cpu_map/x86_Nehalem.xml b/src/cpu_map/x86_Nehalem.xml
|
||||
index 9968001fe79..74ee64ce1c3 100644
|
||||
--- a/src/cpu_map/x86_Nehalem.xml
|
||||
+++ b/src/cpu_map/x86_Nehalem.xml
|
||||
@@ -37,5 +37,66 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,50 +0,0 @@
|
||||
From c6fadbb2807c80bd2b812eebd932eb4a34067ccd Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:05:20 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Penryn
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Penryn.xml | 29 +++++++++++++++++++++++++++++
|
||||
1 file changed, 29 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Penryn.xml b/src/cpu_map/x86_Penryn.xml
|
||||
index 29d4cd635b8..b31f96fa431 100644
|
||||
--- a/src/cpu_map/x86_Penryn.xml
|
||||
+++ b/src/cpu_map/x86_Penryn.xml
|
||||
@@ -33,5 +33,34 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,160 +0,0 @@
|
||||
From 29d492d6488e35db2e96a017ac3fb2712dcb638c Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:03:18 +0100
|
||||
Subject: [PATCH] Add vmx-* features to SandyBridge*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_SandyBridge-IBRS.xml | 63 ++++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_SandyBridge.xml | 63 ++++++++++++++++++++++++++++
|
||||
2 files changed, 126 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_SandyBridge-IBRS.xml b/src/cpu_map/x86_SandyBridge-IBRS.xml
|
||||
index fbdb4f2bf64..297eea8e882 100644
|
||||
--- a/src/cpu_map/x86_SandyBridge-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_SandyBridge-IBRS.xml
|
||||
@@ -41,6 +41,69 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
||||
diff --git a/src/cpu_map/x86_SandyBridge.xml b/src/cpu_map/x86_SandyBridge.xml
|
||||
index 7c85ed42df1..20ea378c471 100644
|
||||
--- a/src/cpu_map/x86_SandyBridge.xml
|
||||
+++ b/src/cpu_map/x86_SandyBridge.xml
|
||||
@@ -40,6 +40,69 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xsave'/>
|
||||
</model>
|
@ -1,99 +0,0 @@
|
||||
From e67004ec1cec850baa65177d88c6db09376869d3 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:05:34 +0100
|
||||
Subject: [PATCH] Add vmx-* features to SapphireRapids
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_SapphireRapids.xml | 77 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 77 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_SapphireRapids.xml b/src/cpu_map/x86_SapphireRapids.xml
|
||||
index 2297feeeca2..40164a47e2a 100644
|
||||
--- a/src/cpu_map/x86_SapphireRapids.xml
|
||||
+++ b/src/cpu_map/x86_SapphireRapids.xml
|
||||
@@ -103,6 +103,83 @@
|
||||
<feature name='umip'/>
|
||||
<feature name='vaes'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-5' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='vpclmulqdq'/>
|
||||
<feature name='wbnoinvd'/>
|
||||
<feature name='x2apic'/>
|
@ -1,520 +0,0 @@
|
||||
From aa064b38fdbafd39d296a0933b7d1b8987eb4cb5 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:00:53 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Skylake*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Skylake-Client-IBRS.xml | 71 +++++++++++++++++
|
||||
src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 72 ++++++++++++++++++
|
||||
src/cpu_map/x86_Skylake-Client.xml | 71 +++++++++++++++++
|
||||
src/cpu_map/x86_Skylake-Server-IBRS.xml | 74 ++++++++++++++++++
|
||||
src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 76 +++++++++++++++++++
|
||||
src/cpu_map/x86_Skylake-Server.xml | 74 ++++++++++++++++++
|
||||
6 files changed, 438 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Skylake-Client-IBRS.xml b/src/cpu_map/x86_Skylake-Client-IBRS.xml
|
||||
index 5709e7c2f95..1c77f9595b6 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Client-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Client-IBRS.xml
|
||||
@@ -67,6 +67,77 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
|
||||
index ffba34502a4..dca117028cd 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
|
||||
@@ -65,6 +65,78 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Skylake-Client.xml b/src/cpu_map/x86_Skylake-Client.xml
|
||||
index 14cd57e1768..68e5d2d0388 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Client.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Client.xml
|
||||
@@ -66,6 +66,77 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Skylake-Server-IBRS.xml b/src/cpu_map/x86_Skylake-Server-IBRS.xml
|
||||
index 9fb34888094..e467b76242b 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Server-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Server-IBRS.xml
|
||||
@@ -69,6 +69,80 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
|
||||
index c162c0acc31..b8601da0cbc 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
|
||||
@@ -67,6 +67,82 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
||||
diff --git a/src/cpu_map/x86_Skylake-Server.xml b/src/cpu_map/x86_Skylake-Server.xml
|
||||
index e022d94c847..cc1e9ddd7f7 100644
|
||||
--- a/src/cpu_map/x86_Skylake-Server.xml
|
||||
+++ b/src/cpu_map/x86_Skylake-Server.xml
|
||||
@@ -68,6 +68,80 @@
|
||||
<feature name='tsc'/>
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
@ -1,98 +0,0 @@
|
||||
From 64e3c1138a81b98f14e5f1aa1e8e2bb85cfdd1e5 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:05:53 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Snowridge
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Snowridge.xml | 76 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 76 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Snowridge.xml b/src/cpu_map/x86_Snowridge.xml
|
||||
index 383a24d367c..bc410bd8f80 100644
|
||||
--- a/src/cpu_map/x86_Snowridge.xml
|
||||
+++ b/src/cpu_map/x86_Snowridge.xml
|
||||
@@ -62,6 +62,82 @@
|
||||
<feature name='tsc-deadline'/>
|
||||
<feature name='umip'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-register' added='yes'/>
|
||||
+ <feature name='vmx-apicv-vid' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-eptad' added='yes'/>
|
||||
+ <feature name='vmx-eptp-switching' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invpcid-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-pml' added='yes'/>
|
||||
+ <feature name='vmx-posted-intr' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdrand-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdseed-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-shadow-vmcs' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vmfunc' added='yes'/>
|
||||
+ <feature name='vmx-vmwrite-vmexit-fields' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
+ <feature name='vmx-xsaves' added='yes'/>
|
||||
<feature name='x2apic'/>
|
||||
<feature name='xgetbv1'/>
|
||||
<feature name='xsave'/>
|
@ -1,158 +0,0 @@
|
||||
From 6898b7cd8d61d46db7e92f6cf81daf085b85f724 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:03:38 +0100
|
||||
Subject: [PATCH] Add vmx-* features to Westmere*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_Westmere-IBRS.xml | 63 +++++++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_Westmere.xml | 63 +++++++++++++++++++++++++++++++
|
||||
2 files changed, 126 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_Westmere-IBRS.xml b/src/cpu_map/x86_Westmere-IBRS.xml
|
||||
index c7898f0c226..a5abe8a1e18 100644
|
||||
--- a/src/cpu_map/x86_Westmere-IBRS.xml
|
||||
+++ b/src/cpu_map/x86_Westmere-IBRS.xml
|
||||
@@ -36,5 +36,68 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
||||
diff --git a/src/cpu_map/x86_Westmere.xml b/src/cpu_map/x86_Westmere.xml
|
||||
index 16e4ad6c309..161f1a078e3 100644
|
||||
--- a/src/cpu_map/x86_Westmere.xml
|
||||
+++ b/src/cpu_map/x86_Westmere.xml
|
||||
@@ -37,5 +37,68 @@
|
||||
<feature name='ssse3'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-x2apic' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr3-load-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr3-store-noexit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-desc-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-entry-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-entry-noload-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-ept' added='yes'/>
|
||||
+ <feature name='vmx-ept-1gb' added='yes'/>
|
||||
+ <feature name='vmx-ept-2mb' added='yes'/>
|
||||
+ <feature name='vmx-ept-execonly' added='yes'/>
|
||||
+ <feature name='vmx-ept-wb' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-load-perf-global-ctrl' added='yes'/>
|
||||
+ <feature name='vmx-exit-nosave-debugctl' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-efer' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-pat' added='yes'/>
|
||||
+ <feature name='vmx-exit-save-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invept' added='yes'/>
|
||||
+ <feature name='vmx-invept-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invept-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-invvpid' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-all-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-addr' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context' added='yes'/>
|
||||
+ <feature name='vmx-invvpid-single-context-noglobals' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mtf' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-page-walk-4' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-preemption-timer' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtscp-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-store-lma' added='yes'/>
|
||||
+ <feature name='vmx-true-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-unrestricted-guest' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
+ <feature name='vmx-vpid' added='yes'/>
|
||||
+ <feature name='vmx-wbinvd-exit' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,76 +0,0 @@
|
||||
From 823c7005a3b0d5275b30ca811479995bfa5820e9 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:06:13 +0100
|
||||
Subject: [PATCH] Add vmx-* features to core{,2}duo
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_core2duo.xml | 26 ++++++++++++++++++++++++++
|
||||
src/cpu_map/x86_coreduo.xml | 18 ++++++++++++++++++
|
||||
2 files changed, 44 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_core2duo.xml b/src/cpu_map/x86_core2duo.xml
|
||||
index 412039fe559..ea23a6c6629 100644
|
||||
--- a/src/cpu_map/x86_core2duo.xml
|
||||
+++ b/src/cpu_map/x86_core2duo.xml
|
||||
@@ -30,5 +30,31 @@
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-apicv-xapic' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-ins-outs' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-secondary-ctls' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
+ <feature name='vmx-vnmi' added='yes'/>
|
||||
+ <feature name='vmx-vnmi-pending' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
||||
diff --git a/src/cpu_map/x86_coreduo.xml b/src/cpu_map/x86_coreduo.xml
|
||||
index e2fda9a1d48..24900e637fa 100644
|
||||
--- a/src/cpu_map/x86_coreduo.xml
|
||||
+++ b/src/cpu_map/x86_coreduo.xml
|
||||
@@ -26,5 +26,23 @@
|
||||
<feature name='sse2'/>
|
||||
<feature name='tsc'/>
|
||||
<feature name='vme'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,70 +0,0 @@
|
||||
From 1d03f78c5d0fa2d3422e76bef4c9369ab623bd52 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 7 Mar 2024 14:06:37 +0100
|
||||
Subject: [PATCH] Add vmx-* features to kvm*
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_kvm32.xml | 18 ++++++++++++++++++
|
||||
src/cpu_map/x86_kvm64.xml | 20 ++++++++++++++++++++
|
||||
2 files changed, 38 insertions(+)
|
||||
|
||||
diff --git a/src/cpu_map/x86_kvm32.xml b/src/cpu_map/x86_kvm32.xml
|
||||
index 9dd96d5b569..ac28c53bd0b 100644
|
||||
--- a/src/cpu_map/x86_kvm32.xml
|
||||
+++ b/src/cpu_map/x86_kvm32.xml
|
||||
@@ -23,5 +23,23 @@
|
||||
<feature name='sse'/>
|
||||
<feature name='sse2'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-msr-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
||||
diff --git a/src/cpu_map/x86_kvm64.xml b/src/cpu_map/x86_kvm64.xml
|
||||
index 185af06f784..970a8e73d50 100644
|
||||
--- a/src/cpu_map/x86_kvm64.xml
|
||||
+++ b/src/cpu_map/x86_kvm64.xml
|
||||
@@ -27,5 +27,25 @@
|
||||
<feature name='sse2'/>
|
||||
<feature name='syscall'/>
|
||||
<feature name='tsc'/>
|
||||
+ <feature name='vmx-activity-hlt' added='yes'/>
|
||||
+ <feature name='vmx-cr8-load-exit' added='yes'/>
|
||||
+ <feature name='vmx-cr8-store-exit' added='yes'/>
|
||||
+ <feature name='vmx-entry-ia32e-mode' added='yes'/>
|
||||
+ <feature name='vmx-exit-ack-intr' added='yes'/>
|
||||
+ <feature name='vmx-flexpriority' added='yes'/>
|
||||
+ <feature name='vmx-hlt-exit' added='yes'/>
|
||||
+ <feature name='vmx-intr-exit' added='yes'/>
|
||||
+ <feature name='vmx-invlpg-exit' added='yes'/>
|
||||
+ <feature name='vmx-io-bitmap' added='yes'/>
|
||||
+ <feature name='vmx-io-exit' added='yes'/>
|
||||
+ <feature name='vmx-monitor-exit' added='yes'/>
|
||||
+ <feature name='vmx-movdr-exit' added='yes'/>
|
||||
+ <feature name='vmx-mwait-exit' added='yes'/>
|
||||
+ <feature name='vmx-nmi-exit' added='yes'/>
|
||||
+ <feature name='vmx-pause-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdpmc-exit' added='yes'/>
|
||||
+ <feature name='vmx-rdtsc-exit' added='yes'/>
|
||||
+ <feature name='vmx-tsc-offset' added='yes'/>
|
||||
+ <feature name='vmx-vintr-pending' added='yes'/>
|
||||
</model>
|
||||
</cpus>
|
@ -1,679 +0,0 @@
|
||||
From 9a31f486329e36bbe6f6156eb89d4d455fc0a7d8 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <9a31f486329e36bbe6f6156eb89d4d455fc0a7d8.1707394627.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 29 Jan 2024 15:50:27 +0100
|
||||
Subject: [PATCH] Don't overwrite error message from 'virXPathNodeSet'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
'virXPathNodeSet' returns -1 only when 'ctxt' or 'xpath' are NULL or
|
||||
when the 'xpath' string is invalid. Both are programming errors. It
|
||||
doesn't make sense for the code to overwrite the error message for
|
||||
anything supposedly more relevant.
|
||||
|
||||
The majority of calls to 'virXPathNodeSet' already didn't do this, so
|
||||
this patch fixes the rest to prevent it from spreading again.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit a9f76d6ab7278864150d9f4776750ea22d7ef508)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-22314 [9.4.0]
|
||||
---
|
||||
src/conf/domain_conf.c | 78 +++++++------------------------
|
||||
src/conf/network_conf.c | 80 ++++++++------------------------
|
||||
src/conf/node_device_conf.c | 17 ++-----
|
||||
src/conf/numa_conf.c | 15 +++---
|
||||
src/cpu/cpu_ppc64.c | 5 +-
|
||||
src/qemu/qemu_capabilities.c | 30 +++---------
|
||||
src/qemu/qemu_domain.c | 23 +++------
|
||||
src/qemu/qemu_migration_cookie.c | 5 +-
|
||||
src/qemu/qemu_nbdkit.c | 5 +-
|
||||
src/vz/vz_sdk.c | 5 +-
|
||||
10 files changed, 72 insertions(+), 191 deletions(-)
|
||||
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index ac06fa39f6..52a5796ad2 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -17765,11 +17765,8 @@ virDomainResctrlMonDefParse(virDomainDef *def,
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
- if ((n = virXPathNodeSet("./monitor", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Cannot extract monitor nodes"));
|
||||
+ if ((n = virXPathNodeSet("./monitor", ctxt, &nodes)) < 0)
|
||||
goto cleanup;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
domresmon = g_new0(virDomainResctrlMonDef, 1);
|
||||
@@ -17897,11 +17894,8 @@ virDomainCachetuneDefParse(virDomainDef *def,
|
||||
if (virBitmapIsAllClear(vcpus))
|
||||
return 0;
|
||||
|
||||
- if ((n = virXPathNodeSet("./cache", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Cannot extract cache nodes under cachetune"));
|
||||
+ if ((n = virXPathNodeSet("./cache", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (virDomainResctrlVcpuMatch(def, vcpus, &resctrl) < 0)
|
||||
return -1;
|
||||
@@ -18167,11 +18161,8 @@ virDomainDefParseMemory(virDomainDef *def,
|
||||
|
||||
if (virXPathNode("./memoryBacking/hugepages", ctxt)) {
|
||||
/* hugepages will be used */
|
||||
- if ((n = virXPathNodeSet("./memoryBacking/hugepages/page", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract hugepages nodes"));
|
||||
+ if ((n = virXPathNodeSet("./memoryBacking/hugepages/page", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n) {
|
||||
def->mem.hugepages = g_new0(virDomainHugePage, n);
|
||||
@@ -18255,11 +18246,8 @@ virDomainMemorytuneDefParse(virDomainDef *def,
|
||||
if (virBitmapIsAllClear(vcpus))
|
||||
return 0;
|
||||
|
||||
- if ((n = virXPathNodeSet("./node", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Cannot extract memory nodes under memorytune"));
|
||||
+ if ((n = virXPathNodeSet("./node", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (virDomainResctrlVcpuMatch(def, vcpus, &resctrl) < 0)
|
||||
return -1;
|
||||
@@ -18326,11 +18314,9 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
&def->blkio.weight) < 0)
|
||||
def->blkio.weight = 0;
|
||||
|
||||
- if ((n = virXPathNodeSet("./blkiotune/device", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("cannot extract blkiotune nodes"));
|
||||
+ if ((n = virXPathNodeSet("./blkiotune/device", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (n)
|
||||
def->blkio.devices = g_new0(virBlkioDevice, n);
|
||||
|
||||
@@ -18441,11 +18427,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/emulatorpin", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract emulatorpin nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/emulatorpin", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n) {
|
||||
if (n > 1) {
|
||||
@@ -18460,11 +18443,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
VIR_FREE(nodes);
|
||||
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/iothreadpin", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract iothreadpin nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/iothreadpin", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (virDomainIOThreadPinDefParseXML(nodes[i], def) < 0)
|
||||
@@ -18472,11 +18452,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/vcpusched", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract vcpusched nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/vcpusched", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (virDomainVcpuThreadSchedParse(nodes[i], def) < 0)
|
||||
@@ -18484,11 +18461,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/iothreadsched", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract iothreadsched nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/iothreadsched", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (virDomainIOThreadSchedParse(nodes[i], def) < 0)
|
||||
@@ -18496,11 +18470,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/emulatorsched", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract emulatorsched nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/emulatorsched", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n) {
|
||||
if (n > 1) {
|
||||
@@ -18514,11 +18485,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/cachetune", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract cachetune nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/cachetune", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (virDomainCachetuneDefParse(def, ctxt, nodes[i], flags) < 0)
|
||||
@@ -18526,11 +18494,8 @@ virDomainDefTunablesParse(virDomainDef *def,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./cputune/memorytune", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract memorytune nodes"));
|
||||
+ if ((n = virXPathNodeSet("./cputune/memorytune", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (virDomainMemorytuneDefParse(def, ctxt, nodes[i], flags) < 0)
|
||||
@@ -18834,11 +18799,8 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
!virDomainIOThreadIDArrayHasPin(def))
|
||||
def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO;
|
||||
|
||||
- if ((n = virXPathNodeSet("./resource", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("cannot extract resource nodes"));
|
||||
+ if ((n = virXPathNodeSet("./resource", ctxt, &nodes)) < 0)
|
||||
return NULL;
|
||||
- }
|
||||
|
||||
if (n > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
@@ -18886,11 +18848,9 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
return NULL;
|
||||
|
||||
/* analysis of the resource leases */
|
||||
- if ((n = virXPathNodeSet("./devices/lease", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("cannot extract device leases"));
|
||||
+ if ((n = virXPathNodeSet("./devices/lease", ctxt, &nodes)) < 0)
|
||||
return NULL;
|
||||
- }
|
||||
+
|
||||
if (n)
|
||||
def->leases = g_new0(virDomainLeaseDef *, n);
|
||||
for (i = 0; i < n; i++) {
|
||||
@@ -19009,11 +18969,9 @@ virDomainDefParseXML(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./devices/console", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("cannot extract console devices"));
|
||||
+ if ((n = virXPathNodeSet("./devices/console", ctxt, &nodes)) < 0)
|
||||
return NULL;
|
||||
- }
|
||||
+
|
||||
if (n)
|
||||
def->consoles = g_new0(virDomainChrDef *, n);
|
||||
|
||||
diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
|
||||
index 6f8a0d2d0b..52c90e53f8 100644
|
||||
--- a/src/conf/network_conf.c
|
||||
+++ b/src/conf/network_conf.c
|
||||
@@ -892,13 +892,9 @@ virNetworkDNSDefParseXML(const char *networkName,
|
||||
&def->forwardPlainNames) < 0)
|
||||
return -1;
|
||||
|
||||
- nfwds = virXPathNodeSet("./forwarder", ctxt, &fwdNodes);
|
||||
- if (nfwds < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <forwarder> element found in <dns> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nfwds = virXPathNodeSet("./forwarder", ctxt, &fwdNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (nfwds > 0) {
|
||||
def->forwarders = g_new0(virNetworkDNSForwarder, nfwds);
|
||||
|
||||
@@ -922,13 +918,9 @@ virNetworkDNSDefParseXML(const char *networkName,
|
||||
}
|
||||
}
|
||||
|
||||
- nhosts = virXPathNodeSet("./host", ctxt, &hostNodes);
|
||||
- if (nhosts < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <host> element found in <dns> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nhosts = virXPathNodeSet("./host", ctxt, &hostNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (nhosts > 0) {
|
||||
def->hosts = g_new0(virNetworkDNSHostDef, nhosts);
|
||||
|
||||
@@ -941,13 +933,9 @@ virNetworkDNSDefParseXML(const char *networkName,
|
||||
}
|
||||
}
|
||||
|
||||
- nsrvs = virXPathNodeSet("./srv", ctxt, &srvNodes);
|
||||
- if (nsrvs < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <srv> element found in <dns> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nsrvs = virXPathNodeSet("./srv", ctxt, &srvNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (nsrvs > 0) {
|
||||
def->srvs = g_new0(virNetworkDNSSrvDef, nsrvs);
|
||||
|
||||
@@ -960,13 +948,9 @@ virNetworkDNSDefParseXML(const char *networkName,
|
||||
}
|
||||
}
|
||||
|
||||
- ntxts = virXPathNodeSet("./txt", ctxt, &txtNodes);
|
||||
- if (ntxts < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <txt> element found in <dns> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((ntxts = virXPathNodeSet("./txt", ctxt, &txtNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (ntxts > 0) {
|
||||
def->txts = g_new0(virNetworkDNSTxtDef, ntxts);
|
||||
|
||||
@@ -1222,13 +1206,10 @@ virNetworkForwardNatDefParseXML(const char *networkName,
|
||||
return -1;
|
||||
|
||||
/* addresses for SNAT */
|
||||
- nNatAddrs = virXPathNodeSet("./address", ctxt, &natAddrNodes);
|
||||
- if (nNatAddrs < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <address> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nNatAddrs = virXPathNodeSet("./address", ctxt, &natAddrNodes)) < 0)
|
||||
return -1;
|
||||
- } else if (nNatAddrs > 1) {
|
||||
+
|
||||
+ if (nNatAddrs > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("Only one <address> element is allowed in <nat> in <forward> in network %1$s"),
|
||||
networkName);
|
||||
@@ -1284,13 +1265,10 @@ virNetworkForwardNatDefParseXML(const char *networkName,
|
||||
}
|
||||
|
||||
/* ports for SNAT and MASQUERADE */
|
||||
- nNatPorts = virXPathNodeSet("./port", ctxt, &natPortNodes);
|
||||
- if (nNatPorts < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <port> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nNatPorts = virXPathNodeSet("./port", ctxt, &natPortNodes)) < 0)
|
||||
return -1;
|
||||
- } else if (nNatPorts > 1) {
|
||||
+
|
||||
+ if (nNatPorts > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("Only one <port> element is allowed in <nat> in <forward> in network %1$s"),
|
||||
networkName);
|
||||
@@ -1358,37 +1336,19 @@ virNetworkForwardDefParseXML(const char *networkName,
|
||||
}
|
||||
|
||||
/* bridge and hostdev modes can use a pool of physical interfaces */
|
||||
- nForwardIfs = virXPathNodeSet("./interface", ctxt, &forwardIfNodes);
|
||||
- if (nForwardIfs < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <interface> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nForwardIfs = virXPathNodeSet("./interface", ctxt, &forwardIfNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
- nForwardAddrs = virXPathNodeSet("./address", ctxt, &forwardAddrNodes);
|
||||
- if (nForwardAddrs < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <address> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nForwardAddrs = virXPathNodeSet("./address", ctxt, &forwardAddrNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
- nForwardPfs = virXPathNodeSet("./pf", ctxt, &forwardPfNodes);
|
||||
- if (nForwardPfs < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <pf> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nForwardPfs = virXPathNodeSet("./pf", ctxt, &forwardPfNodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
- nForwardNats = virXPathNodeSet("./nat", ctxt, &forwardNatNodes);
|
||||
- if (nForwardNats < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("invalid <nat> element found in <forward> of network %1$s"),
|
||||
- networkName);
|
||||
+ if ((nForwardNats = virXPathNodeSet("./nat", ctxt, &forwardNatNodes)) < 0)
|
||||
return -1;
|
||||
- } else if (nForwardNats > 1) {
|
||||
+
|
||||
+ if (nForwardNats > 1) {
|
||||
virReportError(VIR_ERR_XML_ERROR,
|
||||
_("Only one <nat> element is allowed in <forward> of network %1$s"),
|
||||
networkName);
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index 95de77abe9..dd174d3020 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -960,11 +960,9 @@ virNodeDeviceCapVPDParseCustomFields(xmlXPathContextPtr ctxt, virPCIVPDResource
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
size_t i = 0;
|
||||
|
||||
- if ((nfields = virXPathNodeSet("./vendor_field[@index]", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("failed to evaluate <vendor_field> elements"));
|
||||
+ if ((nfields = virXPathNodeSet("./vendor_field[@index]", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
for (i = 0; i < nfields; i++) {
|
||||
g_autofree char *value = NULL;
|
||||
g_autofree char *index = NULL;
|
||||
@@ -989,11 +987,9 @@ virNodeDeviceCapVPDParseCustomFields(xmlXPathContextPtr ctxt, virPCIVPDResource
|
||||
VIR_FREE(nodes);
|
||||
|
||||
if (!readOnly) {
|
||||
- if ((nfields = virXPathNodeSet("./system_field[@index]", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("failed to evaluate <system_field> elements"));
|
||||
+ if ((nfields = virXPathNodeSet("./system_field[@index]", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
for (i = 0; i < nfields; i++) {
|
||||
g_autofree char *value = NULL;
|
||||
g_autofree char *index = NULL;
|
||||
@@ -1074,11 +1070,8 @@ virNodeDeviceCapVPDParseXML(xmlXPathContextPtr ctxt, virPCIVPDResource **res)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if ((nfields = virXPathNodeSet("./fields[@access]", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("no VPD <fields> elements with an access type attribute found"));
|
||||
+ if ((nfields = virXPathNodeSet("./fields[@access]", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < nfields; i++) {
|
||||
g_autofree char *access = NULL;
|
||||
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
|
||||
index bcd7838e00..d8120de6d2 100644
|
||||
--- a/src/conf/numa_conf.c
|
||||
+++ b/src/conf/numa_conf.c
|
||||
@@ -135,11 +135,8 @@ virDomainNumatuneNodeParseXML(virDomainNuma *numa,
|
||||
size_t i = 0;
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
|
||||
- if ((n = virXPathNodeSet("./numatune/memnode", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("Cannot extract memnode nodes"));
|
||||
+ if ((n = virXPathNodeSet("./numatune/memnode", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (!n)
|
||||
return 0;
|
||||
@@ -700,7 +697,10 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def,
|
||||
if (!virXPathNode("./distances[1]", ctxt))
|
||||
return 0;
|
||||
|
||||
- if ((sibling = virXPathNodeSet("./distances[1]/sibling", ctxt, &nodes)) <= 0) {
|
||||
+ if ((sibling = virXPathNodeSet("./distances[1]/sibling", ctxt, &nodes)) < 0)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ if (sibling == 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("NUMA distances defined without siblings"));
|
||||
goto cleanup;
|
||||
@@ -852,7 +852,10 @@ virDomainNumaDefParseXML(virDomainNuma *def,
|
||||
if (!virXPathNode("./cpu/numa[1]", ctxt))
|
||||
return 0;
|
||||
|
||||
- if ((n = virXPathNodeSet("./cpu/numa[1]/cell", ctxt, &cell)) <= 0) {
|
||||
+ if ((n = virXPathNodeSet("./cpu/numa[1]/cell", ctxt, &cell)) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (n == 0) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("NUMA topology defined without NUMA cells"));
|
||||
return -1;
|
||||
diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c
|
||||
index e13cdbdf6b..448a0a7d85 100644
|
||||
--- a/src/cpu/cpu_ppc64.c
|
||||
+++ b/src/cpu/cpu_ppc64.c
|
||||
@@ -334,7 +334,10 @@ ppc64ModelParse(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
- if ((n = virXPathNodeSet("./pvr", ctxt, &nodes)) <= 0) {
|
||||
+ if ((n = virXPathNodeSet("./pvr", ctxt, &nodes)) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (n == 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Missing PVR information for CPU model %1$s"),
|
||||
model->name);
|
||||
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||
index e13df2b27d..10090e0986 100644
|
||||
--- a/src/qemu/qemu_capabilities.c
|
||||
+++ b/src/qemu/qemu_capabilities.c
|
||||
@@ -4015,11 +4015,8 @@ virQEMUCapsLoadCPUModels(virArch arch,
|
||||
int n;
|
||||
xmlNodePtr node;
|
||||
|
||||
- if ((n = virXPathNodeSet(xpath, ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu capabilities cpus"));
|
||||
+ if ((n = virXPathNodeSet(xpath, ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n == 0)
|
||||
return 0;
|
||||
@@ -4057,11 +4054,8 @@ virQEMUCapsLoadCPUModels(virArch arch,
|
||||
nblockers = virXPathNodeSet("./blocker", ctxt, &blockerNodes);
|
||||
ctxt->node = node;
|
||||
|
||||
- if (nblockers < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse CPU blockers in QEMU capabilities"));
|
||||
+ if (nblockers < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (nblockers > 0) {
|
||||
size_t j;
|
||||
@@ -4100,11 +4094,8 @@ virQEMUCapsLoadMachines(virQEMUCapsAccel *caps,
|
||||
size_t i;
|
||||
int n;
|
||||
|
||||
- if ((n = virXPathNodeSet(xpath, ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu capabilities machines"));
|
||||
+ if ((n = virXPathNodeSet(xpath, ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n == 0)
|
||||
return 0;
|
||||
@@ -4317,11 +4308,8 @@ virQEMUCapsParseSGXInfo(virQEMUCaps *qemuCaps,
|
||||
ctxt->node = sgxSections;
|
||||
nSgxSections = virXPathNodeSet("./section", ctxt, §ionNodes);
|
||||
|
||||
- if (nSgxSections < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse SGX sections in QEMU capabilities cache"));
|
||||
+ if (nSgxSections < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
sgx->nSgxSections = nSgxSections;
|
||||
sgx->sgxSections = g_new0(virSGXSection, nSgxSections);
|
||||
@@ -4404,11 +4392,8 @@ virQEMUCapsParseFlags(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
|
||||
size_t i;
|
||||
int n;
|
||||
|
||||
- if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu capabilities flags"));
|
||||
+ if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
VIR_DEBUG("Got flags %d", n);
|
||||
for (i = 0; i < n; i++) {
|
||||
@@ -4442,11 +4427,8 @@ virQEMUCapsParseGIC(virQEMUCaps *qemuCaps, xmlXPathContextPtr ctxt)
|
||||
size_t i;
|
||||
int n;
|
||||
|
||||
- if ((n = virXPathNodeSet("./gic", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu capabilities gic"));
|
||||
+ if ((n = virXPathNodeSet("./gic", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
if (n > 0) {
|
||||
unsigned int uintValue;
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index e2a1bf2c13..97520bb49c 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -3155,11 +3155,8 @@ qemuDomainObjPrivateXMLParseSlirpFeatures(xmlNodePtr featuresNode,
|
||||
|
||||
ctxt->node = featuresNode;
|
||||
|
||||
- if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("failed to parse slirp-helper features"));
|
||||
+ if ((n = virXPathNodeSet("./feature", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
g_autofree char *str = virXMLPropString(nodes[i], "name");
|
||||
@@ -3273,11 +3270,9 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./qemuCaps/flag", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("failed to parse qemu capabilities flags"));
|
||||
+ if ((n = virXPathNodeSet("./qemuCaps/flag", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (n > 0) {
|
||||
qemuCaps = virQEMUCapsNew();
|
||||
|
||||
@@ -3305,11 +3300,9 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
||||
|
||||
priv->fakeReboot = virXPathBoolean("boolean(./fakereboot)", ctxt) == 1;
|
||||
|
||||
- if ((n = virXPathNodeSet("./devices/device", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu device list"));
|
||||
+ if ((n = virXPathNodeSet("./devices/device", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
if (n > 0) {
|
||||
/* NULL-terminated list */
|
||||
priv->qemuDevices = g_new0(char *, n + 1);
|
||||
@@ -3325,11 +3318,9 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
- if ((n = virXPathNodeSet("./slirp/helper", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse slirp helper list"));
|
||||
+ if ((n = virXPathNodeSet("./slirp/helper", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
+
|
||||
for (i = 0; i < n; i++) {
|
||||
g_autofree char *alias = virXMLPropString(nodes[i], "alias");
|
||||
g_autofree char *pid = virXMLPropString(nodes[i], "pid");
|
||||
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
|
||||
index 5505fdaf22..4361949cca 100644
|
||||
--- a/src/qemu/qemu_migration_cookie.c
|
||||
+++ b/src/qemu/qemu_migration_cookie.c
|
||||
@@ -947,11 +947,8 @@ qemuMigrationCookieNetworkXMLParse(xmlXPathContextPtr ctxt)
|
||||
g_autofree xmlNodePtr *interfaces = NULL;
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
|
||||
- if ((n = virXPathNodeSet("./network/interface", ctxt, &interfaces)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- "%s", _("missing interface information"));
|
||||
+ if ((n = virXPathNodeSet("./network/interface", ctxt, &interfaces)) < 0)
|
||||
return NULL;
|
||||
- }
|
||||
|
||||
optr->nnets = n;
|
||||
optr->net = g_new0(qemuMigrationCookieNetData, optr->nnets);
|
||||
diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
|
||||
index 85e61be44c..3343241aaf 100644
|
||||
--- a/src/qemu/qemu_nbdkit.c
|
||||
+++ b/src/qemu/qemu_nbdkit.c
|
||||
@@ -400,11 +400,8 @@ qemuNbdkitCapsParseFlags(qemuNbdkitCaps *nbdkitCaps,
|
||||
size_t i;
|
||||
int n;
|
||||
|
||||
- if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("failed to parse qemu capabilities flags"));
|
||||
+ if ((n = virXPathNodeSet("./flag", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
VIR_DEBUG("Got flags %d", n);
|
||||
for (i = 0; i < n; i++) {
|
||||
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
|
||||
index 6a15d60577..ce4586a3f5 100644
|
||||
--- a/src/vz/vz_sdk.c
|
||||
+++ b/src/vz/vz_sdk.c
|
||||
@@ -4612,11 +4612,8 @@ prlsdkParseSnapshotTree(const char *treexml)
|
||||
"ParallelsSavedStates", &ctxt, NULL, false)))
|
||||
goto cleanup;
|
||||
|
||||
- if ((n = virXPathNodeSet("//SavedStateItem", ctxt, &nodes)) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("cannot extract snapshot nodes"));
|
||||
+ if ((n = virXPathNodeSet("//SavedStateItem", ctxt, &nodes)) < 0)
|
||||
goto cleanup;
|
||||
- }
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
if (nodes[i]->parent == xmlDocGetRootElement(xml))
|
||||
--
|
||||
2.43.0
|
@ -1,46 +0,0 @@
|
||||
From 68f2278d84fe560123c2ec34275380ed1086b706 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <68f2278d84fe560123c2ec34275380ed1086b706.1713796876.git.jdenemar@redhat.com>
|
||||
From: Martin Kletzander <mkletzan@redhat.com>
|
||||
Date: Tue, 27 Feb 2024 16:20:12 +0100
|
||||
Subject: [PATCH] Fix off-by-one error in udevListInterfacesByStatus
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Ever since this function was introduced in 2012 it could've tried
|
||||
filling in an extra interface name. That was made worse in 2019 when
|
||||
the caller functions started accepting NULL arrays of size 0.
|
||||
|
||||
This is assigned CVE-2024-1441.
|
||||
|
||||
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
Reported-by: Alexander Kuznetsov <kuznetsovam@altlinux.org>
|
||||
Fixes: 5a33366f5c0b18c93d161bd144f9f079de4ac8ca
|
||||
Fixes: d6064e2759a24e0802f363e3a810dc5a7d7ebb15
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit c664015fe3a7bf59db26686e9ed69af011c6ebb8)
|
||||
|
||||
Conflicts:
|
||||
- NEWS.rst: Removed the hunk
|
||||
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-25081
|
||||
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
---
|
||||
src/interface/interface_backend_udev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
|
||||
index fb6799ed94..4091483060 100644
|
||||
--- a/src/interface/interface_backend_udev.c
|
||||
+++ b/src/interface/interface_backend_udev.c
|
||||
@@ -222,7 +222,7 @@ udevListInterfacesByStatus(virConnectPtr conn,
|
||||
g_autoptr(virInterfaceDef) def = NULL;
|
||||
|
||||
/* Ensure we won't exceed the size of our array */
|
||||
- if (count > names_len)
|
||||
+ if (count >= names_len)
|
||||
break;
|
||||
|
||||
path = udev_list_entry_get_name(dev_entry);
|
||||
--
|
||||
2.44.0
|
@ -0,0 +1,47 @@
|
||||
From f0d0a6a9701522eee013682eb0ef566ef7cdac61 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f0d0a6a9701522eee013682eb0ef566ef7cdac61@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Mon, 22 Feb 2016 12:51:51 +0100
|
||||
Subject: [PATCH] RHEL: Add rhel machine types to qemuDomainMachineNeedsFDC
|
||||
|
||||
RHEL-only.
|
||||
|
||||
pc-q35-rhel7.0.0 and pc-q35-rhel7.1.0 do not need an explicit
|
||||
isa-fdc controller.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1227880
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_domain.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index a8401bac30..40fe9985e6 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -8767,8 +8767,19 @@ qemuDomainHasBuiltinIDE(const virDomainDef *def)
|
||||
bool
|
||||
qemuDomainNeedsFDC(const virDomainDef *def)
|
||||
{
|
||||
- /* all supported Q35 machines need explicit FDC */
|
||||
- return qemuDomainIsQ35(def);
|
||||
+ const char *p;
|
||||
+
|
||||
+ /* all supported Q35 machines need explicit FDC except for old RHEL-7
|
||||
+ * machine types */
|
||||
+ if (!qemuDomainIsQ35(def))
|
||||
+ return false;
|
||||
+
|
||||
+ if ((p = STRSKIP(def->os.machine, "pc-q35-")) &&
|
||||
+ (STRPREFIX(p, "rhel7.0.0") ||
|
||||
+ STRPREFIX(p, "rhel7.1.0")))
|
||||
+ return false;
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
257
SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch
Normal file
257
SOURCES/libvirt-RHEL-Enable-usage-of-x-blockdev-reopen.patch
Normal file
@ -0,0 +1,257 @@
|
||||
From b2529d5ff3a18a2b0022da75431cea5bf037819e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b2529d5ff3a18a2b0022da75431cea5bf037819e@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 28 Jul 2021 17:37:21 +0200
|
||||
Subject: [PATCH] RHEL: Enable usage of x-blockdev-reopen
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
RHEL-only
|
||||
|
||||
Introduce a new capability QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API
|
||||
based on the presence of '__com.redhat_rhel-av-8_2_0-api' feature for
|
||||
'x-blockdev-reopen' which states that reopen works for what libvirt
|
||||
is going to use it and wire up code to call the x- prefixed command.
|
||||
|
||||
This implementation will become dormant once qemu starts supporting
|
||||
upstream-stable blockdev-reopen.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1799013
|
||||
|
||||
Starting with libvirt-7.6, upstream has adapted to the new format of
|
||||
arguments so this patch was modified to support blockdev-reopen which
|
||||
takes an array of nodes to reopen.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1929765
|
||||
Message-Id: <3fcde2fc6add36d5276ae224caf18adc8bca7d48.1627486352.git.pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_block.c | 24 +++++++++++++++---------
|
||||
src/qemu/qemu_block.h | 3 ++-
|
||||
src/qemu/qemu_capabilities.c | 13 +++++++++++++
|
||||
src/qemu/qemu_capabilities.h | 3 +++
|
||||
src/qemu/qemu_monitor.c | 5 +++--
|
||||
src/qemu/qemu_monitor.h | 3 ++-
|
||||
src/qemu/qemu_monitor_json.c | 12 +++++++++---
|
||||
src/qemu/qemu_monitor_json.h | 3 ++-
|
||||
tests/qemumonitorjsontest.c | 2 +-
|
||||
9 files changed, 50 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
||||
index e5ff653a60..aa566d0097 100644
|
||||
--- a/src/qemu/qemu_block.c
|
||||
+++ b/src/qemu/qemu_block.c
|
||||
@@ -3331,7 +3331,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc,
|
||||
|
||||
int
|
||||
qemuBlockReopenFormatMon(qemuMonitor *mon,
|
||||
- virStorageSource *src)
|
||||
+ virStorageSource *src,
|
||||
+ bool downstream)
|
||||
{
|
||||
g_autoptr(virJSONValue) reopenprops = NULL;
|
||||
g_autoptr(virJSONValue) srcprops = NULL;
|
||||
@@ -3340,15 +3341,19 @@ qemuBlockReopenFormatMon(qemuMonitor *mon,
|
||||
if (!(srcprops = qemuBlockStorageSourceGetBlockdevProps(src, src->backingStore)))
|
||||
return -1;
|
||||
|
||||
- if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0)
|
||||
- return -1;
|
||||
+ if (downstream) {
|
||||
+ reopenprops = g_steal_pointer(&srcprops);
|
||||
+ } else {
|
||||
+ if (virJSONValueArrayAppend(reopenoptions, &srcprops) < 0)
|
||||
+ return -1;
|
||||
|
||||
- if (virJSONValueObjectAdd(&reopenprops,
|
||||
- "a:options", &reopenoptions,
|
||||
- NULL) < 0)
|
||||
- return -1;
|
||||
+ if (virJSONValueObjectAdd(&reopenprops,
|
||||
+ "a:options", &reopenoptions,
|
||||
+ NULL) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
- if (qemuMonitorBlockdevReopen(mon, &reopenprops) < 0)
|
||||
+ if (qemuMonitorBlockdevReopen(mon, &reopenprops, downstream) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@@ -3372,6 +3377,7 @@ qemuBlockReopenFormat(virDomainObj *vm,
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
virQEMUDriver *driver = priv->driver;
|
||||
+ bool downstream = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API);
|
||||
int rc;
|
||||
|
||||
/* If we are lacking the object here, qemu might have opened an image with
|
||||
@@ -3385,7 +3391,7 @@ qemuBlockReopenFormat(virDomainObj *vm,
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||
return -1;
|
||||
|
||||
- rc = qemuBlockReopenFormatMon(priv->mon, src);
|
||||
+ rc = qemuBlockReopenFormatMon(priv->mon, src, downstream);
|
||||
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
if (rc < 0)
|
||||
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
|
||||
index 184a549d5c..130cfcdefd 100644
|
||||
--- a/src/qemu/qemu_block.h
|
||||
+++ b/src/qemu/qemu_block.h
|
||||
@@ -267,7 +267,8 @@ qemuBlockBitmapsHandleCommitFinish(virStorageSource *topsrc,
|
||||
/* only for use in qemumonitorjsontest */
|
||||
int
|
||||
qemuBlockReopenFormatMon(qemuMonitor *mon,
|
||||
- virStorageSource *src);
|
||||
+ virStorageSource *src,
|
||||
+ bool downstream);
|
||||
|
||||
int
|
||||
qemuBlockReopenReadWrite(virDomainObj *vm,
|
||||
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||
index 5f1eb5014c..8ae80ef8d7 100644
|
||||
--- a/src/qemu/qemu_capabilities.c
|
||||
+++ b/src/qemu/qemu_capabilities.c
|
||||
@@ -654,6 +654,9 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
||||
"rbd-encryption", /* QEMU_CAPS_RBD_ENCRYPTION */
|
||||
"sev-guest-kernel-hashes", /* QEMU_CAPS_SEV_GUEST_KERNEL_HASHES */
|
||||
"sev-inject-launch-secret", /* QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET */
|
||||
+
|
||||
+ /* 420 */
|
||||
+ "blockdev-reopen.__com.redhat_rhel-av-8_2_0-api", /* QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API */
|
||||
);
|
||||
|
||||
|
||||
@@ -1540,6 +1543,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVhostUserFS[] =
|
||||
/* see documentation for virQEMUQAPISchemaPathGet for the query format */
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
|
||||
{ "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT },
|
||||
+ { "x-blockdev-reopen/$__com.redhat_rhel-av-8_2_0-api", QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API },
|
||||
{ "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
|
||||
{ "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
|
||||
{ "blockdev-add/arg-type/+vxhs", QEMU_CAPS_VXHS},
|
||||
@@ -5235,6 +5239,15 @@ virQEMUCapsInitProcessCaps(virQEMUCaps *qemuCaps)
|
||||
qemuCaps->arch == VIR_ARCH_MIPS)
|
||||
virQEMUCapsSet(qemuCaps, QEMU_CAPS_SCSI_NCR53C90);
|
||||
|
||||
+ /* RHEL-only:
|
||||
+ * - if upstream blockdev-reopen is enabled, clear the downstream flag
|
||||
+ * - if the downstream flag is present but not the upstream, assert the upstream flag too
|
||||
+ */
|
||||
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN))
|
||||
+ virQEMUCapsClear(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API);
|
||||
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API))
|
||||
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV_REOPEN);
|
||||
+
|
||||
virQEMUCapsInitProcessCapsInterlock(qemuCaps);
|
||||
}
|
||||
|
||||
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
||||
index e3a3ab4445..cde6c18b4c 100644
|
||||
--- a/src/qemu/qemu_capabilities.h
|
||||
+++ b/src/qemu/qemu_capabilities.h
|
||||
@@ -634,6 +634,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||
QEMU_CAPS_SEV_GUEST_KERNEL_HASHES, /* sev-guest.kernel-hashes= */
|
||||
QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET, /* 'sev-inject-launch-secret' qmp command present */
|
||||
|
||||
+ /* 420 */
|
||||
+ QEMU_CAPS_BLOCKDEV_REOPEN_COM_REDHAT_AV_8_2_0_API, /* downstream support for blockdev reopen in rhel-av-8.2.0 */
|
||||
+
|
||||
QEMU_CAPS_LAST /* this must always be the last item */
|
||||
} virQEMUCapsFlags;
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
|
||||
index babf9e62fb..23638d3fe8 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -4247,14 +4247,15 @@ qemuMonitorBlockdevAdd(qemuMonitor *mon,
|
||||
|
||||
int
|
||||
qemuMonitorBlockdevReopen(qemuMonitor *mon,
|
||||
- virJSONValue **props)
|
||||
+ virJSONValue **props,
|
||||
+ bool downstream)
|
||||
{
|
||||
VIR_DEBUG("props=%p (node-name=%s)", *props,
|
||||
NULLSTR(virJSONValueObjectGetString(*props, "node-name")));
|
||||
|
||||
QEMU_CHECK_MONITOR(mon);
|
||||
|
||||
- return qemuMonitorJSONBlockdevReopen(mon, props);
|
||||
+ return qemuMonitorJSONBlockdevReopen(mon, props, downstream);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
|
||||
index 9b2e4e1421..d2037914be 100644
|
||||
--- a/src/qemu/qemu_monitor.h
|
||||
+++ b/src/qemu/qemu_monitor.h
|
||||
@@ -1426,7 +1426,8 @@ int qemuMonitorBlockdevAdd(qemuMonitor *mon,
|
||||
virJSONValue **props);
|
||||
|
||||
int qemuMonitorBlockdevReopen(qemuMonitor *mon,
|
||||
- virJSONValue **props);
|
||||
+ virJSONValue **props,
|
||||
+ bool downstream);
|
||||
|
||||
int qemuMonitorBlockdevDel(qemuMonitor *mon,
|
||||
const char *nodename);
|
||||
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
|
||||
index b0b513683b..34a46b9b41 100644
|
||||
--- a/src/qemu/qemu_monitor_json.c
|
||||
+++ b/src/qemu/qemu_monitor_json.c
|
||||
@@ -8051,13 +8051,19 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon,
|
||||
|
||||
int
|
||||
qemuMonitorJSONBlockdevReopen(qemuMonitor *mon,
|
||||
- virJSONValue **props)
|
||||
+ virJSONValue **props,
|
||||
+ bool downstream)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
|
||||
- if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props)))
|
||||
- return -1;
|
||||
+ if (downstream) {
|
||||
+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("x-blockdev-reopen", props)))
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ if (!(cmd = qemuMonitorJSONMakeCommandInternal("blockdev-reopen", props)))
|
||||
+ return -1;
|
||||
+ }
|
||||
|
||||
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
|
||||
return -1;
|
||||
diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h
|
||||
index 64d9ebdaa3..15ce03d7af 100644
|
||||
--- a/src/qemu/qemu_monitor_json.h
|
||||
+++ b/src/qemu/qemu_monitor_json.h
|
||||
@@ -748,7 +748,8 @@ qemuMonitorJSONBlockdevAdd(qemuMonitor *mon,
|
||||
|
||||
int
|
||||
qemuMonitorJSONBlockdevReopen(qemuMonitor *mon,
|
||||
- virJSONValue **props)
|
||||
+ virJSONValue **props,
|
||||
+ bool downstream)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int
|
||||
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
|
||||
index 48e2a457ab..8624a547b5 100644
|
||||
--- a/tests/qemumonitorjsontest.c
|
||||
+++ b/tests/qemumonitorjsontest.c
|
||||
@@ -2780,7 +2780,7 @@ testQemuMonitorJSONBlockdevReopen(const void *opaque)
|
||||
if (qemuMonitorTestAddItem(test, "blockdev-reopen", "{\"return\":{}}") < 0)
|
||||
return -1;
|
||||
|
||||
- if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src) < 0)
|
||||
+ if (qemuBlockReopenFormatMon(qemuMonitorTestGetMonitor(test), src, false) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
--
|
||||
2.34.1
|
||||
|
46
SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Normal file
46
SOURCES/libvirt-RHEL-Fix-virConnectGetMaxVcpus-output.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <29eb7b77805cf5fb756c964cdbe7fb7fb2c01f5f@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Mon, 27 Aug 2018 13:09:38 +0200
|
||||
Subject: [PATCH] RHEL: Fix virConnectGetMaxVcpus output
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1092363
|
||||
|
||||
RHEL-only.
|
||||
|
||||
Ignore the maximum vcpu limit (KVM_CAP_MAX_VCPUS) on RHEL,
|
||||
since RHEL QEMU treats the recommended limit (KVM_CAP_NR_VCPUS)
|
||||
as the maximum, see:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=998708
|
||||
|
||||
(cherry picked from commit 7dff909fa34bdd93ad200dbffe70c0c1ee931925)
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
|
||||
https: //bugzilla.redhat.com/show_bug.cgi?id=1582222
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/util/virhostcpu.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
|
||||
index a07c00a0e9..35f41daef2 100644
|
||||
--- a/src/util/virhostcpu.c
|
||||
+++ b/src/util/virhostcpu.c
|
||||
@@ -1166,6 +1166,11 @@ virHostCPUGetKVMMaxVCPUs(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+/* Ignore KVM_CAP_MAX_VCPUS on RHEL - the recommended maximum
|
||||
+ * is treated as a hard limit.
|
||||
+ */
|
||||
+# undef KVM_CAP_MAX_VCPUS
|
||||
+
|
||||
# ifdef KVM_CAP_MAX_VCPUS
|
||||
/* at first try KVM_CAP_MAX_VCPUS to determine the maximum count */
|
||||
if ((ret = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_MAX_VCPUS)) > 0)
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,185 @@
|
||||
From 1d93a3944a200b7c955800faa598e0e11da098f8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1d93a3944a200b7c955800faa598e0e11da098f8@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Fri, 27 Mar 2015 12:48:40 +0100
|
||||
Subject: [PATCH] RHEL: Hack around changed Broadwell/Haswell CPUs
|
||||
|
||||
RHEL-only
|
||||
|
||||
Upstream tried to solve the change of Broadwell and Haswell CPUs by
|
||||
removing rtm and hle features from the corresponding CPU models for new
|
||||
machine types. Then they reverted this and introduced new *-noTSX models
|
||||
instead. However, the original fix was backported to RHEL.
|
||||
|
||||
This patch makes sure Broadwell and Haswell will always contain rtm and
|
||||
hle features regardless on RHEL version or machine type used.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1199446
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_command.c | 22 +++++++++++++++++++
|
||||
tests/qemuxml2argvdata/cpu-Haswell.args | 2 +-
|
||||
.../qemuxml2argvdata/cpu-host-model-cmt.args | 2 +-
|
||||
.../cpu-translation.x86_64-4.0.0.args | 2 +-
|
||||
.../cpu-translation.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-tsc-frequency.args | 2 +-
|
||||
tests/qemuxml2argvdata/q35-acpi-nouefi.args | 2 +-
|
||||
tests/qemuxml2argvdata/q35-acpi-uefi.args | 2 +-
|
||||
tests/qemuxml2argvdata/q35-noacpi-nouefi.args | 2 +-
|
||||
9 files changed, 30 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||
index d822533ccb..6b4647a711 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -6521,6 +6521,8 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver,
|
||||
{
|
||||
size_t i;
|
||||
virCPUDef *cpu = def->cpu;
|
||||
+ bool hle = false;
|
||||
+ bool rtm = false;
|
||||
|
||||
switch ((virCPUMode) cpu->mode) {
|
||||
case VIR_CPU_MODE_HOST_PASSTHROUGH:
|
||||
@@ -6587,6 +6589,12 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver,
|
||||
for (i = 0; i < cpu->nfeatures; i++) {
|
||||
const char *featname =
|
||||
virQEMUCapsCPUFeatureToQEMU(qemuCaps, cpu->features[i].name);
|
||||
+
|
||||
+ if (STREQ("rtm", cpu->features[i].name))
|
||||
+ rtm = true;
|
||||
+ if (STREQ("hle", cpu->features[i].name))
|
||||
+ hle = true;
|
||||
+
|
||||
switch ((virCPUFeaturePolicy) cpu->features[i].policy) {
|
||||
case VIR_CPU_FEATURE_FORCE:
|
||||
case VIR_CPU_FEATURE_REQUIRE:
|
||||
@@ -6604,6 +6612,20 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver,
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Some versions of qemu-kvm in RHEL provide Broadwell and Haswell CPU
|
||||
+ * models which lack rtm and hle features when used with some machine
|
||||
+ * types. Let's make sure Broadwell and Haswell will always have these
|
||||
+ * features. But only if the features were not explicitly mentioned in
|
||||
+ * the guest CPU definition.
|
||||
+ */
|
||||
+ if (STREQ_NULLABLE(cpu->model, "Broadwell") ||
|
||||
+ STREQ_NULLABLE(cpu->model, "Haswell")) {
|
||||
+ if (!rtm)
|
||||
+ virBufferAddLit(buf, ",rtm=on");
|
||||
+ if (!hle)
|
||||
+ virBufferAddLit(buf, ",hle=on");
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-Haswell.args b/tests/qemuxml2argvdata/cpu-Haswell.args
|
||||
index b57fdfddc5..965274c1f0 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-Haswell.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-Haswell.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,usb=off,dump-guest-core=off \
|
||||
-accel kvm \
|
||||
--cpu Haswell \
|
||||
+-cpu Haswell,rtm=on,hle=on \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
-smp 6,sockets=6,cores=1,threads=1 \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-host-model-cmt.args b/tests/qemuxml2argvdata/cpu-host-model-cmt.args
|
||||
index 0de04e877d..602f70de86 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-host-model-cmt.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-host-model-cmt.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,usb=off,dump-guest-core=off \
|
||||
-accel tcg \
|
||||
--cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on \
|
||||
+-cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,rtm=on,hle=on \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
-smp 6,sockets=6,cores=1,threads=1 \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args b/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args
|
||||
index 09141106d5..ace08d5d76 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-translation.x86_64-4.0.0.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc-i440fx-4.0,usb=off,dump-guest-core=off \
|
||||
-accel tcg \
|
||||
--cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \
|
||||
+-cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,rtm=on,hle=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \
|
||||
-m 214 \
|
||||
-overcommit mem-lock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args
|
||||
index 2dab572a6b..a9f7c4b910 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-translation.x86_64-latest.args
|
||||
@@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
|
||||
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
|
||||
-accel tcg \
|
||||
--cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \
|
||||
+-cpu Haswell,pclmulqdq=on,ds-cpl=on,tsc-adjust=on,fxsr-opt=on,lahf-lm=on,cmp-legacy=on,nodeid-msr=on,perfctr-core=on,perfctr-nb=on,rtm=on,hle=on,kvm-pv-eoi=on,kvm-pv-unhalt=on \
|
||||
-m 214 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-tsc-frequency.args b/tests/qemuxml2argvdata/cpu-tsc-frequency.args
|
||||
index 4a032f5d85..48fb75abcc 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-tsc-frequency.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-tsc-frequency.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-machine pc,usb=off,dump-guest-core=off \
|
||||
-accel kvm \
|
||||
--cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,invtsc=on,tsc-frequency=4567890000 \
|
||||
+-cpu Haswell,vme=on,ds=on,acpi=on,ss=on,ht=on,tm=on,pbe=on,dtes64=on,monitor=on,ds-cpl=on,vmx=on,smx=on,est=on,tm2=on,xtpr=on,pdcm=on,f16c=on,rdrand=on,pdpe1gb=on,abm=on,lahf-lm=on,invtsc=on,rtm=on,hle=on,tsc-frequency=4567890000 \
|
||||
-m 214 \
|
||||
-realtime mlock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
diff --git a/tests/qemuxml2argvdata/q35-acpi-nouefi.args b/tests/qemuxml2argvdata/q35-acpi-nouefi.args
|
||||
index 3faee48c77..a1f742712d 100644
|
||||
--- a/tests/qemuxml2argvdata/q35-acpi-nouefi.args
|
||||
+++ b/tests/qemuxml2argvdata/q35-acpi-nouefi.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \
|
||||
-machine q35,usb=off,dump-guest-core=off \
|
||||
-accel tcg \
|
||||
--cpu Haswell \
|
||||
+-cpu Haswell,rtm=on,hle=on \
|
||||
-m 1024 \
|
||||
-realtime mlock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
diff --git a/tests/qemuxml2argvdata/q35-acpi-uefi.args b/tests/qemuxml2argvdata/q35-acpi-uefi.args
|
||||
index 60da1e282a..620056223a 100644
|
||||
--- a/tests/qemuxml2argvdata/q35-acpi-uefi.args
|
||||
+++ b/tests/qemuxml2argvdata/q35-acpi-uefi.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \
|
||||
-machine q35,usb=off,dump-guest-core=off \
|
||||
-accel tcg \
|
||||
--cpu Haswell \
|
||||
+-cpu Haswell,rtm=on,hle=on \
|
||||
-drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \
|
||||
-drive file=/var/lib/libvirt/qemu/nvram/guest_VARS.fd,if=pflash,format=raw,unit=1 \
|
||||
-m 1024 \
|
||||
diff --git a/tests/qemuxml2argvdata/q35-noacpi-nouefi.args b/tests/qemuxml2argvdata/q35-noacpi-nouefi.args
|
||||
index 14e5bbc22a..ea66536c2a 100644
|
||||
--- a/tests/qemuxml2argvdata/q35-noacpi-nouefi.args
|
||||
+++ b/tests/qemuxml2argvdata/q35-noacpi-nouefi.args
|
||||
@@ -13,7 +13,7 @@ QEMU_AUDIO_DRV=none \
|
||||
-object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-guest/master-key.aes \
|
||||
-machine q35,usb=off,dump-guest-core=off \
|
||||
-accel tcg \
|
||||
--cpu Haswell \
|
||||
+-cpu Haswell,rtm=on,hle=on \
|
||||
-m 1024 \
|
||||
-realtime mlock=off \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,89 @@
|
||||
From b550b671bace6d979a0763a837ce97ddf72e8fc8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b550b671bace6d979a0763a837ce97ddf72e8fc8@dist-git>
|
||||
From: Martin Kletzander <mkletzan@redhat.com>
|
||||
Date: Fri, 28 Jan 2022 20:33:12 +0100
|
||||
Subject: [PATCH] RHEL: Remove <glib-2.64.0 workaround for GSource race
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2045879
|
||||
|
||||
This is to accommodate for RHEL 8 downstream glib being fixed with a backport in
|
||||
version 2.56.4-12 (Bug 1948988). Another reason for that is that our workaround
|
||||
does not play nice with a fixed glib, leading to libvirt not properly
|
||||
dereferencing the monitor socket, eventually leading to EMFILE: Too many open
|
||||
files.
|
||||
|
||||
RHEL-only
|
||||
|
||||
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
---
|
||||
src/util/glibcompat.c | 46 ++++++++-----------------------------------
|
||||
1 file changed, 8 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/util/glibcompat.c b/src/util/glibcompat.c
|
||||
index eb6dcc0111..bf890f10d2 100644
|
||||
--- a/src/util/glibcompat.c
|
||||
+++ b/src/util/glibcompat.c
|
||||
@@ -212,51 +212,21 @@ vir_g_strdup_vprintf(const char *msg, va_list args)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-
|
||||
/*
|
||||
- * If the last reference to a GSource is released in a non-main
|
||||
- * thread we're exposed to a race condition that causes a
|
||||
- * crash:
|
||||
- *
|
||||
- * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1358
|
||||
+ * This is a leftover of a hack that works around glib older than 2.64.0, but
|
||||
+ * the fix in glib as backported in RHEL-8 to glib2-2.56.4-12 in BZ 1948988:
|
||||
*
|
||||
- * Thus we're using an idle func to release our ref...
|
||||
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1948988
|
||||
*
|
||||
- * ...but this imposes a significant performance penalty on
|
||||
- * I/O intensive workloads which are sensitive to the iterations
|
||||
- * of the event loop, so avoid the workaround if we know we have
|
||||
- * new enough glib.
|
||||
+ * and our workaround coupled with that glib fix started causing leaks, which
|
||||
+ * surfaced with us not unreferencing the qemu monitor socket in BZ 2045879:
|
||||
*
|
||||
- * The function below is used from a header file definition.
|
||||
+ * https://bugzilla.redhat.com/show_bug.cgi?id=2045879
|
||||
*
|
||||
- * Drop when min glib >= 2.64.0
|
||||
+ * Keeping this wrapper makes it easier to follow with other backports without
|
||||
+ * conflicts in callers due to the function name change.
|
||||
*/
|
||||
-#if GLIB_CHECK_VERSION(2, 64, 0)
|
||||
void vir_g_source_unref(GSource *src, GMainContext *ctx G_GNUC_UNUSED)
|
||||
{
|
||||
g_source_unref(src);
|
||||
}
|
||||
-#else
|
||||
-
|
||||
-static gboolean
|
||||
-virEventGLibSourceUnrefIdle(gpointer data)
|
||||
-{
|
||||
- GSource *src = data;
|
||||
-
|
||||
- g_source_unref(src);
|
||||
-
|
||||
- return FALSE;
|
||||
-}
|
||||
-
|
||||
-void vir_g_source_unref(GSource *src, GMainContext *ctx)
|
||||
-{
|
||||
- GSource *idle = g_idle_source_new();
|
||||
-
|
||||
- g_source_set_callback(idle, virEventGLibSourceUnrefIdle, src, NULL);
|
||||
-
|
||||
- g_source_attach(idle, ctx);
|
||||
-
|
||||
- g_source_unref(idle);
|
||||
-}
|
||||
-
|
||||
-#endif
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,81 @@
|
||||
From d6956a1aaa8757fab60132c3ee46c2bb199a78a8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d6956a1aaa8757fab60132c3ee46c2bb199a78a8@dist-git>
|
||||
From: John Ferlan <jferlan@redhat.com>
|
||||
Date: Mon, 17 Dec 2018 20:42:30 -0500
|
||||
Subject: [PATCH] RHEL: qemu: Add ability to set sgio values for hostdev
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1582424
|
||||
|
||||
RHEL-only
|
||||
|
||||
Add necessary checks in order to allow setting sgio values for a scsi
|
||||
host device
|
||||
|
||||
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_conf.c | 25 ++++++++++++++++---------
|
||||
1 file changed, 16 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index 6077457ff4..ba85fc6e22 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -1841,8 +1841,9 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev)
|
||||
virDomainDiskDef *disk = NULL;
|
||||
virDomainHostdevDef *hostdev = NULL;
|
||||
g_autofree char *sysfs_path = NULL;
|
||||
+ g_autofree char *hostdev_path = NULL;
|
||||
const char *path = NULL;
|
||||
- int val = -1;
|
||||
+ int val = 0;
|
||||
|
||||
/* "sgio" is only valid for block disk; cdrom
|
||||
* and floopy disk can have empty source.
|
||||
@@ -1858,17 +1859,14 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev)
|
||||
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||
hostdev = dev->data.hostdev;
|
||||
|
||||
- if (!qemuIsSharedHostdev(hostdev))
|
||||
+ if (hostdev->source.subsys.u.scsi.protocol ==
|
||||
+ VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI)
|
||||
return 0;
|
||||
|
||||
- if (hostdev->source.subsys.u.scsi.sgio) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("'sgio' is not supported for SCSI "
|
||||
- "generic device yet "));
|
||||
+ if (!(hostdev_path = qemuGetHostdevPath(hostdev)))
|
||||
return -1;
|
||||
- }
|
||||
|
||||
- return 0;
|
||||
+ path = hostdev_path;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -1877,7 +1875,16 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev)
|
||||
return -1;
|
||||
|
||||
/* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0. */
|
||||
- val = (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED);
|
||||
+ if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
+ if (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED)
|
||||
+ val = 1;
|
||||
+ } else {
|
||||
+ /* Only settable if <shareable/> was present for hostdev */
|
||||
+ if (qemuIsSharedHostdev(hostdev) &&
|
||||
+ hostdev->source.subsys.u.scsi.sgio ==
|
||||
+ VIR_DOMAIN_DEVICE_SGIO_UNFILTERED)
|
||||
+ val = 1;
|
||||
+ }
|
||||
|
||||
/* Do not do anything if unpriv_sgio is not supported by the kernel and the
|
||||
* whitelist is enabled. But if requesting unfiltered access, always call
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,66 @@
|
||||
From f562b4c83d342002291f6bd7c5776eaecbd3147f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f562b4c83d342002291f6bd7c5776eaecbd3147f@dist-git>
|
||||
From: John Ferlan <jferlan@redhat.com>
|
||||
Date: Mon, 17 Dec 2018 20:42:31 -0500
|
||||
Subject: [PATCH] RHEL: qemu: Add check for unpriv sgio for SCSI generic host
|
||||
device
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1582424
|
||||
|
||||
RHEL-only
|
||||
|
||||
Check if the hostdev has set the sgio filtered/unfiltered and handle
|
||||
appropriately.
|
||||
|
||||
This restores functionality removed by upstream commit id 'ce346623'
|
||||
to remove sgio support for the SCSI generic host device.
|
||||
|
||||
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_conf.c | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index ba85fc6e22..28c334761b 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -1749,13 +1749,29 @@ qemuSharedHostdevAddRemoveInternal(virQEMUDriver *driver,
|
||||
{
|
||||
g_autofree char *dev_path = NULL;
|
||||
g_autofree char *key = NULL;
|
||||
+ virDomainHostdevSubsysSCSI *scsisrc = &hostdev->source.subsys.u.scsi;
|
||||
+ virDomainHostdevSubsysSCSIHost *scsihostsrc = &scsisrc->u.host;
|
||||
int ret = -1;
|
||||
|
||||
if (!qemuIsSharedHostdev(hostdev))
|
||||
return 0;
|
||||
|
||||
- if (!(dev_path = qemuGetHostdevPath(hostdev)) ||
|
||||
- !(key = qemuGetSharedDeviceKey(dev_path)))
|
||||
+ if (!(dev_path = qemuGetHostdevPath(hostdev)))
|
||||
+ return -1;
|
||||
+
|
||||
+ if ((ret = qemuCheckUnprivSGIO(driver->sharedDevices, dev_path,
|
||||
+ scsisrc->sgio)) < 0) {
|
||||
+ if (ret == -2) {
|
||||
+ virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
+ _("sgio of shared scsi host device '%s-%u-%u-%llu' "
|
||||
+ "conflicts with other active domains"),
|
||||
+ scsihostsrc->adapter, scsihostsrc->bus,
|
||||
+ scsihostsrc->target, scsihostsrc->unit);
|
||||
+ }
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (!(key = qemuGetSharedDeviceKey(dev_path)))
|
||||
return -1;
|
||||
|
||||
qemuDriverLock(driver);
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From b6c1f9ca8eb0ca8f7603ab205c7dc95b9f07b5a0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b6c1f9ca8eb0ca8f7603ab205c7dc95b9f07b5a0@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Mon, 18 Jul 2022 16:01:20 +0200
|
||||
Subject: [PATCH] RHEL: qemu_migration: Fix restoring memlock limit on
|
||||
destination
|
||||
|
||||
Restoring memory locking limit on the destination host only makes sense
|
||||
when migration succeeded as otherwise the QEMU process will be killed
|
||||
anyway. Specifically if the migration fails because the process died,
|
||||
touching the limit would produce rather unhelpful error message instead
|
||||
of the real issue:
|
||||
|
||||
cannot get locked memory limit of process -1: No such file or
|
||||
directory
|
||||
|
||||
This patch is RHEL-only caused by misplacing the call to
|
||||
qemuDomainSetMaxMemLock when the "qemu_migration: Restore original
|
||||
memory locking limit" upstream patch was backported to an older code
|
||||
base.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2107954
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_migration.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||
index db5163e993..11f87296d6 100644
|
||||
--- a/src/qemu/qemu_migration.c
|
||||
+++ b/src/qemu/qemu_migration.c
|
||||
@@ -5895,6 +5895,8 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
|
||||
*/
|
||||
if (inPostCopy)
|
||||
g_clear_pointer(&priv->job.completed, qemuDomainJobInfoFree);
|
||||
+
|
||||
+ qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock);
|
||||
}
|
||||
|
||||
qemuMigrationParamsReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN,
|
||||
@@ -5907,7 +5909,6 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
|
||||
cleanup:
|
||||
g_clear_pointer(&jobInfo, qemuDomainJobInfoFree);
|
||||
virPortAllocatorRelease(port);
|
||||
- qemuDomainSetMaxMemLock(vm, 0, &priv->preMigrationMemlock);
|
||||
if (priv->mon)
|
||||
qemuMonitorSetDomainLog(priv->mon, NULL, NULL, NULL);
|
||||
VIR_FREE(priv->origname);
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,215 @@
|
||||
From 9c5daeb8c99ca12a66387de448f585742887fd75 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9c5daeb8c99ca12a66387de448f585742887fd75@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 6 Mar 2020 15:52:21 +0100
|
||||
Subject: [PATCH] RHEL: virscsi: Check device type before getting it's /dev
|
||||
node name
|
||||
|
||||
Not all SCSI devices are block devices, therefore
|
||||
/sys/bus/scsi/devices/X:X:X:X/block/ directory does not always
|
||||
exist. Check if the SCSI device is a block device beforehand.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1808390
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Message-Id: <20200306145226.1610708-2-abologna@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/util/virscsi.c | 140 ++++++++++++++++++++++++++++++---
|
||||
tests/virscsidata/0-0-0-0/type | 1 +
|
||||
tests/virscsidata/1-0-0-0/type | 1 +
|
||||
3 files changed, 131 insertions(+), 11 deletions(-)
|
||||
create mode 100644 tests/virscsidata/0-0-0-0/type
|
||||
create mode 100644 tests/virscsidata/1-0-0-0/type
|
||||
|
||||
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
|
||||
index 6a90d9002f..770f727cac 100644
|
||||
--- a/src/util/virscsi.c
|
||||
+++ b/src/util/virscsi.c
|
||||
@@ -47,6 +47,32 @@ struct _virUsedByInfo {
|
||||
};
|
||||
typedef struct _virUsedByInfo virUsedByInfo;
|
||||
|
||||
+
|
||||
+/* Keep in sync with scsi/scsi_proto.h */
|
||||
+typedef enum {
|
||||
+ VIR_SCSI_DEVICE_TYPE_NONE = -1,
|
||||
+ VIR_SCSI_DEVICE_TYPE_DISK = 0x00,
|
||||
+ VIR_SCSI_DEVICE_TYPE_TAPE = 0x01,
|
||||
+ VIR_SCSI_DEVICE_TYPE_PRINTER = 0x02,
|
||||
+ VIR_SCSI_DEVICE_TYPE_PROCESSOR = 0x03,
|
||||
+ VIR_SCSI_DEVICE_TYPE_WORM = 0x04,
|
||||
+ VIR_SCSI_DEVICE_TYPE_ROM = 0x05,
|
||||
+ VIR_SCSI_DEVICE_TYPE_SCANNER = 0x06,
|
||||
+ VIR_SCSI_DEVICE_TYPE_MOD = 0x07,
|
||||
+ VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER = 0x08,
|
||||
+ VIR_SCSI_DEVICE_TYPE_COMM = 0x09,
|
||||
+ VIR_SCSI_DEVICE_TYPE_RAID = 0x0c,
|
||||
+ VIR_SCSI_DEVICE_TYPE_ENCLOSURE = 0x0d,
|
||||
+ VIR_SCSI_DEVICE_TYPE_RBC = 0x0e,
|
||||
+ VIR_SCSI_DEVICE_TYPE_OSD = 0x11,
|
||||
+ VIR_SCSI_DEVICE_TYPE_ZBC = 0x14,
|
||||
+ VIR_SCSI_DEVICE_TYPE_WLUN = 0x1e,
|
||||
+ VIR_SCSI_DEVICE_TYPE_NO_LUN = 0x7f,
|
||||
+
|
||||
+ VIR_SCSI_DEVICE_TYPE_LAST,
|
||||
+} virSCSIDeviceType;
|
||||
+
|
||||
+
|
||||
struct _virSCSIDevice {
|
||||
unsigned int adapter;
|
||||
unsigned int bus;
|
||||
@@ -126,6 +152,78 @@ virSCSIDeviceGetSgName(const char *sysfs_prefix,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+
|
||||
+static int
|
||||
+virSCSIDeviceGetType(const char *prefix,
|
||||
+ unsigned int adapter,
|
||||
+ unsigned int bus,
|
||||
+ unsigned int target,
|
||||
+ unsigned long long unit,
|
||||
+ virSCSIDeviceType *type)
|
||||
+{
|
||||
+ int intType;
|
||||
+
|
||||
+ if (virFileReadValueInt(&intType,
|
||||
+ "%s/%d:%u:%u:%llu/type",
|
||||
+ prefix, adapter, bus, target, unit) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ switch (intType) {
|
||||
+ case VIR_SCSI_DEVICE_TYPE_DISK:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_TAPE:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_PRINTER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_PROCESSOR:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_WORM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ROM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_SCANNER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_MOD:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_COMM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_RAID:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ENCLOSURE:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_RBC:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_OSD:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ZBC:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_WLUN:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_NO_LUN:
|
||||
+ *type = intType;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("unknown SCSI device type: %x"),
|
||||
+ intType);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static char *
|
||||
+virSCSIDeviceGetDevNameBlock(const char *prefix,
|
||||
+ unsigned int adapter,
|
||||
+ unsigned int bus,
|
||||
+ unsigned int target,
|
||||
+ unsigned long long unit)
|
||||
+{
|
||||
+ g_autoptr(DIR) dir = NULL;
|
||||
+ struct dirent *entry;
|
||||
+ g_autofree char *path = NULL;
|
||||
+
|
||||
+ path = g_strdup_printf("%s/%d:%u:%u:%llu/block",
|
||||
+ prefix, adapter, bus, target, unit);
|
||||
+
|
||||
+ if (virDirOpen(&dir, path) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (virDirRead(dir, &entry, path) > 0)
|
||||
+ return g_strdup(entry->d_name);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Returns device name (e.g. "sdc") on success, or NULL
|
||||
* on failure.
|
||||
*/
|
||||
@@ -136,25 +234,45 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix,
|
||||
unsigned int target,
|
||||
unsigned long long unit)
|
||||
{
|
||||
- g_autoptr(DIR) dir = NULL;
|
||||
- struct dirent *entry;
|
||||
- g_autofree char *path = NULL;
|
||||
unsigned int adapter_id;
|
||||
+ virSCSIDeviceType type;
|
||||
const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_DEVICES;
|
||||
|
||||
if (virSCSIDeviceGetAdapterId(adapter, &adapter_id) < 0)
|
||||
return NULL;
|
||||
|
||||
- path = g_strdup_printf("%s/%d:%u:%u:%llu/block", prefix, adapter_id, bus,
|
||||
- target, unit);
|
||||
-
|
||||
- if (virDirOpen(&dir, path) < 0)
|
||||
+ if (virSCSIDeviceGetType(prefix, adapter_id,
|
||||
+ bus, target, unit, &type) < 0)
|
||||
return NULL;
|
||||
|
||||
- if (virDirRead(dir, &entry, path) > 0)
|
||||
- return g_strdup(entry->d_name);
|
||||
-
|
||||
- return NULL;
|
||||
+ switch (type) {
|
||||
+ case VIR_SCSI_DEVICE_TYPE_DISK:
|
||||
+ return virSCSIDeviceGetDevNameBlock(prefix, adapter_id, bus, target, unit);
|
||||
+
|
||||
+ case VIR_SCSI_DEVICE_TYPE_TAPE:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_PRINTER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_PROCESSOR:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_WORM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ROM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_SCANNER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_MOD:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_MEDIUM_CHANGER:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_COMM:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_RAID:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ENCLOSURE:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_RBC:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_OSD:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_ZBC:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_WLUN:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_NO_LUN:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_NONE:
|
||||
+ case VIR_SCSI_DEVICE_TYPE_LAST:
|
||||
+ default:
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("unsupported SCSI device type: %x"),
|
||||
+ type);
|
||||
+ return NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
virSCSIDevice *
|
||||
diff --git a/tests/virscsidata/0-0-0-0/type b/tests/virscsidata/0-0-0-0/type
|
||||
new file mode 100644
|
||||
index 0000000000..573541ac97
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/0-0-0-0/type
|
||||
@@ -0,0 +1 @@
|
||||
+0
|
||||
diff --git a/tests/virscsidata/1-0-0-0/type b/tests/virscsidata/1-0-0-0/type
|
||||
new file mode 100644
|
||||
index 0000000000..573541ac97
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/1-0-0-0/type
|
||||
@@ -0,0 +1 @@
|
||||
+0
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,272 @@
|
||||
From 1ce4faffcd4616bbcea4d198c3f60cbcfddd784e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1ce4faffcd4616bbcea4d198c3f60cbcfddd784e@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 6 Mar 2020 15:52:23 +0100
|
||||
Subject: [PATCH] RHEL: virscsi: Introduce and use
|
||||
virSCSIDeviceGetUnprivSGIOSysfsPath()
|
||||
|
||||
When constructing a path to the 'unpriv_sgio' file of given SCSI
|
||||
device we don't need to go through /dev/* and major() + minor()
|
||||
path. The generated path points to
|
||||
/sys/dev/block/MAJ:MIN/queue/unpriv_sgio which is wrong if the
|
||||
SCSI device in question is not a block device. We can generate a
|
||||
different path: /sys/bus/scsi/devices/X:X:X:X/unpriv_sgio where
|
||||
the file is directly accessible regardless of the SCSI device
|
||||
type.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1808390
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Message-Id: <20200306145226.1610708-4-abologna@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/libvirt_private.syms | 1 +
|
||||
src/qemu/qemu_conf.c | 31 +++++++++++++++++++------------
|
||||
src/util/virscsi.c | 19 +++++++++++++++++++
|
||||
src/util/virscsi.h | 5 +++++
|
||||
src/util/virutil.c | 24 ++++++------------------
|
||||
src/util/virutil.h | 2 --
|
||||
6 files changed, 50 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
||||
index 5b76e66e61..2c42e2a5e8 100644
|
||||
--- a/src/libvirt_private.syms
|
||||
+++ b/src/libvirt_private.syms
|
||||
@@ -3191,6 +3191,7 @@ virSCSIDeviceGetSgName;
|
||||
virSCSIDeviceGetShareable;
|
||||
virSCSIDeviceGetTarget;
|
||||
virSCSIDeviceGetUnit;
|
||||
+virSCSIDeviceGetUnprivSGIOSysfsPath;
|
||||
virSCSIDeviceIsAvailable;
|
||||
virSCSIDeviceListAdd;
|
||||
virSCSIDeviceListCount;
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index 28c334761b..a0b8076d6b 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -1506,7 +1506,7 @@ qemuCheckUnprivSGIO(GHashTable *sharedDevices,
|
||||
if (!(virHashLookup(sharedDevices, key)))
|
||||
return 0;
|
||||
|
||||
- if (virGetDeviceUnprivSGIO(device_path, NULL, &val) < 0)
|
||||
+ if (virGetDeviceUnprivSGIO(sysfs_path, &val) < 0)
|
||||
return -1;
|
||||
|
||||
/* Error message on failure needs to be handled in caller
|
||||
@@ -1857,39 +1857,46 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev)
|
||||
virDomainDiskDef *disk = NULL;
|
||||
virDomainHostdevDef *hostdev = NULL;
|
||||
g_autofree char *sysfs_path = NULL;
|
||||
- g_autofree char *hostdev_path = NULL;
|
||||
- const char *path = NULL;
|
||||
int val = 0;
|
||||
|
||||
/* "sgio" is only valid for block disk; cdrom
|
||||
* and floopy disk can have empty source.
|
||||
*/
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
+ const char *path;
|
||||
+
|
||||
disk = dev->data.disk;
|
||||
+ path = virDomainDiskGetSource(disk);
|
||||
|
||||
if (disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
|
||||
!virStorageSourceIsBlockLocal(disk->src))
|
||||
return 0;
|
||||
|
||||
- path = virDomainDiskGetSource(disk);
|
||||
+ if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, NULL)))
|
||||
+ return -1;
|
||||
+
|
||||
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
|
||||
+ virDomainHostdevSubsysSCSI *scsisrc;
|
||||
+ virDomainHostdevSubsysSCSIHost *scsihostsrc;
|
||||
+
|
||||
hostdev = dev->data.hostdev;
|
||||
+ scsisrc = &hostdev->source.subsys.u.scsi;
|
||||
+ scsihostsrc = &scsisrc->u.host;
|
||||
|
||||
if (hostdev->source.subsys.u.scsi.protocol ==
|
||||
VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI)
|
||||
return 0;
|
||||
|
||||
- if (!(hostdev_path = qemuGetHostdevPath(hostdev)))
|
||||
+ if (!(sysfs_path = virSCSIDeviceGetUnprivSGIOSysfsPath(NULL,
|
||||
+ scsihostsrc->adapter,
|
||||
+ scsihostsrc->bus,
|
||||
+ scsihostsrc->target,
|
||||
+ scsihostsrc->unit)))
|
||||
return -1;
|
||||
-
|
||||
- path = hostdev_path;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, NULL)))
|
||||
- return -1;
|
||||
-
|
||||
/* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0. */
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
if (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED)
|
||||
@@ -1909,11 +1916,11 @@ qemuSetUnprivSGIO(virDomainDeviceDef *dev)
|
||||
if (virFileExists(sysfs_path) || val == 1) {
|
||||
int curr_val;
|
||||
|
||||
- if (virGetDeviceUnprivSGIO(path, NULL, &curr_val) < 0)
|
||||
+ if (virGetDeviceUnprivSGIO(sysfs_path, &curr_val) < 0)
|
||||
return -1;
|
||||
|
||||
if (curr_val != val &&
|
||||
- virSetDeviceUnprivSGIO(path, NULL, val) < 0) {
|
||||
+ virSetDeviceUnprivSGIO(sysfs_path, val) < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
|
||||
index 6165196423..b437fdcac0 100644
|
||||
--- a/src/util/virscsi.c
|
||||
+++ b/src/util/virscsi.c
|
||||
@@ -302,6 +302,25 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix,
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+char *
|
||||
+virSCSIDeviceGetUnprivSGIOSysfsPath(const char *sysfs_prefix,
|
||||
+ const char *adapter,
|
||||
+ unsigned int bus,
|
||||
+ unsigned int target,
|
||||
+ unsigned long long unit)
|
||||
+{
|
||||
+ unsigned int adapter_id;
|
||||
+ const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_DEVICES;
|
||||
+
|
||||
+ if (virSCSIDeviceGetAdapterId(adapter, &adapter_id) < 0)
|
||||
+ return NULL;
|
||||
+
|
||||
+ return g_strdup_printf("%s/%d:%u:%u:%llu/unpriv_sgio",
|
||||
+ prefix, adapter_id, bus, target, unit);
|
||||
+}
|
||||
+
|
||||
+
|
||||
virSCSIDevice *
|
||||
virSCSIDeviceNew(const char *sysfs_prefix,
|
||||
const char *adapter,
|
||||
diff --git a/src/util/virscsi.h b/src/util/virscsi.h
|
||||
index 65ad15ed76..5721985939 100644
|
||||
--- a/src/util/virscsi.h
|
||||
+++ b/src/util/virscsi.h
|
||||
@@ -40,6 +40,11 @@ char *virSCSIDeviceGetDevName(const char *sysfs_prefix,
|
||||
unsigned int bus,
|
||||
unsigned int target,
|
||||
unsigned long long unit);
|
||||
+char *virSCSIDeviceGetUnprivSGIOSysfsPath(const char *sysfs_prefix,
|
||||
+ const char *adapter,
|
||||
+ unsigned int bus,
|
||||
+ unsigned int target,
|
||||
+ unsigned long long unit);
|
||||
|
||||
virSCSIDevice *virSCSIDeviceNew(const char *sysfs_prefix,
|
||||
const char *adapter,
|
||||
diff --git a/src/util/virutil.c b/src/util/virutil.c
|
||||
index e04f1343d8..b1e37b45c5 100644
|
||||
--- a/src/util/virutil.c
|
||||
+++ b/src/util/virutil.c
|
||||
@@ -1377,18 +1377,13 @@ virGetUnprivSGIOSysfsPath(const char *path,
|
||||
|
||||
int
|
||||
virSetDeviceUnprivSGIO(const char *path,
|
||||
- const char *sysfs_dir,
|
||||
int unpriv_sgio)
|
||||
{
|
||||
- char *sysfs_path = NULL;
|
||||
char *val = NULL;
|
||||
int ret = -1;
|
||||
int rc;
|
||||
|
||||
- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, sysfs_dir)))
|
||||
- return -1;
|
||||
-
|
||||
- if (!virFileExists(sysfs_path)) {
|
||||
+ if (!virFileExists(path)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("unpriv_sgio is not supported by this kernel"));
|
||||
goto cleanup;
|
||||
@@ -1396,38 +1391,32 @@ virSetDeviceUnprivSGIO(const char *path,
|
||||
|
||||
val = g_strdup_printf("%d", unpriv_sgio);
|
||||
|
||||
- if ((rc = virFileWriteStr(sysfs_path, val, 0)) < 0) {
|
||||
- virReportSystemError(-rc, _("failed to set %s"), sysfs_path);
|
||||
+ if ((rc = virFileWriteStr(path, val, 0)) < 0) {
|
||||
+ virReportSystemError(-rc, _("failed to set %s"), path);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
- VIR_FREE(sysfs_path);
|
||||
VIR_FREE(val);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
virGetDeviceUnprivSGIO(const char *path,
|
||||
- const char *sysfs_dir,
|
||||
int *unpriv_sgio)
|
||||
{
|
||||
- char *sysfs_path = NULL;
|
||||
char *buf = NULL;
|
||||
char *tmp = NULL;
|
||||
int ret = -1;
|
||||
|
||||
- if (!(sysfs_path = virGetUnprivSGIOSysfsPath(path, sysfs_dir)))
|
||||
- return -1;
|
||||
-
|
||||
- if (!virFileExists(sysfs_path)) {
|
||||
+ if (!virFileExists(path)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("unpriv_sgio is not supported by this kernel"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- if (virFileReadAll(sysfs_path, 1024, &buf) < 0)
|
||||
+ if (virFileReadAll(path, 1024, &buf) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if ((tmp = strchr(buf, '\n')))
|
||||
@@ -1435,13 +1424,12 @@ virGetDeviceUnprivSGIO(const char *path,
|
||||
|
||||
if (virStrToLong_i(buf, NULL, 10, unpriv_sgio) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- _("failed to parse value of %s"), sysfs_path);
|
||||
+ _("failed to parse value of %s"), path);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
- VIR_FREE(sysfs_path);
|
||||
VIR_FREE(buf);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/src/util/virutil.h b/src/util/virutil.h
|
||||
index 854b494890..da267c6446 100644
|
||||
--- a/src/util/virutil.h
|
||||
+++ b/src/util/virutil.h
|
||||
@@ -120,10 +120,8 @@ int virGetDeviceID(const char *path,
|
||||
int *maj,
|
||||
int *min) G_GNUC_NO_INLINE;
|
||||
int virSetDeviceUnprivSGIO(const char *path,
|
||||
- const char *sysfs_dir,
|
||||
int unpriv_sgio);
|
||||
int virGetDeviceUnprivSGIO(const char *path,
|
||||
- const char *sysfs_dir,
|
||||
int *unpriv_sgio);
|
||||
char *virGetUnprivSGIOSysfsPath(const char *path,
|
||||
const char *sysfs_dir);
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,200 @@
|
||||
From 5b96a8773d33af9822f6b6ccddc8f372841895a6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5b96a8773d33af9822f6b6ccddc8f372841895a6@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 6 Mar 2020 15:52:22 +0100
|
||||
Subject: [PATCH] RHEL: virscsi: Support TAPEs in virSCSIDeviceGetDevName()
|
||||
|
||||
If the SCSI device we want to get /dev node name for is TAPE
|
||||
device we need to look at 'tape' symlink in the sysfs dir
|
||||
corresponding to the device.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1808390
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Message-Id: <20200306145226.1610708-3-abologna@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/util/virscsi.c | 27 +++++++++++++++
|
||||
tests/virscsidata/2-0-0-0/model | 1 +
|
||||
tests/virscsidata/2-0-0-0/scsi_tape/st0/dev | 1 +
|
||||
tests/virscsidata/2-0-0-0/sg3/dev | 1 +
|
||||
tests/virscsidata/2-0-0-0/tape | 1 +
|
||||
tests/virscsidata/2-0-0-0/type | 1 +
|
||||
tests/virscsidata/2-0-0-0/vendor | 1 +
|
||||
tests/virscsidata/sg3 | 0
|
||||
tests/virscsitest.c | 38 ++++++++++++++++++---
|
||||
9 files changed, 66 insertions(+), 5 deletions(-)
|
||||
create mode 100644 tests/virscsidata/2-0-0-0/model
|
||||
create mode 100644 tests/virscsidata/2-0-0-0/scsi_tape/st0/dev
|
||||
create mode 100644 tests/virscsidata/2-0-0-0/sg3/dev
|
||||
create mode 120000 tests/virscsidata/2-0-0-0/tape
|
||||
create mode 100644 tests/virscsidata/2-0-0-0/type
|
||||
create mode 100644 tests/virscsidata/2-0-0-0/vendor
|
||||
create mode 100644 tests/virscsidata/sg3
|
||||
|
||||
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
|
||||
index 770f727cac..6165196423 100644
|
||||
--- a/src/util/virscsi.c
|
||||
+++ b/src/util/virscsi.c
|
||||
@@ -224,6 +224,31 @@ virSCSIDeviceGetDevNameBlock(const char *prefix,
|
||||
}
|
||||
|
||||
|
||||
+static char *
|
||||
+virSCSIDeviceGetDevNameTape(const char *prefix,
|
||||
+ unsigned int adapter,
|
||||
+ unsigned int bus,
|
||||
+ unsigned int target,
|
||||
+ unsigned long long unit)
|
||||
+{
|
||||
+ g_autofree char *path = NULL;
|
||||
+ g_autofree char *resolvedPath = NULL;
|
||||
+ g_autoptr(GError) err = NULL;
|
||||
+
|
||||
+ path = g_strdup_printf("%s/%d:%u:%u:%llu/tape",
|
||||
+ prefix, adapter, bus, target, unit);
|
||||
+
|
||||
+ if (!(resolvedPath = g_file_read_link(path, &err))) {
|
||||
+ virReportError(VIR_ERR_SYSTEM_ERROR,
|
||||
+ _("Unable to read link: %s"),
|
||||
+ err->message);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ return g_path_get_basename(resolvedPath);
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Returns device name (e.g. "sdc") on success, or NULL
|
||||
* on failure.
|
||||
*/
|
||||
@@ -250,6 +275,8 @@ virSCSIDeviceGetDevName(const char *sysfs_prefix,
|
||||
return virSCSIDeviceGetDevNameBlock(prefix, adapter_id, bus, target, unit);
|
||||
|
||||
case VIR_SCSI_DEVICE_TYPE_TAPE:
|
||||
+ return virSCSIDeviceGetDevNameTape(prefix, adapter_id, bus, target, unit);
|
||||
+
|
||||
case VIR_SCSI_DEVICE_TYPE_PRINTER:
|
||||
case VIR_SCSI_DEVICE_TYPE_PROCESSOR:
|
||||
case VIR_SCSI_DEVICE_TYPE_WORM:
|
||||
diff --git a/tests/virscsidata/2-0-0-0/model b/tests/virscsidata/2-0-0-0/model
|
||||
new file mode 100644
|
||||
index 0000000000..d2ab4715c3
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/model
|
||||
@@ -0,0 +1 @@
|
||||
+scsi_debug
|
||||
diff --git a/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev b/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev
|
||||
new file mode 100644
|
||||
index 0000000000..3dd777e840
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/scsi_tape/st0/dev
|
||||
@@ -0,0 +1 @@
|
||||
+9:0
|
||||
diff --git a/tests/virscsidata/2-0-0-0/sg3/dev b/tests/virscsidata/2-0-0-0/sg3/dev
|
||||
new file mode 100644
|
||||
index 0000000000..b369a59b3e
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/sg3/dev
|
||||
@@ -0,0 +1 @@
|
||||
+21:3
|
||||
diff --git a/tests/virscsidata/2-0-0-0/tape b/tests/virscsidata/2-0-0-0/tape
|
||||
new file mode 120000
|
||||
index 0000000000..6ca7f77539
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/tape
|
||||
@@ -0,0 +1 @@
|
||||
+scsi_tape/st0
|
||||
\ No newline at end of file
|
||||
diff --git a/tests/virscsidata/2-0-0-0/type b/tests/virscsidata/2-0-0-0/type
|
||||
new file mode 100644
|
||||
index 0000000000..d00491fd7e
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/type
|
||||
@@ -0,0 +1 @@
|
||||
+1
|
||||
diff --git a/tests/virscsidata/2-0-0-0/vendor b/tests/virscsidata/2-0-0-0/vendor
|
||||
new file mode 100644
|
||||
index 0000000000..9b075671ea
|
||||
--- /dev/null
|
||||
+++ b/tests/virscsidata/2-0-0-0/vendor
|
||||
@@ -0,0 +1 @@
|
||||
+Linux
|
||||
diff --git a/tests/virscsidata/sg3 b/tests/virscsidata/sg3
|
||||
new file mode 100644
|
||||
index 0000000000..e69de29bb2
|
||||
diff --git a/tests/virscsitest.c b/tests/virscsitest.c
|
||||
index c96699e157..924b77af08 100644
|
||||
--- a/tests/virscsitest.c
|
||||
+++ b/tests/virscsitest.c
|
||||
@@ -33,17 +33,33 @@ VIR_LOG_INIT("tests.scsitest");
|
||||
|
||||
static char *virscsi_prefix;
|
||||
|
||||
+typedef struct {
|
||||
+ const char *adapter;
|
||||
+ unsigned int bus;
|
||||
+ unsigned int target;
|
||||
+ unsigned int unit;
|
||||
+ const char *expectedName;
|
||||
+} testGetDevNameData;
|
||||
+
|
||||
static int
|
||||
-test1(const void *data G_GNUC_UNUSED)
|
||||
+testGetDevName(const void *opaque)
|
||||
{
|
||||
+ const testGetDevNameData *data = opaque;
|
||||
g_autofree char *name = NULL;
|
||||
|
||||
if (!(name = virSCSIDeviceGetDevName(virscsi_prefix,
|
||||
- "scsi_host1", 0, 0, 0)))
|
||||
+ data->adapter,
|
||||
+ data->bus,
|
||||
+ data->target,
|
||||
+ data->unit)))
|
||||
return -1;
|
||||
|
||||
- if (STRNEQ(name, "sdh"))
|
||||
+ if (STRNEQ(name, data->expectedName)) {
|
||||
+ fprintf(stderr,
|
||||
+ "SCSI dev name mismatch, expected %s got %s",
|
||||
+ data->expectedName, name);
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -200,15 +216,27 @@ mymain(void)
|
||||
|
||||
CREATE_SYMLINK("0-0-0-0", "0:0:0:0");
|
||||
CREATE_SYMLINK("1-0-0-0", "1:0:0:0");
|
||||
+ CREATE_SYMLINK("2-0-0-0", "2:0:0:0");
|
||||
CREATE_SYMLINK("sg0", "sg0");
|
||||
+ CREATE_SYMLINK("sg3", "sg3");
|
||||
CREATE_SYMLINK("sg8", "sg8");
|
||||
|
||||
VIR_FREE(virscsi_prefix);
|
||||
|
||||
virscsi_prefix = g_strdup(tmpdir);
|
||||
|
||||
- if (virTestRun("test1", test1, NULL) < 0)
|
||||
- ret = -1;
|
||||
+#define TEST_GET_DEV_NAME(adapter, bus, target, unit, expectedName) \
|
||||
+ do { \
|
||||
+ testGetDevNameData data = {adapter, bus, target, unit, expectedName}; \
|
||||
+ if (virTestRun("test getDevname " expectedName, \
|
||||
+ testGetDevName, &data) < 0) \
|
||||
+ ret = -1; \
|
||||
+ } while (0)
|
||||
+
|
||||
+ TEST_GET_DEV_NAME("scsi_host0", 0, 0, 0, "sda");
|
||||
+ TEST_GET_DEV_NAME("scsi_host1", 0, 0, 0, "sdh");
|
||||
+ TEST_GET_DEV_NAME("scsi_host2", 0, 0, 0, "st0");
|
||||
+
|
||||
if (virTestRun("test2", test2, NULL) < 0)
|
||||
ret = -1;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,37 @@
|
||||
From ac8357ab7dd676af82b971673f8d7e862ff07624 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ac8357ab7dd676af82b971673f8d7e862ff07624@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 6 Mar 2020 15:52:24 +0100
|
||||
Subject: [PATCH] RHEL: virutil: Accept non-block devices in virGetDeviceID()
|
||||
|
||||
If a caller wants to learn major or minor number for a device,
|
||||
let them. There's no need to check if the device is a block
|
||||
device here.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1808390
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Message-Id: <20200306145226.1610708-5-abologna@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/util/virutil.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/util/virutil.c b/src/util/virutil.c
|
||||
index b1e37b45c5..ced8493516 100644
|
||||
--- a/src/util/virutil.c
|
||||
+++ b/src/util/virutil.c
|
||||
@@ -1333,9 +1333,6 @@ virGetDeviceID(const char *path, int *maj, int *min)
|
||||
if (stat(path, &sb) < 0)
|
||||
return -errno;
|
||||
|
||||
- if (!S_ISBLK(sb.st_mode))
|
||||
- return -EINVAL;
|
||||
-
|
||||
if (maj)
|
||||
*maj = major(sb.st_rdev);
|
||||
if (min)
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,103 @@
|
||||
From 732113455fb7eadeea178c71cc77f0ffdf639f24 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <732113455fb7eadeea178c71cc77f0ffdf639f24@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Tue, 18 Jan 2022 12:40:09 +0100
|
||||
Subject: [PATCH] Revert "report error when virProcessGetStatInfo() is unable
|
||||
to parse data"
|
||||
|
||||
This reverts commit 938382b60ae5bd1f83b5cb09e1ce68b9a88f679a.
|
||||
|
||||
Turns out, the commit did more harm than good. It changed
|
||||
semantics on some public APIs. For instance, while
|
||||
qemuDomainGetInfo() previously did not returned an error it does
|
||||
now. While the calls to virProcessGetStatInfo() is guarded with
|
||||
virDomainObjIsActive() it doesn't necessarily mean that QEMU's
|
||||
PID is still alive. QEMU might be gone but we just haven't
|
||||
realized it (e.g. because the eof handler thread is waiting for a
|
||||
job).
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2041610
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit 105dace22cc7b5b18d72a4dcad4a2cf386ce5c99)
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/ch/ch_driver.c | 2 ++
|
||||
src/qemu/qemu_driver.c | 7 ++++++-
|
||||
src/util/virprocess.c | 8 ++------
|
||||
3 files changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
|
||||
index 3cbc668489..53e0872207 100644
|
||||
--- a/src/ch/ch_driver.c
|
||||
+++ b/src/ch/ch_driver.c
|
||||
@@ -1073,6 +1073,8 @@ chDomainHelperGetVcpus(virDomainObj *vm,
|
||||
if (virProcessGetStatInfo(&vcpuinfo->cpuTime,
|
||||
&vcpuinfo->cpu, NULL,
|
||||
vm->pid, vcpupid) < 0) {
|
||||
+ virReportSystemError(errno, "%s",
|
||||
+ _("cannot get vCPU placement & pCPU time"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 65ac5ef367..d3d76c003f 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -1359,6 +1359,8 @@ qemuDomainHelperGetVcpus(virDomainObj *vm,
|
||||
if (virProcessGetStatInfo(&vcpuinfo->cpuTime,
|
||||
&vcpuinfo->cpu, NULL,
|
||||
vm->pid, vcpupid) < 0) {
|
||||
+ virReportSystemError(errno, "%s",
|
||||
+ _("cannot get vCPU placement & pCPU time"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -2519,6 +2521,8 @@ qemuDomainGetInfo(virDomainPtr dom,
|
||||
if (virDomainObjIsActive(vm)) {
|
||||
if (virProcessGetStatInfo(&(info->cpuTime), NULL, NULL,
|
||||
vm->pid, 0) < 0) {
|
||||
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
+ _("cannot read cputime for domain"));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
@@ -10526,7 +10530,8 @@ qemuDomainMemoryStatsInternal(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
if (virProcessGetStatInfo(NULL, NULL, &rss, vm->pid, 0) < 0) {
|
||||
- virResetLastError();
|
||||
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
+ _("cannot get RSS for domain"));
|
||||
} else {
|
||||
stats[ret].tag = VIR_DOMAIN_MEMORY_STAT_RSS;
|
||||
stats[ret].val = rss;
|
||||
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
|
||||
index 85d8c8e747..b559a4257e 100644
|
||||
--- a/src/util/virprocess.c
|
||||
+++ b/src/util/virprocess.c
|
||||
@@ -1784,10 +1784,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime,
|
||||
virStrToLong_ullp(proc_stat[VIR_PROCESS_STAT_STIME], NULL, 10, &systime) < 0 ||
|
||||
virStrToLong_l(proc_stat[VIR_PROCESS_STAT_RSS], NULL, 10, &rss) < 0 ||
|
||||
virStrToLong_i(proc_stat[VIR_PROCESS_STAT_PROCESSOR], NULL, 10, &cpu) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- _("cannot parse process status data for pid '%d/%d'"),
|
||||
- (int) pid, (int) tid);
|
||||
- return -1;
|
||||
+ VIR_WARN("cannot parse process status data");
|
||||
}
|
||||
|
||||
/* We got jiffies
|
||||
@@ -1884,8 +1881,7 @@ virProcessGetStatInfo(unsigned long long *cpuTime G_GNUC_UNUSED,
|
||||
pid_t pid G_GNUC_UNUSED,
|
||||
pid_t tid G_GNUC_UNUSED)
|
||||
{
|
||||
- virReportSystemError(ENOSYS, "%s",
|
||||
- _("Process statistics data is not supported on this platform"));
|
||||
+ errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.35.0
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 676946491ea25cacc4f6fd11f27bd9989b84767d Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <676946491ea25cacc4f6fd11f27bd9989b84767d.1708614745.git.jdenemar@redhat.com>
|
||||
From: Laine Stump <laine@redhat.com>
|
||||
Date: Fri, 16 Feb 2024 12:43:59 -0500
|
||||
Subject: [PATCH] Set stubDriverName from hostdev driver model attribute during
|
||||
pci device setup
|
||||
|
||||
commit v9.10.0-129-g8b93d78c83 (first appearing in libvirt-10.0.0) was
|
||||
supposed to allow forcing a PCI hostdev to be bound to a particular
|
||||
driver by adding <driver model='blah'/> to the XML for the
|
||||
device. Unfortunately, a single line was missed during the final
|
||||
changes to the patch prior to pushing, and the result was that the
|
||||
driver model could be set to *anything* and it would be accepted but
|
||||
just ignored.
|
||||
|
||||
This patch adds the missing line, which will set the stubDriverName
|
||||
field of the virPCIDevice object from the hostdev object as the
|
||||
virPCIDevice is being created. This ends up being used by
|
||||
virPCIDeviceBindToStub() as the driver that it binds the device to.
|
||||
|
||||
Fixes: 8b93d78c8325f1fba5db98848350f3db43f5e7d5
|
||||
Signed-off-by: Laine Stump <laine@redhat.com>
|
||||
Reviewed-by: Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 41fe8524870facae02be067097ea494c475d77f0)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-25858 [9.4.0]
|
||||
---
|
||||
src/hypervisor/virhostdev.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/hypervisor/virhostdev.c b/src/hypervisor/virhostdev.c
|
||||
index 40f8a4bc2c..185ec2ca50 100644
|
||||
--- a/src/hypervisor/virhostdev.c
|
||||
+++ b/src/hypervisor/virhostdev.c
|
||||
@@ -242,6 +242,7 @@ virHostdevGetPCIHostDevice(const virDomainHostdevDef *hostdev,
|
||||
return -1;
|
||||
|
||||
virPCIDeviceSetManaged(actual, hostdev->managed);
|
||||
+ virPCIDeviceSetStubDriverName(actual, pcisrc->driver.model);
|
||||
|
||||
if (pcisrc->driver.name == VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_VFIO) {
|
||||
virPCIDeviceSetStubDriverType(actual, VIR_PCI_STUB_DRIVER_VFIO);
|
||||
--
|
||||
2.43.2
|
@ -1,144 +0,0 @@
|
||||
From 5359921ef11b68dab549b6b28ba11a784e6946a5 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <5359921ef11b68dab549b6b28ba11a784e6946a5.1706524416.git.jdenemar@redhat.com>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 24 Jan 2024 19:23:54 +0100
|
||||
Subject: [PATCH] build: Make daemons depend on generated *_protocol.[ch]
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This should fix build failures when a daemon code is compiled before the
|
||||
included *_protocol.h headers are ready, such as:
|
||||
|
||||
FAILED: src/virtqemud.p/remote_remote_daemon_config.c.o
|
||||
../src/remote/remote_daemon_config.c: In function ‘daemonConfigNew’:
|
||||
../src/remote/remote_daemon_config.c:111:30: error:
|
||||
‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function)
|
||||
111 | data->auth_unix_rw = REMOTE_AUTH_POLKIT;
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
../src/remote/remote_daemon_config.c:111:30: note: each undeclared
|
||||
identifier is reported only once for each function it appears in
|
||||
../src/remote/remote_daemon_config.c:115:30: error:
|
||||
‘REMOTE_AUTH_NONE’ undeclared (first use in this function)
|
||||
115 | data->auth_unix_rw = REMOTE_AUTH_NONE;
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
../src/remote/remote_daemon_config.c: In function
|
||||
‘daemonConfigLoadOptions’:
|
||||
../src/remote/remote_daemon_config.c:252:31: error:
|
||||
‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function)
|
||||
252 | if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) {
|
||||
| ^~~~~~~~~~~~~~~~~~
|
||||
|
||||
or
|
||||
|
||||
FAILED: src/virtqemud.p/remote_remote_daemon_dispatch.c.o
|
||||
In file included from ../src/remote/remote_daemon.h:28,
|
||||
from ../src/remote/remote_daemon_dispatch.c:26:
|
||||
src/remote/lxc_protocol.h:13:5: error:
|
||||
unknown type name ‘remote_nonnull_domain’
|
||||
13 | remote_nonnull_domain dom;
|
||||
| ^~~~~~~~~~~~~~~~~~~~~
|
||||
In file included from ../src/remote/remote_daemon.h:29,
|
||||
from ../src/remote/remote_daemon_dispatch.c:26:
|
||||
src/remote/qemu_protocol.h:13:5: error:
|
||||
unknown type name ‘remote_nonnull_domain’
|
||||
13 | remote_nonnull_domain dom;
|
||||
| ^~~~~~~~~~~~~~~~~~~~~
|
||||
src/remote/qemu_protocol.h:14:5: error:
|
||||
unknown type name ‘remote_nonnull_string’
|
||||
14 | remote_nonnull_string cmd;
|
||||
| ^~~~~~~~~~~~~~~~~~~~~
|
||||
...
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit dcfe548cb01d64e2bdeac456c428e578158232b9)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-15267
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
po/meson.build | 1 +
|
||||
src/meson.build | 6 +++++-
|
||||
src/remote/meson.build | 15 +++++++++++----
|
||||
3 files changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/po/meson.build b/po/meson.build
|
||||
index a20877ad34..592b254447 100644
|
||||
--- a/po/meson.build
|
||||
+++ b/po/meson.build
|
||||
@@ -20,6 +20,7 @@ potfiles_dep = [
|
||||
access_gen_sources,
|
||||
admin_client_generated,
|
||||
admin_driver_generated,
|
||||
+ remote_protocol_generated,
|
||||
remote_driver_generated,
|
||||
remote_daemon_generated,
|
||||
]
|
||||
diff --git a/src/meson.build b/src/meson.build
|
||||
index 6538c43628..f52d2d5994 100644
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -616,7 +616,11 @@ foreach daemon : virt_daemons
|
||||
bin = executable(
|
||||
daemon['name'],
|
||||
[
|
||||
- daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated ]),
|
||||
+ daemon.get('sources', [
|
||||
+ remote_protocol_generated,
|
||||
+ remote_daemon_sources,
|
||||
+ remote_daemon_generated
|
||||
+ ]),
|
||||
dtrace_gen_objects,
|
||||
],
|
||||
c_args: [
|
||||
diff --git a/src/remote/meson.build b/src/remote/meson.build
|
||||
index 16b903fcaf..43bf2d0083 100644
|
||||
--- a/src/remote/meson.build
|
||||
+++ b/src/remote/meson.build
|
||||
@@ -7,8 +7,6 @@ remote_driver_generated = []
|
||||
|
||||
foreach name : [ 'remote', 'qemu', 'lxc' ]
|
||||
client_bodies_h = '@0@_client_bodies.h'.format(name)
|
||||
- protocol_c = '@0@_protocol.c'.format(name)
|
||||
- protocol_h = '@0@_protocol.h'.format(name)
|
||||
protocol_x = '@0@_protocol.x'.format(name)
|
||||
|
||||
remote_driver_generated += custom_target(
|
||||
@@ -20,8 +18,16 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
|
||||
],
|
||||
capture: true,
|
||||
)
|
||||
+endforeach
|
||||
|
||||
- remote_driver_generated += custom_target(
|
||||
+remote_protocol_generated = []
|
||||
+
|
||||
+foreach name : [ 'remote', 'qemu', 'lxc' ]
|
||||
+ protocol_c = '@0@_protocol.c'.format(name)
|
||||
+ protocol_h = '@0@_protocol.h'.format(name)
|
||||
+ protocol_x = '@0@_protocol.x'.format(name)
|
||||
+
|
||||
+ remote_protocol_generated += custom_target(
|
||||
protocol_h,
|
||||
input: protocol_x,
|
||||
output: protocol_h,
|
||||
@@ -32,7 +38,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
|
||||
],
|
||||
)
|
||||
|
||||
- remote_driver_generated += custom_target(
|
||||
+ remote_protocol_generated += custom_target(
|
||||
protocol_c,
|
||||
input: protocol_x,
|
||||
output: protocol_c,
|
||||
@@ -143,6 +149,7 @@ if conf.has('WITH_REMOTE')
|
||||
remote_driver_lib = static_library(
|
||||
'virt_remote_driver',
|
||||
[
|
||||
+ remote_protocol_generated,
|
||||
remote_driver_sources,
|
||||
remote_driver_generated,
|
||||
],
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,75 @@
|
||||
From b0fb5cbba2e03fbca8471487bf78931b3090b108 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b0fb5cbba2e03fbca8471487bf78931b3090b108@dist-git>
|
||||
From: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon, 10 Jan 2022 11:42:58 -0700
|
||||
Subject: [PATCH] build: Only install libvirt-guests when building libvirtd
|
||||
|
||||
libvirt-guests was already moved to the libvirt daemon package in commit
|
||||
d800c50349. It only needs to be installed when building libvirtd.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit 3be5ba11a2c6fcb2dfdffa03ab4f847113f36b85)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2153688
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
tools/meson.build | 38 ++++++++++++++++++++------------------
|
||||
1 file changed, 20 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/tools/meson.build b/tools/meson.build
|
||||
index 22fa3604ba..2d0aecb90b 100644
|
||||
--- a/tools/meson.build
|
||||
+++ b/tools/meson.build
|
||||
@@ -297,29 +297,31 @@ if conf.has('WITH_SANLOCK')
|
||||
)
|
||||
endif
|
||||
|
||||
-configure_file(
|
||||
- input: 'libvirt-guests.sh.in',
|
||||
- output: '@BASENAME@',
|
||||
- configuration: tools_conf,
|
||||
- install: true,
|
||||
- install_dir: libexecdir,
|
||||
- install_mode: 'rwxrwxr-x',
|
||||
-)
|
||||
-
|
||||
-if init_script == 'systemd'
|
||||
- install_data(
|
||||
- 'libvirt-guests.sysconf',
|
||||
- install_dir: sysconfdir / 'sysconfig',
|
||||
- rename: 'libvirt-guests',
|
||||
- )
|
||||
-
|
||||
+if conf.has('WITH_LIBVIRTD')
|
||||
configure_file(
|
||||
- input: 'libvirt-guests.service.in',
|
||||
+ input: 'libvirt-guests.sh.in',
|
||||
output: '@BASENAME@',
|
||||
configuration: tools_conf,
|
||||
install: true,
|
||||
- install_dir: prefix / 'lib' / 'systemd' / 'system',
|
||||
+ install_dir: libexecdir,
|
||||
+ install_mode: 'rwxrwxr-x',
|
||||
)
|
||||
+
|
||||
+ if init_script == 'systemd'
|
||||
+ install_data(
|
||||
+ 'libvirt-guests.sysconf',
|
||||
+ install_dir: sysconfdir / 'sysconfig',
|
||||
+ rename: 'libvirt-guests',
|
||||
+ )
|
||||
+
|
||||
+ configure_file(
|
||||
+ input: 'libvirt-guests.service.in',
|
||||
+ output: '@BASENAME@',
|
||||
+ configuration: tools_conf,
|
||||
+ install: true,
|
||||
+ install_dir: prefix / 'lib' / 'systemd' / 'system',
|
||||
+ )
|
||||
+ endif
|
||||
endif
|
||||
|
||||
if bash_completion_dep.found()
|
||||
--
|
||||
2.39.0
|
||||
|
@ -1,976 +0,0 @@
|
||||
From 413d6c8c6490caa5ec5479ab10aa493677cc45c0 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <413d6c8c6490caa5ec5479ab10aa493677cc45c0.1706524416.git.jdenemar@redhat.com>
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 18:20:14 +0100
|
||||
Subject: [PATCH] conf: Allow specifying CPU clusters
|
||||
|
||||
The default number of CPU clusters is 1, and values other than
|
||||
that one are currently rejected by all hypervisor drivers.
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit ef5c397584b1d03a81c74c27074ec4b1a05d3339)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/bhyve/bhyve_command.c | 5 +++++
|
||||
src/conf/cpu_conf.c | 16 +++++++++++++++-
|
||||
src/conf/cpu_conf.h | 1 +
|
||||
src/conf/domain_conf.c | 1 +
|
||||
src/conf/schemas/cputypes.rng | 5 +++++
|
||||
src/cpu/cpu.c | 1 +
|
||||
src/libxl/libxl_capabilities.c | 1 +
|
||||
src/qemu/qemu_command.c | 5 +++++
|
||||
src/vmx/vmx.c | 7 +++++++
|
||||
.../x86_64-host+guest,model486-result.xml | 2 +-
|
||||
.../x86_64-host+guest,models-result.xml | 2 +-
|
||||
tests/cputestdata/x86_64-host+guest-result.xml | 2 +-
|
||||
tests/cputestdata/x86_64-host+guest.xml | 2 +-
|
||||
.../x86_64-host+host-model-nofallback.xml | 2 +-
|
||||
...host-Haswell-noTSX+Haswell,haswell-result.xml | 2 +-
|
||||
...aswell-noTSX+Haswell-noTSX,haswell-result.xml | 2 +-
|
||||
...4-host-Haswell-noTSX+Haswell-noTSX-result.xml | 2 +-
|
||||
.../x86_64-host-worse+guest-result.xml | 2 +-
|
||||
.../ppc64-modern-bulk-result-conf.xml | 2 +-
|
||||
.../ppc64-modern-bulk-result-live.xml | 2 +-
|
||||
.../ppc64-modern-individual-result-conf.xml | 2 +-
|
||||
.../ppc64-modern-individual-result-live.xml | 2 +-
|
||||
.../x86-modern-bulk-result-conf.xml | 2 +-
|
||||
.../x86-modern-bulk-result-live.xml | 2 +-
|
||||
.../x86-modern-individual-add-result-conf.xml | 2 +-
|
||||
.../x86-modern-individual-add-result-live.xml | 2 +-
|
||||
...e-timeout+graphics-spice-timeout-password.xml | 2 +-
|
||||
.../qemuhotplug-graphics-spice-timeout.xml | 2 +-
|
||||
.../fd-memory-no-numa-topology.xml | 2 +-
|
||||
.../qemuxml2argvdata/fd-memory-numa-topology.xml | 2 +-
|
||||
.../fd-memory-numa-topology2.xml | 2 +-
|
||||
.../fd-memory-numa-topology3.xml | 2 +-
|
||||
tests/qemuxml2argvdata/hugepages-nvdimm.xml | 2 +-
|
||||
.../memfd-memory-default-hugepage.xml | 2 +-
|
||||
tests/qemuxml2argvdata/memfd-memory-numa.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-access.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-align.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-label.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-pmem.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-readonly.xml | 2 +-
|
||||
tests/qemuxml2argvdata/memory-hotplug-nvdimm.xml | 2 +-
|
||||
.../memory-hotplug-virtio-mem.xml | 2 +-
|
||||
.../memory-hotplug-virtio-pmem.xml | 2 +-
|
||||
.../cpu-numa-disjoint.x86_64-latest.xml | 2 +-
|
||||
.../cpu-numa-disordered.x86_64-latest.xml | 2 +-
|
||||
.../cpu-numa-memshared.x86_64-latest.xml | 2 +-
|
||||
.../cpu-numa-no-memory-element.x86_64-latest.xml | 2 +-
|
||||
.../cpu-numa1.x86_64-latest.xml | 2 +-
|
||||
.../cpu-numa2.x86_64-latest.xml | 2 +-
|
||||
.../memory-hotplug-dimm-addr.x86_64-latest.xml | 2 +-
|
||||
.../memory-hotplug-dimm.x86_64-latest.xml | 2 +-
|
||||
.../memory-hotplug-multiple.x86_64-latest.xml | 2 +-
|
||||
...plug-nvdimm-ppc64-abi-update.ppc64-latest.xml | 2 +-
|
||||
.../memory-hotplug-nvdimm-ppc64.ppc64-latest.xml | 2 +-
|
||||
.../memory-hotplug.x86_64-latest.xml | 2 +-
|
||||
...mad-auto-memory-vcpu-cpuset.x86_64-latest.xml | 2 +-
|
||||
...cpu-no-cpuset-and-placement.x86_64-latest.xml | 2 +-
|
||||
...numad-auto-vcpu-no-numatune.x86_64-latest.xml | 2 +-
|
||||
...mad-static-vcpu-no-numatune.x86_64-latest.xml | 2 +-
|
||||
.../pci-expander-bus.x86_64-latest.xml | 2 +-
|
||||
.../pcie-expander-bus.x86_64-latest.xml | 2 +-
|
||||
.../pseries-phb-numa-node.ppc64-latest.xml | 2 +-
|
||||
tests/vmx2xmldata/esx-in-the-wild-10.xml | 2 +-
|
||||
tests/vmx2xmldata/esx-in-the-wild-8.xml | 2 +-
|
||||
tests/vmx2xmldata/esx-in-the-wild-9.xml | 2 +-
|
||||
65 files changed, 97 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
|
||||
index 5b388c7a8f..d05b01ae5d 100644
|
||||
--- a/src/bhyve/bhyve_command.c
|
||||
+++ b/src/bhyve/bhyve_command.c
|
||||
@@ -672,6 +672,11 @@ virBhyveProcessBuildBhyveCmd(struct _bhyveConn *driver, virDomainDef *def,
|
||||
_("Only 1 die per socket is supported"));
|
||||
return NULL;
|
||||
}
|
||||
+ if (def->cpu->clusters != 1) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
+ _("Only 1 cluster per die is supported"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
if (nvcpus != def->cpu->sockets * def->cpu->cores * def->cpu->threads) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Invalid CPU topology: total number of vCPUs must equal the product of sockets, cores, and threads"));
|
||||
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
|
||||
index 7abe489733..6e6e1b9a89 100644
|
||||
--- a/src/conf/cpu_conf.c
|
||||
+++ b/src/conf/cpu_conf.c
|
||||
@@ -241,6 +241,7 @@ virCPUDefCopyWithoutModel(const virCPUDef *cpu)
|
||||
copy->fallback = cpu->fallback;
|
||||
copy->sockets = cpu->sockets;
|
||||
copy->dies = cpu->dies;
|
||||
+ copy->clusters = cpu->clusters;
|
||||
copy->cores = cpu->cores;
|
||||
copy->threads = cpu->threads;
|
||||
copy->arch = cpu->arch;
|
||||
@@ -572,6 +573,12 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (virXMLPropUIntDefault(topology, "clusters", 10,
|
||||
+ VIR_XML_PROP_NONZERO,
|
||||
+ &def->clusters, 1) < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
if (virXMLPropUInt(topology, "cores", 10,
|
||||
VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO,
|
||||
&def->cores) < 0) {
|
||||
@@ -827,10 +834,11 @@ virCPUDefFormatBuf(virBuffer *buf,
|
||||
virBufferAddLit(buf, "/>\n");
|
||||
}
|
||||
|
||||
- if (def->sockets && def->dies && def->cores && def->threads) {
|
||||
+ if (def->sockets && def->dies && def->clusters && def->cores && def->threads) {
|
||||
virBufferAddLit(buf, "<topology");
|
||||
virBufferAsprintf(buf, " sockets='%u'", def->sockets);
|
||||
virBufferAsprintf(buf, " dies='%u'", def->dies);
|
||||
+ virBufferAsprintf(buf, " clusters='%u'", def->clusters);
|
||||
virBufferAsprintf(buf, " cores='%u'", def->cores);
|
||||
virBufferAsprintf(buf, " threads='%u'", def->threads);
|
||||
virBufferAddLit(buf, "/>\n");
|
||||
@@ -1106,6 +1114,12 @@ virCPUDefIsEqual(virCPUDef *src,
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (src->clusters != dst->clusters) {
|
||||
+ MISMATCH(_("Target CPU clusters %1$d does not match source %2$d"),
|
||||
+ dst->clusters, src->clusters);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (src->cores != dst->cores) {
|
||||
MISMATCH(_("Target CPU cores %1$d does not match source %2$d"),
|
||||
dst->cores, src->cores);
|
||||
diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h
|
||||
index 3e4c53675c..2694022fed 100644
|
||||
--- a/src/conf/cpu_conf.h
|
||||
+++ b/src/conf/cpu_conf.h
|
||||
@@ -148,6 +148,7 @@ struct _virCPUDef {
|
||||
unsigned int microcodeVersion;
|
||||
unsigned int sockets;
|
||||
unsigned int dies;
|
||||
+ unsigned int clusters;
|
||||
unsigned int cores;
|
||||
unsigned int threads;
|
||||
unsigned int sigFamily;
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 5d55d2acda..6211d2a51b 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -2316,6 +2316,7 @@ virDomainDefGetVcpusTopology(const virDomainDef *def,
|
||||
|
||||
/* multiplication of 32bit numbers fits into a 64bit variable */
|
||||
if ((tmp *= def->cpu->dies) > UINT_MAX ||
|
||||
+ (tmp *= def->cpu->clusters) > UINT_MAX ||
|
||||
(tmp *= def->cpu->cores) > UINT_MAX ||
|
||||
(tmp *= def->cpu->threads) > UINT_MAX) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
diff --git a/src/conf/schemas/cputypes.rng b/src/conf/schemas/cputypes.rng
|
||||
index db1aa57158..3a8910e09f 100644
|
||||
--- a/src/conf/schemas/cputypes.rng
|
||||
+++ b/src/conf/schemas/cputypes.rng
|
||||
@@ -92,6 +92,11 @@
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
+ <optional>
|
||||
+ <attribute name="clusters">
|
||||
+ <ref name="positiveInteger"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
<attribute name="cores">
|
||||
<ref name="positiveInteger"/>
|
||||
</attribute>
|
||||
diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c
|
||||
index bc43aa4e93..4f048d0dad 100644
|
||||
--- a/src/cpu/cpu.c
|
||||
+++ b/src/cpu/cpu.c
|
||||
@@ -435,6 +435,7 @@ virCPUGetHost(virArch arch,
|
||||
if (nodeInfo) {
|
||||
cpu->sockets = nodeInfo->sockets;
|
||||
cpu->dies = 1;
|
||||
+ cpu->clusters = 1;
|
||||
cpu->cores = nodeInfo->cores;
|
||||
cpu->threads = nodeInfo->threads;
|
||||
}
|
||||
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
|
||||
index dfb602ca2f..522256777d 100644
|
||||
--- a/src/libxl/libxl_capabilities.c
|
||||
+++ b/src/libxl/libxl_capabilities.c
|
||||
@@ -152,6 +152,7 @@ libxlCapsInitCPU(virCaps *caps, libxl_physinfo *phy_info)
|
||||
cpu->cores = phy_info->cores_per_socket;
|
||||
cpu->threads = phy_info->threads_per_core;
|
||||
cpu->dies = 1;
|
||||
+ cpu->clusters = 1;
|
||||
cpu->sockets = phy_info->nr_cpus / (cpu->cores * cpu->threads);
|
||||
|
||||
if (!(data = libxlCapsNodeData(cpu, phy_info->hw_cap)) ||
|
||||
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||
index 653817173b..71daa85e55 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -7226,6 +7226,11 @@ qemuBuildSmpCommandLine(virCommand *cmd,
|
||||
_("Only 1 die per socket is supported"));
|
||||
return -1;
|
||||
}
|
||||
+ if (def->cpu->clusters != 1) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
+ _("Only 1 cluster per die is supported"));
|
||||
+ return -1;
|
||||
+ }
|
||||
virBufferAsprintf(&buf, ",sockets=%u", def->cpu->sockets);
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_DIES))
|
||||
virBufferAsprintf(&buf, ",dies=%u", def->cpu->dies);
|
||||
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
|
||||
index 26b89776e1..4ac2320251 100644
|
||||
--- a/src/vmx/vmx.c
|
||||
+++ b/src/vmx/vmx.c
|
||||
@@ -1583,6 +1583,7 @@ virVMXParseConfig(virVMXContext *ctx,
|
||||
goto cleanup;
|
||||
}
|
||||
cpu->dies = 1;
|
||||
+ cpu->clusters = 1;
|
||||
cpu->cores = coresPerSocket;
|
||||
cpu->threads = 1;
|
||||
|
||||
@@ -3377,6 +3378,12 @@ virVMXFormatConfig(virVMXContext *ctx, virDomainXMLOption *xmlopt, virDomainDef
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ if (def->cpu->clusters != 1) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
+ _("Only 1 cluster per die is supported"));
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
calculated_vcpus = def->cpu->sockets * def->cpu->cores;
|
||||
if (calculated_vcpus != maxvcpus) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
diff --git a/tests/cputestdata/x86_64-host+guest,model486-result.xml b/tests/cputestdata/x86_64-host+guest,model486-result.xml
|
||||
index ea8e2d3a48..b533f22b88 100644
|
||||
--- a/tests/cputestdata/x86_64-host+guest,model486-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host+guest,model486-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>486</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
<feature policy='require' name='de'/>
|
||||
<feature policy='require' name='tsc'/>
|
||||
<feature policy='require' name='msr'/>
|
||||
diff --git a/tests/cputestdata/x86_64-host+guest,models-result.xml b/tests/cputestdata/x86_64-host+guest,models-result.xml
|
||||
index 42664a48b4..e975d9bc18 100644
|
||||
--- a/tests/cputestdata/x86_64-host+guest,models-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host+guest,models-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
<feature policy='force' name='pbe'/>
|
||||
<feature policy='force' name='monitor'/>
|
||||
<feature policy='require' name='ssse3'/>
|
||||
diff --git a/tests/cputestdata/x86_64-host+guest-result.xml b/tests/cputestdata/x86_64-host+guest-result.xml
|
||||
index 28e3152cbf..cf41b3f872 100644
|
||||
--- a/tests/cputestdata/x86_64-host+guest-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host+guest-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Penryn</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
<feature policy='require' name='dca'/>
|
||||
<feature policy='require' name='xtpr'/>
|
||||
<feature policy='disable' name='sse4.2'/>
|
||||
diff --git a/tests/cputestdata/x86_64-host+guest.xml b/tests/cputestdata/x86_64-host+guest.xml
|
||||
index 28e3152cbf..cf41b3f872 100644
|
||||
--- a/tests/cputestdata/x86_64-host+guest.xml
|
||||
+++ b/tests/cputestdata/x86_64-host+guest.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Penryn</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
<feature policy='require' name='dca'/>
|
||||
<feature policy='require' name='xtpr'/>
|
||||
<feature policy='disable' name='sse4.2'/>
|
||||
diff --git a/tests/cputestdata/x86_64-host+host-model-nofallback.xml b/tests/cputestdata/x86_64-host+host-model-nofallback.xml
|
||||
index 16d6e1daf2..881eea7bd0 100644
|
||||
--- a/tests/cputestdata/x86_64-host+host-model-nofallback.xml
|
||||
+++ b/tests/cputestdata/x86_64-host+host-model-nofallback.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='forbid'>Penryn</model>
|
||||
<vendor>Intel</vendor>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
<feature policy='require' name='dca'/>
|
||||
<feature policy='require' name='xtpr'/>
|
||||
<feature policy='require' name='tm2'/>
|
||||
diff --git a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml
|
||||
index 8eda6684a0..67994c62cc 100644
|
||||
--- a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell,haswell-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Haswell</model>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='2'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='2'/>
|
||||
<feature policy='disable' name='rtm'/>
|
||||
<feature policy='disable' name='hle'/>
|
||||
</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml
|
||||
index cb02449d60..4804c0b818 100644
|
||||
--- a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Haswell</model>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='2'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='2'/>
|
||||
<feature policy='disable' name='hle'/>
|
||||
<feature policy='disable' name='rtm'/>
|
||||
</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml
|
||||
index 7ee926aba8..c21b331248 100644
|
||||
--- a/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host-Haswell-noTSX+Haswell-noTSX-result.xml
|
||||
@@ -1,4 +1,4 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Haswell-noTSX</model>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='2'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='2'/>
|
||||
</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-host-worse+guest-result.xml b/tests/cputestdata/x86_64-host-worse+guest-result.xml
|
||||
index 9d54c66a8f..712c3ad341 100644
|
||||
--- a/tests/cputestdata/x86_64-host-worse+guest-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-host-worse+guest-result.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>Penryn</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
<feature policy='disable' name='dca'/>
|
||||
<feature policy='disable' name='xtpr'/>
|
||||
<feature policy='disable' name='sse4.2'/>
|
||||
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
|
||||
index ad11b2f8a6..1a0d28257e 100644
|
||||
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
|
||||
@@ -44,7 +44,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='1' dies='1' cores='4' threads='8'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='8'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
|
||||
index 2a3b4a495f..b127883b36 100644
|
||||
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
|
||||
@@ -44,7 +44,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='1' dies='1' cores='4' threads='8'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='8'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
|
||||
index 34aec9b965..29f1a5ac45 100644
|
||||
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
|
||||
@@ -44,7 +44,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='1' dies='1' cores='4' threads='8'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='8'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
|
||||
index 5ce2cfd0b0..76a85ac9f0 100644
|
||||
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
|
||||
@@ -44,7 +44,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='1' dies='1' cores='4' threads='8'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='4' threads='8'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
|
||||
index 8d52ffedb4..bec46987ff 100644
|
||||
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
|
||||
@@ -20,7 +20,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='4' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
|
||||
index f416397e33..be9769c686 100644
|
||||
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
|
||||
@@ -20,7 +20,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='4' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
|
||||
index 0bd2af8e43..539f607818 100644
|
||||
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
|
||||
@@ -20,7 +20,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='4' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
|
||||
index b31e6ebe55..acbdd3cfd5 100644
|
||||
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
|
||||
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
|
||||
@@ -20,7 +20,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='4' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-password.xml b/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-password.xml
|
||||
index 03964ad01c..ee53339338 100644
|
||||
--- a/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-password.xml
|
||||
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout+graphics-spice-timeout-password.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<cpu mode='custom' match='exact' check='partial'>
|
||||
<model fallback='allow'>core2duo</model>
|
||||
<vendor>Intel</vendor>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
<feature policy='require' name='lahf_lm'/>
|
||||
<feature policy='require' name='xtpr'/>
|
||||
<feature policy='require' name='cx16'/>
|
||||
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout.xml b/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout.xml
|
||||
index e6b0cc833a..eb9b902fc5 100644
|
||||
--- a/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout.xml
|
||||
+++ b/tests/qemuhotplugtestdomains/qemuhotplug-graphics-spice-timeout.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<cpu mode='custom' match='exact' check='partial'>
|
||||
<model fallback='allow'>core2duo</model>
|
||||
<vendor>Intel</vendor>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
<feature policy='require' name='lahf_lm'/>
|
||||
<feature policy='require' name='xtpr'/>
|
||||
<feature policy='require' name='cx16'/>
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml b/tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml
|
||||
index 2090bb8288..92f418fb88 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-no-numa-topology.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='8' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='8' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology.xml b/tests/qemuxml2argvdata/fd-memory-numa-topology.xml
|
||||
index 2f94690656..543509d832 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology.xml
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='1' dies='1' cores='8' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='8' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology2.xml b/tests/qemuxml2argvdata/fd-memory-numa-topology2.xml
|
||||
index 3a4e9b478e..d3b98da3c6 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology2.xml
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology2.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='1' dies='1' cores='20' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='20' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7,16-19' memory='14680064' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='14680064' unit='KiB' memAccess='shared'/>
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology3.xml b/tests/qemuxml2argvdata/fd-memory-numa-topology3.xml
|
||||
index 0f7f74283b..459d1b9d1d 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology3.xml
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology3.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='1' dies='1' cores='32' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='32' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1,6-31' memory='14680064' unit='KiB'/>
|
||||
<cell id='1' cpus='2-3' memory='14680064' unit='KiB' memAccess='shared'/>
|
||||
diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.xml b/tests/qemuxml2argvdata/hugepages-nvdimm.xml
|
||||
index 1a1500895b..b786b0d3dd 100644
|
||||
--- a/tests/qemuxml2argvdata/hugepages-nvdimm.xml
|
||||
+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.xml
|
||||
@@ -17,7 +17,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.xml b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.xml
|
||||
index 238d4c6b52..a70bd53134 100644
|
||||
--- a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.xml
|
||||
+++ b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.xml
|
||||
@@ -19,7 +19,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='1' dies='1' cores='8' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='8' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.xml b/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
index 1ac87e3aef..0c5d7ba4ef 100644
|
||||
--- a/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
+++ b/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
@@ -22,7 +22,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='1' dies='1' cores='8' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='8' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='14680064' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.xml
|
||||
index bee0346aca..84baf82bf5 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
|
||||
index decf87db63..664418e805 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.xml
|
||||
index 8a0dab3908..f998f7f276 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
|
||||
index a712adfe1e..d66481fd35 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml
|
||||
index 57629ccb8c..56d6b7b712 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.xml b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.xml
|
||||
index 865ddcf0ea..ff6e3b7b0f 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
index c578209d8a..52fa6b14e9 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml
|
||||
index a8b22dd3c5..2786a739ad 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa-disjoint.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa-disjoint.x86_64-latest.xml
|
||||
index fa2ec31463..4f33094949 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa-disjoint.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa-disjoint.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-3,8-11' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='4-7,12-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa-disordered.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa-disordered.x86_64-latest.xml
|
||||
index 1b4d0bfa67..75dcb8c9e2 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa-disordered.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa-disordered.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-5' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='11-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa-memshared.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa-memshared.x86_64-latest.xml
|
||||
index 47ed9efd69..c45e295921 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa-memshared.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa-memshared.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB' memAccess='shared'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB' memAccess='private'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa-no-memory-element.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa-no-memory-element.x86_64-latest.xml
|
||||
index 57bbacdff0..663d137ff5 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa-no-memory-element.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa-no-memory-element.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa1.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa1.x86_64-latest.xml
|
||||
index 57bbacdff0..663d137ff5 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa1.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa1.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/cpu-numa2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/cpu-numa2.x86_64-latest.xml
|
||||
index 57bbacdff0..663d137ff5 100644
|
||||
--- a/tests/qemuxml2xmloutdata/cpu-numa2.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/cpu-numa2.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-dimm-addr.x86_64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug-dimm-addr.x86_64-latest.xml
|
||||
index 0a32d5491a..38b41e6719 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug-dimm-addr.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-dimm-addr.x86_64-latest.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-dimm.x86_64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug-dimm.x86_64-latest.xml
|
||||
index 7c1b7b2c5d..7f0dc85c0e 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug-dimm.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-dimm.x86_64-latest.xml
|
||||
@@ -15,7 +15,7 @@
|
||||
</idmap>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-multiple.x86_64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug-multiple.x86_64-latest.xml
|
||||
index 42b0f7b880..b3306fb569 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug-multiple.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-multiple.x86_64-latest.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='2095104' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.xml
|
||||
index ae157c4849..4cc0c674df 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.xml
|
||||
index 3c1cbc731d..a5c26e3c5b 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='1048576' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/memory-hotplug.x86_64-latest.xml b/tests/qemuxml2xmloutdata/memory-hotplug.x86_64-latest.xml
|
||||
index 083102e8d6..697819387f 100644
|
||||
--- a/tests/qemuxml2xmloutdata/memory-hotplug.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/memory-hotplug.x86_64-latest.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-1' memory='219136' unit='KiB'/>
|
||||
</numa>
|
||||
diff --git a/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.xml b/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.xml
|
||||
index 2d04bc23c2..6068a76464 100644
|
||||
--- a/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.xml
|
||||
@@ -13,7 +13,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.xml b/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.xml
|
||||
index 80f7284126..6c558526e9 100644
|
||||
--- a/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.xml
|
||||
@@ -13,7 +13,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuxml2xmloutdata/numad-auto-vcpu-no-numatune.x86_64-latest.xml b/tests/qemuxml2xmloutdata/numad-auto-vcpu-no-numatune.x86_64-latest.xml
|
||||
index 724209f6e3..6e1fecb488 100644
|
||||
--- a/tests/qemuxml2xmloutdata/numad-auto-vcpu-no-numatune.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/numad-auto-vcpu-no-numatune.x86_64-latest.xml
|
||||
@@ -13,7 +13,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuxml2xmloutdata/numad-static-vcpu-no-numatune.x86_64-latest.xml b/tests/qemuxml2xmloutdata/numad-static-vcpu-no-numatune.x86_64-latest.xml
|
||||
index 2a4ee0d496..c42d7066f9 100644
|
||||
--- a/tests/qemuxml2xmloutdata/numad-static-vcpu-no-numatune.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/numad-static-vcpu-no-numatune.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='1'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/qemuxml2xmloutdata/pci-expander-bus.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pci-expander-bus.x86_64-latest.xml
|
||||
index b63c8c145a..2a6c329a40 100644
|
||||
--- a/tests/qemuxml2xmloutdata/pci-expander-bus.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/pci-expander-bus.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/pcie-expander-bus.x86_64-latest.xml b/tests/qemuxml2xmloutdata/pcie-expander-bus.x86_64-latest.xml
|
||||
index a441be8ebe..99612740b2 100644
|
||||
--- a/tests/qemuxml2xmloutdata/pcie-expander-bus.x86_64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/pcie-expander-bus.x86_64-latest.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>qemu64</model>
|
||||
- <topology sockets='2' dies='1' cores='4' threads='2'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='4' threads='2'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
|
||||
<cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
|
||||
diff --git a/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml b/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
|
||||
index 59015846fb..0a044f50b0 100644
|
||||
--- a/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
|
||||
+++ b/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
|
||||
@@ -14,7 +14,7 @@
|
||||
</os>
|
||||
<cpu mode='custom' match='exact' check='none'>
|
||||
<model fallback='forbid'>POWER9</model>
|
||||
- <topology sockets='2' dies='1' cores='1' threads='4'/>
|
||||
+ <topology sockets='2' dies='1' clusters='1' cores='1' threads='4'/>
|
||||
<numa>
|
||||
<cell id='0' cpus='0-3' memory='1048576' unit='KiB'/>
|
||||
<cell id='1' cpus='4-7' memory='1048576' unit='KiB'/>
|
||||
diff --git a/tests/vmx2xmldata/esx-in-the-wild-10.xml b/tests/vmx2xmldata/esx-in-the-wild-10.xml
|
||||
index 47ed637920..78129682bd 100644
|
||||
--- a/tests/vmx2xmldata/esx-in-the-wild-10.xml
|
||||
+++ b/tests/vmx2xmldata/esx-in-the-wild-10.xml
|
||||
@@ -12,7 +12,7 @@
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<cpu>
|
||||
- <topology sockets='1' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='1' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/vmx2xmldata/esx-in-the-wild-8.xml b/tests/vmx2xmldata/esx-in-the-wild-8.xml
|
||||
index 0eea610709..47d22ced2a 100644
|
||||
--- a/tests/vmx2xmldata/esx-in-the-wild-8.xml
|
||||
+++ b/tests/vmx2xmldata/esx-in-the-wild-8.xml
|
||||
@@ -11,7 +11,7 @@
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<cpu>
|
||||
- <topology sockets='4' dies='1' cores='2' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='2' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
diff --git a/tests/vmx2xmldata/esx-in-the-wild-9.xml b/tests/vmx2xmldata/esx-in-the-wild-9.xml
|
||||
index 66eca400dd..ee6be2527f 100644
|
||||
--- a/tests/vmx2xmldata/esx-in-the-wild-9.xml
|
||||
+++ b/tests/vmx2xmldata/esx-in-the-wild-9.xml
|
||||
@@ -12,7 +12,7 @@
|
||||
<type arch='x86_64'>hvm</type>
|
||||
</os>
|
||||
<cpu>
|
||||
- <topology sockets='4' dies='1' cores='4' threads='1'/>
|
||||
+ <topology sockets='4' dies='1' clusters='1' cores='4' threads='1'/>
|
||||
</cpu>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
--
|
||||
2.43.0
|
@ -1,152 +0,0 @@
|
||||
From de94232ffb9eef84bb72631979f59bbadfc3cb9e Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <de94232ffb9eef84bb72631979f59bbadfc3cb9e.1707394626.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Thu, 4 Jan 2024 10:03:36 +0100
|
||||
Subject: [PATCH] conf: Introduce dynamicMemslots attribute for virtio-mem
|
||||
|
||||
Introduced in v8.2.0-rc0~74^2~2, QEMU now allows setting
|
||||
.dynamic-memslots attribute for virtio-mem-pci devices. When
|
||||
turned on, it allows memory exposed to guest to be split into
|
||||
multiple memslots and thus smaller memory footprint (see the
|
||||
original commit for detailed explanation).
|
||||
|
||||
Therefore, introduce new <target/> attribute which will control
|
||||
that QEMU knob.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 53258205854e649bc82310542373df004a4734ab)
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-15316
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
docs/formatdomain.rst | 13 +++++++++++++
|
||||
src/conf/domain_conf.c | 18 +++++++++++++++++-
|
||||
src/conf/domain_conf.h | 1 +
|
||||
src/conf/schemas/domaincommon.rng | 5 +++++
|
||||
.../memory-hotplug-virtio-mem.xml | 2 +-
|
||||
5 files changed, 37 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
|
||||
index 298ad46a45..34b2564909 100644
|
||||
--- a/docs/formatdomain.rst
|
||||
+++ b/docs/formatdomain.rst
|
||||
@@ -8437,6 +8437,19 @@ Example: usage of the memory devices
|
||||
The ``node`` subelement configures the guest NUMA node to attach the memory
|
||||
to. The element shall be used only if the guest has NUMA nodes configured.
|
||||
|
||||
+ For ``virtio-mem`` optional attribute ``dynamicMemslots`` can be specified
|
||||
+ (accepted values "yes"/"no") which allows hypervisor to spread memory into
|
||||
+ multiple memory slots (allocate them dynamically based on the amount of
|
||||
+ memory exposed to the guest), resulting in smaller memory footprint. But be
|
||||
+ aware this may affect vhost-user devices. When enabled, older vhost-user
|
||||
+ device implementations (such as virtiofs) may refuse to initialize resulting
|
||||
+ in failed domain startup or device hotplug. When only modern vhost-user
|
||||
+ based devices will be used or when no vhost-user devices are expected to be
|
||||
+ used it's beneficial to enable this feature. The current default is
|
||||
+ hypervisor dependant (for QEMU is "no"). If the default changes and you are
|
||||
+ having difficulties with vhost-user devices, try toggling this to "no".
|
||||
+ :since:`Since 10.1.0 and QEMU 8.2.0`
|
||||
+
|
||||
The following optional elements may be used:
|
||||
|
||||
``label``
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 6211d2a51b..ac06fa39f6 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -13543,6 +13543,10 @@ virDomainMemoryTargetDefParseXML(xmlNodePtr node,
|
||||
&def->target.virtio_mem.requestedsize, false, false) < 0)
|
||||
return -1;
|
||||
|
||||
+ if (virXMLPropTristateBool(node, "dynamicMemslots", VIR_XML_PROP_NONE,
|
||||
+ &def->target.virtio_mem.dynamicMemslots) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
addrNode = virXPathNode("./address", ctxt);
|
||||
addr = &def->target.virtio_mem.address;
|
||||
break;
|
||||
@@ -21217,6 +21221,12 @@ virDomainMemoryDefCheckABIStability(virDomainMemoryDef *src,
|
||||
src->target.virtio_mem.address);
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ if (src->target.virtio_mem.dynamicMemslots != dst->target.virtio_mem.dynamicMemslots) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
+ _("Target memory device 'dynamicMemslots' property doesn't match source memory device"));
|
||||
+ return false;
|
||||
+ }
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_MEMORY_MODEL_DIMM:
|
||||
@@ -25432,6 +25442,7 @@ virDomainMemoryTargetDefFormat(virBuffer *buf,
|
||||
unsigned int flags)
|
||||
{
|
||||
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
|
||||
+ g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
virBufferAsprintf(&childBuf, "<size unit='KiB'>%llu</size>\n", def->size);
|
||||
if (def->targetNode >= 0)
|
||||
@@ -25471,6 +25482,11 @@ virDomainMemoryTargetDefFormat(virBuffer *buf,
|
||||
if (def->target.virtio_mem.address)
|
||||
virBufferAsprintf(&childBuf, "<address base='0x%llx'/>\n",
|
||||
def->target.virtio_mem.address);
|
||||
+
|
||||
+ if (def->target.virtio_mem.dynamicMemslots) {
|
||||
+ virBufferAsprintf(&attrBuf, " dynamicMemslots='%s'",
|
||||
+ virTristateBoolTypeToString(def->target.virtio_mem.dynamicMemslots));
|
||||
+ }
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_MEMORY_MODEL_SGX_EPC:
|
||||
@@ -25480,7 +25496,7 @@ virDomainMemoryTargetDefFormat(virBuffer *buf,
|
||||
break;
|
||||
}
|
||||
|
||||
- virXMLFormatElement(buf, "target", NULL, &childBuf);
|
||||
+ virXMLFormatElement(buf, "target", &attrBuf, &childBuf);
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||
index d176bda5f8..bd283d42df 100644
|
||||
--- a/src/conf/domain_conf.h
|
||||
+++ b/src/conf/domain_conf.h
|
||||
@@ -2676,6 +2676,7 @@ struct _virDomainMemoryDef {
|
||||
unsigned long long currentsize; /* kibibytes, valid for an active
|
||||
domain only and parsed */
|
||||
unsigned long long address; /* address where memory is mapped */
|
||||
+ virTristateBool dynamicMemslots;
|
||||
} virtio_mem;
|
||||
struct {
|
||||
} sgx_epc;
|
||||
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
|
||||
index a34427c330..df44cd9857 100644
|
||||
--- a/src/conf/schemas/domaincommon.rng
|
||||
+++ b/src/conf/schemas/domaincommon.rng
|
||||
@@ -7268,6 +7268,11 @@
|
||||
|
||||
<define name="memorydev-target">
|
||||
<element name="target">
|
||||
+ <optional>
|
||||
+ <attribute name="dynamicMemslots">
|
||||
+ <ref name="virYesNo"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
<interleave>
|
||||
<element name="size">
|
||||
<ref name="scaledInteger"/>
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
index 52fa6b14e9..20282a131b 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.xml
|
||||
@@ -60,7 +60,7 @@
|
||||
<nodemask>1-3</nodemask>
|
||||
<pagesize unit='KiB'>2048</pagesize>
|
||||
</source>
|
||||
- <target>
|
||||
+ <target dynamicMemslots='yes'>
|
||||
<size unit='KiB'>2097152</size>
|
||||
<node>0</node>
|
||||
<block unit='KiB'>2048</block>
|
||||
--
|
||||
2.43.0
|
155
SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch
Normal file
155
SOURCES/libvirt-conf-Introduce-memory-allocation-threads.patch
Normal file
@ -0,0 +1,155 @@
|
||||
From 19f7e6dc950baf346738f462ac5c6b815c04edcc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <19f7e6dc950baf346738f462ac5c6b815c04edcc@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Mon, 21 Mar 2022 16:49:25 +0100
|
||||
Subject: [PATCH] conf: Introduce memory allocation threads
|
||||
|
||||
Since its v5.0.0 release QEMU is capable of specifying number of
|
||||
threads used to allocate memory. It defaults to 1, which may be
|
||||
too low for humongous guests with gigantic pages.
|
||||
|
||||
In general, on QEMU cmd line level it is possible to use
|
||||
different number of threads per each memory-backend-* object, in
|
||||
practical terms it's not useful. Therefore, use <memoryBacking/>
|
||||
to set guest wide value and let all memory devices 'inherit' it,
|
||||
silently. IOW, don't introduce per device knob because that would
|
||||
only complicate things for a little or no benefit.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
(cherry picked from commit ba7f98126fa84d354ce72929b77cc111a9a557a9)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2067126
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
docs/formatdomain.rst | 8 +++++---
|
||||
docs/schemas/domaincommon.rng | 19 +++++++++++++------
|
||||
src/conf/domain_conf.c | 15 ++++++++++++++-
|
||||
src/conf/domain_conf.h | 1 +
|
||||
tests/qemuxml2argvdata/memfd-memory-numa.xml | 2 +-
|
||||
5 files changed, 34 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
|
||||
index 8128e43da4..17e89a0c0d 100644
|
||||
--- a/docs/formatdomain.rst
|
||||
+++ b/docs/formatdomain.rst
|
||||
@@ -977,7 +977,7 @@ Memory Backing
|
||||
<locked/>
|
||||
<source type="file|anonymous|memfd"/>
|
||||
<access mode="shared|private"/>
|
||||
- <allocation mode="immediate|ondemand"/>
|
||||
+ <allocation mode="immediate|ondemand" threads='8'/>
|
||||
<discard/>
|
||||
</memoryBacking>
|
||||
...
|
||||
@@ -1026,8 +1026,10 @@ influence how virtual memory pages are backed by host pages.
|
||||
Using the ``mode`` attribute, specify if the memory is to be "shared" or
|
||||
"private". This can be overridden per numa node by ``memAccess``.
|
||||
``allocation``
|
||||
- Using the ``mode`` attribute, specify when to allocate the memory by
|
||||
- supplying either "immediate" or "ondemand".
|
||||
+ Using the optional ``mode`` attribute, specify when to allocate the memory by
|
||||
+ supplying either "immediate" or "ondemand". :since:`Since 8.2.0` it is
|
||||
+ possible to set the number of threads that hypervisor uses to allocate
|
||||
+ memory via ``threads`` attribute.
|
||||
``discard``
|
||||
When set and supported by hypervisor the memory content is discarded just
|
||||
before guest shuts down (or when DIMM module is unplugged). Please note that
|
||||
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
|
||||
index 7fa5c2b8b5..c9c1529979 100644
|
||||
--- a/docs/schemas/domaincommon.rng
|
||||
+++ b/docs/schemas/domaincommon.rng
|
||||
@@ -745,12 +745,19 @@
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="allocation">
|
||||
- <attribute name="mode">
|
||||
- <choice>
|
||||
- <value>immediate</value>
|
||||
- <value>ondemand</value>
|
||||
- </choice>
|
||||
- </attribute>
|
||||
+ <optional>
|
||||
+ <attribute name="mode">
|
||||
+ <choice>
|
||||
+ <value>immediate</value>
|
||||
+ <value>ondemand</value>
|
||||
+ </choice>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
+ <optional>
|
||||
+ <attribute name="threads">
|
||||
+ <ref name="unsignedInt"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 5691b8d2d5..805a15848e 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -19095,6 +19095,13 @@ virDomainDefParseMemory(virDomainDef *def,
|
||||
VIR_FREE(tmp);
|
||||
}
|
||||
|
||||
+ if (virXPathUInt("string(./memoryBacking/allocation/@threads)",
|
||||
+ ctxt, &def->mem.allocation_threads) == -2) {
|
||||
+ virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
+ _("Failed to parse memory allocation threads"));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
if (virXPathNode("./memoryBacking/hugepages", ctxt)) {
|
||||
/* hugepages will be used */
|
||||
if ((n = virXPathNodeSet("./memoryBacking/hugepages/page", ctxt, &nodes)) < 0) {
|
||||
@@ -27639,6 +27646,7 @@ virDomainMemorybackingFormat(virBuffer *buf,
|
||||
const virDomainMemtune *mem)
|
||||
{
|
||||
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
|
||||
+ g_auto(virBuffer) allocAttrBuf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
if (mem->nhugepages)
|
||||
virDomainHugepagesFormat(&childBuf, mem->hugepages, mem->nhugepages);
|
||||
@@ -27653,8 +27661,13 @@ virDomainMemorybackingFormat(virBuffer *buf,
|
||||
virBufferAsprintf(&childBuf, "<access mode='%s'/>\n",
|
||||
virDomainMemoryAccessTypeToString(mem->access));
|
||||
if (mem->allocation)
|
||||
- virBufferAsprintf(&childBuf, "<allocation mode='%s'/>\n",
|
||||
+ virBufferAsprintf(&allocAttrBuf, " mode='%s'",
|
||||
virDomainMemoryAllocationTypeToString(mem->allocation));
|
||||
+ if (mem->allocation_threads > 0)
|
||||
+ virBufferAsprintf(&allocAttrBuf, " threads='%u'", mem->allocation_threads);
|
||||
+
|
||||
+ virXMLFormatElement(&childBuf, "allocation", &allocAttrBuf, NULL);
|
||||
+
|
||||
if (mem->discard)
|
||||
virBufferAddLit(&childBuf, "<discard/>\n");
|
||||
|
||||
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||
index 144ba4dd12..10af94e2e4 100644
|
||||
--- a/src/conf/domain_conf.h
|
||||
+++ b/src/conf/domain_conf.h
|
||||
@@ -2677,6 +2677,7 @@ struct _virDomainMemtune {
|
||||
int source; /* enum virDomainMemorySource */
|
||||
int access; /* enum virDomainMemoryAccess */
|
||||
int allocation; /* enum virDomainMemoryAllocation */
|
||||
+ unsigned int allocation_threads;
|
||||
|
||||
virTristateBool discard;
|
||||
};
|
||||
diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.xml b/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
index 1ebcee8939..1ac87e3aef 100644
|
||||
--- a/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
+++ b/tests/qemuxml2argvdata/memfd-memory-numa.xml
|
||||
@@ -10,7 +10,7 @@
|
||||
</hugepages>
|
||||
<source type='memfd'/>
|
||||
<access mode='shared'/>
|
||||
- <allocation mode='immediate'/>
|
||||
+ <allocation mode='immediate' threads='8'/>
|
||||
</memoryBacking>
|
||||
<vcpu placement='static'>8</vcpu>
|
||||
<numatune>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 666b68a93006c4299747d159bcacb7164b8c5d91 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <666b68a93006c4299747d159bcacb7164b8c5d91@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Thu, 24 Nov 2022 10:28:59 +0100
|
||||
Subject: [PATCH] conf: Make VIR_DOMAIN_NET_TYPE_ETHERNET not share 'host view'
|
||||
|
||||
When setting up QoS for a domain <interface/>, or when reporting
|
||||
its statistics we may need to swap TX/RX values. This is all
|
||||
explained in comment to virDomainNetTypeSharesHostView().
|
||||
However, this function claims that VIR_DOMAIN_NET_TYPE_ETHERNET
|
||||
also shares the 'host view', meaning the TX/RX values must be
|
||||
swapped. But that's not true.
|
||||
|
||||
An easy reproducer is to start a domain with two <interface/>-s:
|
||||
one type of network, the other of type ethernet and configure the
|
||||
same <bandwidth/> for both. Reversed setting can then be observed
|
||||
(e.g. via tc).
|
||||
|
||||
Reported-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com>
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
(cherry picked from commit 0862cb3ce46253a58ca02d36b2b6a6397a60bfc7)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2172578
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/conf/domain_conf.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 401ddaa1a0..427e7d1bb5 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -30472,9 +30472,9 @@ virDomainNetTypeSharesHostView(const virDomainNetDef *net)
|
||||
virDomainNetType actualType = virDomainNetGetActualType(net);
|
||||
switch (actualType) {
|
||||
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
||||
- case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||
return true;
|
||||
case VIR_DOMAIN_NET_TYPE_USER:
|
||||
+ case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
||||
case VIR_DOMAIN_NET_TYPE_SERVER:
|
||||
case VIR_DOMAIN_NET_TYPE_CLIENT:
|
||||
--
|
||||
2.39.2
|
||||
|
@ -0,0 +1,91 @@
|
||||
From 00c5cab2b92b653edbf491d9ef60359578c3d59a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <00c5cab2b92b653edbf491d9ef60359578c3d59a@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 11 May 2022 16:27:18 +0200
|
||||
Subject: [PATCH] conf: Move virDomainObj::originalMemlock into
|
||||
qemuDomainObjPrivate
|
||||
|
||||
Since v1.3.0-90-gafbe1d4c56 the original value of memlock limit
|
||||
is stored inside virDomainObj struct directly (under
|
||||
originalMemlock member). This is needless because the value is
|
||||
used only inside QEMU driver and thus can reside in
|
||||
qemuDomainObjPrivate struct.
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 75df6d2c291c48d65c1e54dd93e3d2d3cb0712e7)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2089433
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/conf/domain_conf.h | 3 ---
|
||||
src/qemu/qemu_domain.c | 9 +++++----
|
||||
src/qemu/qemu_domain.h | 3 +++
|
||||
3 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||
index d0d0fdc815..45976beb2b 100644
|
||||
--- a/src/conf/domain_conf.h
|
||||
+++ b/src/conf/domain_conf.h
|
||||
@@ -3031,9 +3031,6 @@ struct _virDomainObj {
|
||||
int taint;
|
||||
size_t ndeprecations;
|
||||
char **deprecations;
|
||||
-
|
||||
- unsigned long long originalMemlock; /* Original RLIMIT_MEMLOCK, zero if no
|
||||
- * restore will be required later */
|
||||
};
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainObj, virObjectUnref);
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index 40fe9985e6..86d673dafa 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -9269,6 +9269,7 @@ int
|
||||
qemuDomainAdjustMaxMemLock(virDomainObj *vm,
|
||||
bool forceVFIO)
|
||||
{
|
||||
+ qemuDomainObjPrivate *priv = vm->privateData;
|
||||
unsigned long long currentMemLock = 0;
|
||||
unsigned long long desiredMemLock = 0;
|
||||
|
||||
@@ -9281,8 +9282,8 @@ qemuDomainAdjustMaxMemLock(virDomainObj *vm,
|
||||
/* If this is the first time adjusting the limit, save the current
|
||||
* value so that we can restore it once memory locking is no longer
|
||||
* required */
|
||||
- if (vm->originalMemlock == 0) {
|
||||
- vm->originalMemlock = currentMemLock;
|
||||
+ if (priv->originalMemlock == 0) {
|
||||
+ priv->originalMemlock = currentMemLock;
|
||||
}
|
||||
} else {
|
||||
/* If the limit is already high enough, we can assume
|
||||
@@ -9295,8 +9296,8 @@ qemuDomainAdjustMaxMemLock(virDomainObj *vm,
|
||||
} else {
|
||||
/* Once memory locking is no longer required, we can restore the
|
||||
* original, usually very low, limit */
|
||||
- desiredMemLock = vm->originalMemlock;
|
||||
- vm->originalMemlock = 0;
|
||||
+ desiredMemLock = priv->originalMemlock;
|
||||
+ priv->originalMemlock = 0;
|
||||
}
|
||||
|
||||
if (desiredMemLock > 0 &&
|
||||
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
|
||||
index e5046367e3..e9497d20de 100644
|
||||
--- a/src/qemu/qemu_domain.h
|
||||
+++ b/src/qemu/qemu_domain.h
|
||||
@@ -241,6 +241,9 @@ struct _qemuDomainObjPrivate {
|
||||
GSList *dbusVMStateIds;
|
||||
/* true if -object dbus-vmstate was added */
|
||||
bool dbusVMState;
|
||||
+
|
||||
+ unsigned long long originalMemlock; /* Original RLIMIT_MEMLOCK, zero if no
|
||||
+ * restore will be required later */
|
||||
};
|
||||
|
||||
#define QEMU_DOMAIN_PRIVATE(vm) \
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,684 +0,0 @@
|
||||
From 130768f856aef1a4fa09a4654fd5ddcaad985795 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <130768f856aef1a4fa09a4654fd5ddcaad985795.1706524416.git.jdenemar@redhat.com>
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 16:03:54 +0100
|
||||
Subject: [PATCH] conf: Report CPU clusters in capabilities XML
|
||||
|
||||
For machines that don't expose useful information through sysfs,
|
||||
the dummy ID 0 is used.
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 5fc56aefb67a085a2f0fd3d2a157c7c029d2ef60)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/conf/capabilities.c | 5 +-
|
||||
src/conf/capabilities.h | 1 +
|
||||
src/conf/schemas/capability.rng | 3 ++
|
||||
src/libvirt_linux.syms | 1 +
|
||||
src/util/virhostcpu.c | 22 +++++++++
|
||||
src/util/virhostcpu.h | 1 +
|
||||
tests/capabilityschemadata/caps-qemu-kvm.xml | 32 ++++++-------
|
||||
.../vircaps-aarch64-basic-clusters.xml | 16 +++----
|
||||
.../vircaps2xmldata/vircaps-aarch64-basic.xml | 32 ++++++-------
|
||||
.../vircaps-x86_64-basic-dies.xml | 24 +++++-----
|
||||
.../vircaps2xmldata/vircaps-x86_64-basic.xml | 32 ++++++-------
|
||||
.../vircaps2xmldata/vircaps-x86_64-caches.xml | 16 +++----
|
||||
tests/vircaps2xmldata/vircaps-x86_64-hmat.xml | 48 +++++++++----------
|
||||
.../vircaps-x86_64-resctrl-cdp.xml | 24 +++++-----
|
||||
.../vircaps-x86_64-resctrl-cmt.xml | 24 +++++-----
|
||||
.../vircaps-x86_64-resctrl-fake-feature.xml | 24 +++++-----
|
||||
.../vircaps-x86_64-resctrl-skx-twocaches.xml | 2 +-
|
||||
.../vircaps-x86_64-resctrl-skx.xml | 2 +-
|
||||
.../vircaps-x86_64-resctrl.xml | 24 +++++-----
|
||||
19 files changed, 182 insertions(+), 151 deletions(-)
|
||||
|
||||
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
|
||||
index 32badee7b3..02298e40a3 100644
|
||||
--- a/src/conf/capabilities.c
|
||||
+++ b/src/conf/capabilities.c
|
||||
@@ -811,9 +811,10 @@ virCapsHostNUMACellCPUFormat(virBuffer *buf,
|
||||
return -1;
|
||||
|
||||
virBufferAsprintf(&childBuf,
|
||||
- " socket_id='%d' die_id='%d' core_id='%d' siblings='%s'",
|
||||
+ " socket_id='%d' die_id='%d' cluster_id='%d' core_id='%d' siblings='%s'",
|
||||
cpus[j].socket_id,
|
||||
cpus[j].die_id,
|
||||
+ cpus[j].cluster_id,
|
||||
cpus[j].core_id,
|
||||
siblings);
|
||||
}
|
||||
@@ -1453,6 +1454,7 @@ virCapabilitiesFillCPUInfo(int cpu_id G_GNUC_UNUSED,
|
||||
|
||||
if (virHostCPUGetSocket(cpu_id, &cpu->socket_id) < 0 ||
|
||||
virHostCPUGetDie(cpu_id, &cpu->die_id) < 0 ||
|
||||
+ virHostCPUGetCluster(cpu_id, &cpu->cluster_id) < 0 ||
|
||||
virHostCPUGetCore(cpu_id, &cpu->core_id) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -1712,6 +1714,7 @@ virCapabilitiesHostNUMAInitFake(virCapsHostNUMA *caps)
|
||||
if (tmp) {
|
||||
cpus[cid].id = id;
|
||||
cpus[cid].die_id = 0;
|
||||
+ cpus[cid].cluster_id = 0;
|
||||
cpus[cid].socket_id = s;
|
||||
cpus[cid].core_id = c;
|
||||
cpus[cid].siblings = virBitmapNewCopy(siblings);
|
||||
diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h
|
||||
index 9eaf6e2807..52e395de14 100644
|
||||
--- a/src/conf/capabilities.h
|
||||
+++ b/src/conf/capabilities.h
|
||||
@@ -89,6 +89,7 @@ struct _virCapsHostNUMACellCPU {
|
||||
unsigned int id;
|
||||
unsigned int socket_id;
|
||||
unsigned int die_id;
|
||||
+ unsigned int cluster_id;
|
||||
unsigned int core_id;
|
||||
virBitmap *siblings;
|
||||
};
|
||||
diff --git a/src/conf/schemas/capability.rng b/src/conf/schemas/capability.rng
|
||||
index b1968df258..a1606941e7 100644
|
||||
--- a/src/conf/schemas/capability.rng
|
||||
+++ b/src/conf/schemas/capability.rng
|
||||
@@ -201,6 +201,9 @@
|
||||
<attribute name="die_id">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
+ <attribute name="cluster_id">
|
||||
+ <ref name="unsignedInt"/>
|
||||
+ </attribute>
|
||||
<attribute name="core_id">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
diff --git a/src/libvirt_linux.syms b/src/libvirt_linux.syms
|
||||
index 55649ae39c..004cbfee97 100644
|
||||
--- a/src/libvirt_linux.syms
|
||||
+++ b/src/libvirt_linux.syms
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
# util/virhostcpu.h
|
||||
+virHostCPUGetCluster;
|
||||
virHostCPUGetCore;
|
||||
virHostCPUGetDie;
|
||||
virHostCPUGetInfoPopulateLinux;
|
||||
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
|
||||
index 4027547e1e..a3781ca870 100644
|
||||
--- a/src/util/virhostcpu.c
|
||||
+++ b/src/util/virhostcpu.c
|
||||
@@ -232,6 +232,28 @@ virHostCPUGetDie(unsigned int cpu, unsigned int *die)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int
|
||||
+virHostCPUGetCluster(unsigned int cpu, unsigned int *cluster)
|
||||
+{
|
||||
+ int cluster_id;
|
||||
+ int ret = virFileReadValueInt(&cluster_id,
|
||||
+ "%s/cpu/cpu%u/topology/cluster_id",
|
||||
+ SYSFS_SYSTEM_PATH, cpu);
|
||||
+
|
||||
+ if (ret == -1)
|
||||
+ return -1;
|
||||
+
|
||||
+ /* If the file doesn't exists (old kernel) or the value contained
|
||||
+ * in it is -1 (architecture without CPU clusters), report 0 to
|
||||
+ * indicate the lack of information */
|
||||
+ if (ret == -2 || cluster_id < 0)
|
||||
+ cluster_id = 0;
|
||||
+
|
||||
+ *cluster = cluster_id;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int
|
||||
virHostCPUGetCore(unsigned int cpu, unsigned int *core)
|
||||
{
|
||||
diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h
|
||||
index 5f0d43e069..d7e09bff22 100644
|
||||
--- a/src/util/virhostcpu.h
|
||||
+++ b/src/util/virhostcpu.h
|
||||
@@ -68,6 +68,7 @@ int virHostCPUStatsAssign(virNodeCPUStatsPtr param,
|
||||
#ifdef __linux__
|
||||
int virHostCPUGetSocket(unsigned int cpu, unsigned int *socket);
|
||||
int virHostCPUGetDie(unsigned int cpu, unsigned int *die);
|
||||
+int virHostCPUGetCluster(unsigned int cpu, unsigned int *cluster);
|
||||
int virHostCPUGetCore(unsigned int cpu, unsigned int *core);
|
||||
|
||||
virBitmap *virHostCPUGetSiblingsList(unsigned int cpu);
|
||||
diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml
|
||||
index acdbb362cc..317fa0885f 100644
|
||||
--- a/tests/capabilityschemadata/caps-qemu-kvm.xml
|
||||
+++ b/tests/capabilityschemadata/caps-qemu-kvm.xml
|
||||
@@ -64,14 +64,14 @@
|
||||
<sibling id='1' value='21'/>
|
||||
</distances>
|
||||
<cpus num='8'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='1' siblings='2'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='2' siblings='4'/>
|
||||
- <cpu id='6' socket_id='0' die_id='0' core_id='3' siblings='6'/>
|
||||
- <cpu id='8' socket_id='0' die_id='0' core_id='4' siblings='8'/>
|
||||
- <cpu id='10' socket_id='0' die_id='0' core_id='5' siblings='10'/>
|
||||
- <cpu id='12' socket_id='0' die_id='0' core_id='6' siblings='12'/>
|
||||
- <cpu id='14' socket_id='0' die_id='0' core_id='7' siblings='14'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='2'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='4'/>
|
||||
+ <cpu id='6' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='6'/>
|
||||
+ <cpu id='8' socket_id='0' die_id='0' cluster_id='0' core_id='4' siblings='8'/>
|
||||
+ <cpu id='10' socket_id='0' die_id='0' cluster_id='0' core_id='5' siblings='10'/>
|
||||
+ <cpu id='12' socket_id='0' die_id='0' cluster_id='0' core_id='6' siblings='12'/>
|
||||
+ <cpu id='14' socket_id='0' die_id='0' cluster_id='0' core_id='7' siblings='14'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -84,14 +84,14 @@
|
||||
<sibling id='1' value='10'/>
|
||||
</distances>
|
||||
<cpus num='8'>
|
||||
- <cpu id='1' socket_id='1' die_id='0' core_id='0' siblings='1'/>
|
||||
- <cpu id='3' socket_id='1' die_id='0' core_id='1' siblings='3'/>
|
||||
- <cpu id='5' socket_id='1' die_id='0' core_id='2' siblings='5'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='3' siblings='7'/>
|
||||
- <cpu id='9' socket_id='1' die_id='0' core_id='4' siblings='9'/>
|
||||
- <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
|
||||
- <cpu id='13' socket_id='1' die_id='0' core_id='6' siblings='13'/>
|
||||
- <cpu id='15' socket_id='1' die_id='0' core_id='7' siblings='15'/>
|
||||
+ <cpu id='1' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='1'/>
|
||||
+ <cpu id='3' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='3'/>
|
||||
+ <cpu id='5' socket_id='1' die_id='0' cluster_id='0' core_id='2' siblings='5'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='3' siblings='7'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='9'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='11'/>
|
||||
+ <cpu id='13' socket_id='1' die_id='0' cluster_id='0' core_id='6' siblings='13'/>
|
||||
+ <cpu id='15' socket_id='1' die_id='0' cluster_id='0' core_id='7' siblings='15'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-aarch64-basic-clusters.xml b/tests/vircaps2xmldata/vircaps-aarch64-basic-clusters.xml
|
||||
index fe61fc42cc..b37c8e7a20 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-aarch64-basic-clusters.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-aarch64-basic-clusters.xml
|
||||
@@ -14,10 +14,10 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='0' socket_id='36' die_id='0' core_id='0' siblings='0-1'/>
|
||||
- <cpu id='1' socket_id='36' die_id='0' core_id='0' siblings='0-1'/>
|
||||
- <cpu id='2' socket_id='36' die_id='0' core_id='1' siblings='2-3'/>
|
||||
- <cpu id='3' socket_id='36' die_id='0' core_id='1' siblings='2-3'/>
|
||||
+ <cpu id='0' socket_id='36' die_id='0' cluster_id='0' core_id='0' siblings='0-1'/>
|
||||
+ <cpu id='1' socket_id='36' die_id='0' cluster_id='0' core_id='0' siblings='0-1'/>
|
||||
+ <cpu id='2' socket_id='36' die_id='0' cluster_id='1' core_id='1' siblings='2-3'/>
|
||||
+ <cpu id='3' socket_id='36' die_id='0' cluster_id='1' core_id='1' siblings='2-3'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -26,10 +26,10 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='4' socket_id='3180' die_id='0' core_id='256' siblings='4-5'/>
|
||||
- <cpu id='5' socket_id='3180' die_id='0' core_id='256' siblings='4-5'/>
|
||||
- <cpu id='6' socket_id='3180' die_id='0' core_id='257' siblings='6-7'/>
|
||||
- <cpu id='7' socket_id='3180' die_id='0' core_id='257' siblings='6-7'/>
|
||||
+ <cpu id='4' socket_id='3180' die_id='0' cluster_id='256' core_id='256' siblings='4-5'/>
|
||||
+ <cpu id='5' socket_id='3180' die_id='0' cluster_id='256' core_id='256' siblings='4-5'/>
|
||||
+ <cpu id='6' socket_id='3180' die_id='0' cluster_id='257' core_id='257' siblings='6-7'/>
|
||||
+ <cpu id='7' socket_id='3180' die_id='0' cluster_id='257' core_id='257' siblings='6-7'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-aarch64-basic.xml b/tests/vircaps2xmldata/vircaps-aarch64-basic.xml
|
||||
index 0a04052c40..5533ae0586 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-aarch64-basic.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-aarch64-basic.xml
|
||||
@@ -16,10 +16,10 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -28,10 +28,10 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='4' socket_id='1' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='1' die_id='0' core_id='5' siblings='5'/>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='6' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='7' siblings='7'/>
|
||||
+ <cpu id='4' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='6' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='7' siblings='7'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='2'>
|
||||
@@ -40,10 +40,10 @@
|
||||
<pages unit='KiB' size='2048'>8192</pages>
|
||||
<pages unit='KiB' size='1048576'>10240</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='8' socket_id='2' die_id='0' core_id='8' siblings='8'/>
|
||||
- <cpu id='9' socket_id='2' die_id='0' core_id='9' siblings='9'/>
|
||||
- <cpu id='10' socket_id='2' die_id='0' core_id='10' siblings='10'/>
|
||||
- <cpu id='11' socket_id='2' die_id='0' core_id='11' siblings='11'/>
|
||||
+ <cpu id='8' socket_id='2' die_id='0' cluster_id='0' core_id='8' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='2' die_id='0' cluster_id='0' core_id='9' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='2' die_id='0' cluster_id='0' core_id='10' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='2' die_id='0' cluster_id='0' core_id='11' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='3'>
|
||||
@@ -52,10 +52,10 @@
|
||||
<pages unit='KiB' size='2048'>10240</pages>
|
||||
<pages unit='KiB' size='1048576'>12288</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='12' socket_id='3' die_id='0' core_id='12' siblings='12'/>
|
||||
- <cpu id='13' socket_id='3' die_id='0' core_id='13' siblings='13'/>
|
||||
- <cpu id='14' socket_id='3' die_id='0' core_id='14' siblings='14'/>
|
||||
- <cpu id='15' socket_id='3' die_id='0' core_id='15' siblings='15'/>
|
||||
+ <cpu id='12' socket_id='3' die_id='0' cluster_id='0' core_id='12' siblings='12'/>
|
||||
+ <cpu id='13' socket_id='3' die_id='0' cluster_id='0' core_id='13' siblings='13'/>
|
||||
+ <cpu id='14' socket_id='3' die_id='0' cluster_id='0' core_id='14' siblings='14'/>
|
||||
+ <cpu id='15' socket_id='3' die_id='0' cluster_id='0' core_id='15' siblings='15'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-basic-dies.xml b/tests/vircaps2xmldata/vircaps-x86_64-basic-dies.xml
|
||||
index 8a3ca2d13c..c86dc4defc 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-basic-dies.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-basic-dies.xml
|
||||
@@ -14,18 +14,18 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='12'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='1' core_id='0' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='1' core_id='1' siblings='3'/>
|
||||
- <cpu id='4' socket_id='0' die_id='2' core_id='0' siblings='4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='2' core_id='1' siblings='5'/>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='1' siblings='7'/>
|
||||
- <cpu id='8' socket_id='1' die_id='1' core_id='0' siblings='8'/>
|
||||
- <cpu id='9' socket_id='1' die_id='1' core_id='1' siblings='9'/>
|
||||
- <cpu id='10' socket_id='1' die_id='2' core_id='0' siblings='10'/>
|
||||
- <cpu id='11' socket_id='1' die_id='2' core_id='1' siblings='11'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='1' cluster_id='0' core_id='0' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='1' cluster_id='0' core_id='1' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='2' cluster_id='0' core_id='0' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='2' cluster_id='0' core_id='1' siblings='5'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='1' die_id='1' cluster_id='0' core_id='0' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='1' cluster_id='0' core_id='1' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='1' die_id='2' cluster_id='0' core_id='0' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='2' cluster_id='0' core_id='1' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-basic.xml b/tests/vircaps2xmldata/vircaps-x86_64-basic.xml
|
||||
index 4da09f889c..9ae155d571 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-basic.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-basic.xml
|
||||
@@ -14,10 +14,10 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -26,10 +26,10 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='4' socket_id='1' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='1' die_id='0' core_id='5' siblings='5'/>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='6' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='7' siblings='7'/>
|
||||
+ <cpu id='4' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='6' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='7' siblings='7'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='2'>
|
||||
@@ -38,10 +38,10 @@
|
||||
<pages unit='KiB' size='2048'>8192</pages>
|
||||
<pages unit='KiB' size='1048576'>10240</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='8' socket_id='2' die_id='0' core_id='8' siblings='8'/>
|
||||
- <cpu id='9' socket_id='2' die_id='0' core_id='9' siblings='9'/>
|
||||
- <cpu id='10' socket_id='2' die_id='0' core_id='10' siblings='10'/>
|
||||
- <cpu id='11' socket_id='2' die_id='0' core_id='11' siblings='11'/>
|
||||
+ <cpu id='8' socket_id='2' die_id='0' cluster_id='0' core_id='8' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='2' die_id='0' cluster_id='0' core_id='9' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='2' die_id='0' cluster_id='0' core_id='10' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='2' die_id='0' cluster_id='0' core_id='11' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='3'>
|
||||
@@ -50,10 +50,10 @@
|
||||
<pages unit='KiB' size='2048'>10240</pages>
|
||||
<pages unit='KiB' size='1048576'>12288</pages>
|
||||
<cpus num='4'>
|
||||
- <cpu id='12' socket_id='3' die_id='0' core_id='12' siblings='12'/>
|
||||
- <cpu id='13' socket_id='3' die_id='0' core_id='13' siblings='13'/>
|
||||
- <cpu id='14' socket_id='3' die_id='0' core_id='14' siblings='14'/>
|
||||
- <cpu id='15' socket_id='3' die_id='0' core_id='15' siblings='15'/>
|
||||
+ <cpu id='12' socket_id='3' die_id='0' cluster_id='0' core_id='12' siblings='12'/>
|
||||
+ <cpu id='13' socket_id='3' die_id='0' cluster_id='0' core_id='13' siblings='13'/>
|
||||
+ <cpu id='14' socket_id='3' die_id='0' cluster_id='0' core_id='14' siblings='14'/>
|
||||
+ <cpu id='15' socket_id='3' die_id='0' cluster_id='0' core_id='15' siblings='15'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-caches.xml b/tests/vircaps2xmldata/vircaps-x86_64-caches.xml
|
||||
index 28f00c0a90..05b33147b7 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-caches.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-caches.xml
|
||||
@@ -17,14 +17,14 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='8'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0,4'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1,5'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2,6'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3,7'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='0' siblings='0,4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='0' core_id='1' siblings='1,5'/>
|
||||
- <cpu id='6' socket_id='0' die_id='0' core_id='2' siblings='2,6'/>
|
||||
- <cpu id='7' socket_id='0' die_id='0' core_id='3' siblings='3,7'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0,4'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1,5'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2,6'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3,7'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0,4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1,5'/>
|
||||
+ <cpu id='6' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2,6'/>
|
||||
+ <cpu id='7' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3,7'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-hmat.xml b/tests/vircaps2xmldata/vircaps-x86_64-hmat.xml
|
||||
index 6fe5751666..2b97354bf3 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-hmat.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-hmat.xml
|
||||
@@ -25,30 +25,30 @@
|
||||
<line value='16' unit='B'/>
|
||||
</cache>
|
||||
<cpus num='24'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='1' die_id='0' core_id='0' siblings='1'/>
|
||||
- <cpu id='2' socket_id='2' die_id='0' core_id='0' siblings='2'/>
|
||||
- <cpu id='3' socket_id='3' die_id='0' core_id='0' siblings='3'/>
|
||||
- <cpu id='4' socket_id='4' die_id='0' core_id='0' siblings='4'/>
|
||||
- <cpu id='5' socket_id='5' die_id='0' core_id='0' siblings='5'/>
|
||||
- <cpu id='6' socket_id='6' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='7' die_id='0' core_id='0' siblings='7'/>
|
||||
- <cpu id='8' socket_id='8' die_id='0' core_id='0' siblings='8'/>
|
||||
- <cpu id='9' socket_id='9' die_id='0' core_id='0' siblings='9'/>
|
||||
- <cpu id='10' socket_id='10' die_id='0' core_id='0' siblings='10'/>
|
||||
- <cpu id='11' socket_id='11' die_id='0' core_id='0' siblings='11'/>
|
||||
- <cpu id='12' socket_id='12' die_id='0' core_id='0' siblings='12'/>
|
||||
- <cpu id='13' socket_id='13' die_id='0' core_id='0' siblings='13'/>
|
||||
- <cpu id='14' socket_id='14' die_id='0' core_id='0' siblings='14'/>
|
||||
- <cpu id='15' socket_id='15' die_id='0' core_id='0' siblings='15'/>
|
||||
- <cpu id='16' socket_id='16' die_id='0' core_id='0' siblings='16'/>
|
||||
- <cpu id='17' socket_id='17' die_id='0' core_id='0' siblings='17'/>
|
||||
- <cpu id='18' socket_id='18' die_id='0' core_id='0' siblings='18'/>
|
||||
- <cpu id='19' socket_id='19' die_id='0' core_id='0' siblings='19'/>
|
||||
- <cpu id='20' socket_id='20' die_id='0' core_id='0' siblings='20'/>
|
||||
- <cpu id='21' socket_id='21' die_id='0' core_id='0' siblings='21'/>
|
||||
- <cpu id='22' socket_id='22' die_id='0' core_id='0' siblings='22'/>
|
||||
- <cpu id='23' socket_id='23' die_id='0' core_id='0' siblings='23'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='2' die_id='0' cluster_id='0' core_id='0' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='3' die_id='0' cluster_id='0' core_id='0' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='4' die_id='0' cluster_id='0' core_id='0' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='5' die_id='0' cluster_id='0' core_id='0' siblings='5'/>
|
||||
+ <cpu id='6' socket_id='6' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='7' die_id='0' cluster_id='0' core_id='0' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='8' die_id='0' cluster_id='0' core_id='0' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='9' die_id='0' cluster_id='0' core_id='0' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='10' die_id='0' cluster_id='0' core_id='0' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='11' die_id='0' cluster_id='0' core_id='0' siblings='11'/>
|
||||
+ <cpu id='12' socket_id='12' die_id='0' cluster_id='0' core_id='0' siblings='12'/>
|
||||
+ <cpu id='13' socket_id='13' die_id='0' cluster_id='0' core_id='0' siblings='13'/>
|
||||
+ <cpu id='14' socket_id='14' die_id='0' cluster_id='0' core_id='0' siblings='14'/>
|
||||
+ <cpu id='15' socket_id='15' die_id='0' cluster_id='0' core_id='0' siblings='15'/>
|
||||
+ <cpu id='16' socket_id='16' die_id='0' cluster_id='0' core_id='0' siblings='16'/>
|
||||
+ <cpu id='17' socket_id='17' die_id='0' cluster_id='0' core_id='0' siblings='17'/>
|
||||
+ <cpu id='18' socket_id='18' die_id='0' cluster_id='0' core_id='0' siblings='18'/>
|
||||
+ <cpu id='19' socket_id='19' die_id='0' cluster_id='0' core_id='0' siblings='19'/>
|
||||
+ <cpu id='20' socket_id='20' die_id='0' cluster_id='0' core_id='0' siblings='20'/>
|
||||
+ <cpu id='21' socket_id='21' die_id='0' cluster_id='0' core_id='0' siblings='21'/>
|
||||
+ <cpu id='22' socket_id='22' die_id='0' cluster_id='0' core_id='0' siblings='22'/>
|
||||
+ <cpu id='23' socket_id='23' die_id='0' cluster_id='0' core_id='0' siblings='23'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml
|
||||
index ee26fe9464..167b217d8e 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml
|
||||
@@ -17,12 +17,12 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -31,12 +31,12 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='1' siblings='7'/>
|
||||
- <cpu id='8' socket_id='1' die_id='0' core_id='2' siblings='8'/>
|
||||
- <cpu id='9' socket_id='1' die_id='0' core_id='3' siblings='9'/>
|
||||
- <cpu id='10' socket_id='1' die_id='0' core_id='4' siblings='10'/>
|
||||
- <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='1' die_id='0' cluster_id='0' core_id='2' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='0' cluster_id='0' core_id='3' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml
|
||||
index acdd97ec58..311bb58e6a 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml
|
||||
@@ -17,12 +17,12 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -31,12 +31,12 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='1' siblings='7'/>
|
||||
- <cpu id='8' socket_id='1' die_id='0' core_id='2' siblings='8'/>
|
||||
- <cpu id='9' socket_id='1' die_id='0' core_id='3' siblings='9'/>
|
||||
- <cpu id='10' socket_id='1' die_id='0' core_id='4' siblings='10'/>
|
||||
- <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='1' die_id='0' cluster_id='0' core_id='2' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='0' cluster_id='0' core_id='3' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml
|
||||
index 1327d85c98..d85407f0b1 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml
|
||||
@@ -17,12 +17,12 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -31,12 +31,12 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='1' siblings='7'/>
|
||||
- <cpu id='8' socket_id='1' die_id='0' core_id='2' siblings='8'/>
|
||||
- <cpu id='9' socket_id='1' die_id='0' core_id='3' siblings='9'/>
|
||||
- <cpu id='10' socket_id='1' die_id='0' core_id='4' siblings='10'/>
|
||||
- <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='1' die_id='0' cluster_id='0' core_id='2' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='0' cluster_id='0' core_id='3' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
|
||||
index 6769bd0591..eb53eb2142 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx-twocaches.xml
|
||||
@@ -17,7 +17,7 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='1'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx.xml
|
||||
index bc52480905..38ea0bdc27 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-skx.xml
|
||||
@@ -17,7 +17,7 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='1'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml
|
||||
index b638bbd1c9..fd854ee91e 100644
|
||||
--- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml
|
||||
+++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml
|
||||
@@ -17,12 +17,12 @@
|
||||
<pages unit='KiB' size='2048'>4096</pages>
|
||||
<pages unit='KiB' size='1048576'>6144</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
|
||||
- <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1'/>
|
||||
- <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2'/>
|
||||
- <cpu id='3' socket_id='0' die_id='0' core_id='3' siblings='3'/>
|
||||
- <cpu id='4' socket_id='0' die_id='0' core_id='4' siblings='4'/>
|
||||
- <cpu id='5' socket_id='0' die_id='0' core_id='5' siblings='5'/>
|
||||
+ <cpu id='0' socket_id='0' die_id='0' cluster_id='0' core_id='0' siblings='0'/>
|
||||
+ <cpu id='1' socket_id='0' die_id='0' cluster_id='0' core_id='1' siblings='1'/>
|
||||
+ <cpu id='2' socket_id='0' die_id='0' cluster_id='0' core_id='2' siblings='2'/>
|
||||
+ <cpu id='3' socket_id='0' die_id='0' cluster_id='0' core_id='3' siblings='3'/>
|
||||
+ <cpu id='4' socket_id='0' die_id='0' cluster_id='0' core_id='4' siblings='4'/>
|
||||
+ <cpu id='5' socket_id='0' die_id='0' cluster_id='0' core_id='5' siblings='5'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
<cell id='1'>
|
||||
@@ -31,12 +31,12 @@
|
||||
<pages unit='KiB' size='2048'>6144</pages>
|
||||
<pages unit='KiB' size='1048576'>8192</pages>
|
||||
<cpus num='6'>
|
||||
- <cpu id='6' socket_id='1' die_id='0' core_id='0' siblings='6'/>
|
||||
- <cpu id='7' socket_id='1' die_id='0' core_id='1' siblings='7'/>
|
||||
- <cpu id='8' socket_id='1' die_id='0' core_id='2' siblings='8'/>
|
||||
- <cpu id='9' socket_id='1' die_id='0' core_id='3' siblings='9'/>
|
||||
- <cpu id='10' socket_id='1' die_id='0' core_id='4' siblings='10'/>
|
||||
- <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
|
||||
+ <cpu id='6' socket_id='1' die_id='0' cluster_id='0' core_id='0' siblings='6'/>
|
||||
+ <cpu id='7' socket_id='1' die_id='0' cluster_id='0' core_id='1' siblings='7'/>
|
||||
+ <cpu id='8' socket_id='1' die_id='0' cluster_id='0' core_id='2' siblings='8'/>
|
||||
+ <cpu id='9' socket_id='1' die_id='0' cluster_id='0' core_id='3' siblings='9'/>
|
||||
+ <cpu id='10' socket_id='1' die_id='0' cluster_id='0' core_id='4' siblings='10'/>
|
||||
+ <cpu id='11' socket_id='1' die_id='0' cluster_id='0' core_id='5' siblings='11'/>
|
||||
</cpus>
|
||||
</cell>
|
||||
</cells>
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,88 @@
|
||||
From 3c65b917f70d556fa1059b0400771c8159b8ca3b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3c65b917f70d556fa1059b0400771c8159b8ca3b@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:08 +0200
|
||||
Subject: [PATCH] conf: adjust method name virDomainDeviceCCWAddressParseXML
|
||||
|
||||
Adjust method name virDomainDeviceCCWAddressParseXML to
|
||||
virCCWDeviceAddressParseXML.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 2d9fd19bf5d7a3d33b94e464c335252682edd623)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/conf/device_conf.c | 4 ++--
|
||||
src/conf/device_conf.h | 4 ++--
|
||||
src/conf/domain_conf.c | 3 +--
|
||||
src/libvirt_private.syms | 2 +-
|
||||
4 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c
|
||||
index 958e2f43cc..e93fd57341 100644
|
||||
--- a/src/conf/device_conf.c
|
||||
+++ b/src/conf/device_conf.c
|
||||
@@ -259,8 +259,8 @@ virPCIDeviceAddressFormat(virBuffer *buf,
|
||||
}
|
||||
|
||||
int
|
||||
-virDomainDeviceCCWAddressParseXML(xmlNodePtr node,
|
||||
- virCCWDeviceAddress *addr)
|
||||
+virCCWDeviceAddressParseXML(xmlNodePtr node,
|
||||
+ virCCWDeviceAddress *addr)
|
||||
{
|
||||
int cssid;
|
||||
int ssid;
|
||||
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
|
||||
index 01e2edccc9..910e6b7792 100644
|
||||
--- a/src/conf/device_conf.h
|
||||
+++ b/src/conf/device_conf.h
|
||||
@@ -193,8 +193,8 @@ void virPCIDeviceAddressFormat(virBuffer *buf,
|
||||
virPCIDeviceAddress addr,
|
||||
bool includeTypeInAddr);
|
||||
|
||||
-int virDomainDeviceCCWAddressParseXML(xmlNodePtr node,
|
||||
- virCCWDeviceAddress *addr);
|
||||
+int virCCWDeviceAddressParseXML(xmlNodePtr node,
|
||||
+ virCCWDeviceAddress *addr);
|
||||
|
||||
int virDomainDeviceDriveAddressParseXML(xmlNodePtr node,
|
||||
virDomainDeviceDriveAddress *addr);
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 1e1c7f01b1..401ddaa1a0 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -6630,8 +6630,7 @@ virDomainDeviceAddressParseXML(xmlNodePtr address,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW:
|
||||
- if (virDomainDeviceCCWAddressParseXML
|
||||
- (address, &info->addr.ccw) < 0)
|
||||
+ if (virCCWDeviceAddressParseXML(address, &info->addr.ccw) < 0)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
||||
index 0d3ee4c20a..44b551fb60 100644
|
||||
--- a/src/libvirt_private.syms
|
||||
+++ b/src/libvirt_private.syms
|
||||
@@ -124,6 +124,7 @@ virCPUModeTypeToString;
|
||||
|
||||
|
||||
# conf/device_conf.h
|
||||
+virCCWDeviceAddressParseXML;
|
||||
virDeviceInfoPCIAddressExtensionIsPresent;
|
||||
virDeviceInfoPCIAddressExtensionIsWanted;
|
||||
virDeviceInfoPCIAddressIsPresent;
|
||||
@@ -131,7 +132,6 @@ virDeviceInfoPCIAddressIsWanted;
|
||||
virDomainDeviceAddressIsValid;
|
||||
virDomainDeviceAddressTypeToString;
|
||||
virDomainDeviceCcidAddressParseXML;
|
||||
-virDomainDeviceCCWAddressParseXML;
|
||||
virDomainDeviceDriveAddressParseXML;
|
||||
virDomainDeviceInfoAddressIsEqual;
|
||||
virDomainDeviceSpaprVioAddressParseXML;
|
||||
--
|
||||
2.39.1
|
||||
|
@ -1,138 +0,0 @@
|
||||
From 8d84e4af4cbb93d73f4d9967f517552257f025f5 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <8d84e4af4cbb93d73f4d9967f517552257f025f5.1707394627.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 29 Jan 2024 18:26:29 +0100
|
||||
Subject: [PATCH] conf: node_device: Refactor
|
||||
'virNodeDeviceCapVPDParseCustomFields' to fix error reporting
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The errors raised in virNodeDeviceCapVPDParseCustomFields were actually
|
||||
ignored by continuing the parse rather than raised.
|
||||
|
||||
Rather than just replace 'continue' by 'return -1' this patch refactors
|
||||
the whole parser to simplify it as well as report reasonable errors.
|
||||
|
||||
Parsing of individual fields is done without XPath and is extracted into
|
||||
a common helper.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit ea8d864d9ecf3ee72910ccc1497244f1ef74e948)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-22314 [9.4.0]
|
||||
---
|
||||
src/conf/node_device_conf.c | 81 ++++++++++++++++++-------------------
|
||||
1 file changed, 40 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index d7e1a23034..0f2c341967 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -953,63 +953,62 @@ virNodeDevCapMdevTypesParseXML(xmlXPathContextPtr ctxt,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+
|
||||
static int
|
||||
-virNodeDeviceCapVPDParseCustomFields(xmlXPathContextPtr ctxt, virPCIVPDResource *res, bool readOnly)
|
||||
+virNodeDeviceCapVPDParseCustomFieldOne(xmlNodePtr node,
|
||||
+ virPCIVPDResource *res,
|
||||
+ bool read_only,
|
||||
+ const char keyword_prefix)
|
||||
+{
|
||||
+ g_autofree char *value = NULL;
|
||||
+ g_autofree char *index = NULL;
|
||||
+ g_autofree char *keyword = NULL;
|
||||
+
|
||||
+ if (!(index = virXMLPropStringRequired(node, "index")))
|
||||
+ return -1;
|
||||
+
|
||||
+ if (strlen(index) != 1) {
|
||||
+ virReportError(VIR_ERR_XML_ERROR,
|
||||
+ _("'%1$s' 'index' value '%2$s' malformed"),
|
||||
+ node->name, index);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ keyword = g_strdup_printf("%c%c", keyword_prefix, index[0]);
|
||||
+
|
||||
+ if (!(value = virXMLNodeContentString(node)))
|
||||
+ return -1;
|
||||
+
|
||||
+ virPCIVPDResourceUpdateKeyword(res, read_only, keyword, value);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+virNodeDeviceCapVPDParseCustomFields(xmlXPathContextPtr ctxt,
|
||||
+ virPCIVPDResource *res,
|
||||
+ bool readOnly)
|
||||
{
|
||||
int nfields = -1;
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
size_t i = 0;
|
||||
|
||||
- if ((nfields = virXPathNodeSet("./vendor_field[@index]", ctxt, &nodes)) < 0)
|
||||
+ if ((nfields = virXPathNodeSet("./vendor_field", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < nfields; i++) {
|
||||
- g_autofree char *value = NULL;
|
||||
- g_autofree char *index = NULL;
|
||||
- VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
- g_autofree char *keyword = NULL;
|
||||
-
|
||||
- ctxt->node = nodes[i];
|
||||
- if (!(index = virXPathString("string(./@index[1])", ctxt)) ||
|
||||
- strlen(index) > 1) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("<vendor_field> evaluation has failed"));
|
||||
- continue;
|
||||
- }
|
||||
- if (!(value = virXPathString("string(./text())", ctxt))) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("<vendor_field> value evaluation has failed"));
|
||||
- continue;
|
||||
- }
|
||||
- keyword = g_strdup_printf("V%c", index[0]);
|
||||
- virPCIVPDResourceUpdateKeyword(res, readOnly, keyword, value);
|
||||
+ if (virNodeDeviceCapVPDParseCustomFieldOne(nodes[i], res, readOnly, 'V') < 0)
|
||||
+ return -1;
|
||||
}
|
||||
VIR_FREE(nodes);
|
||||
|
||||
if (!readOnly) {
|
||||
- if ((nfields = virXPathNodeSet("./system_field[@index]", ctxt, &nodes)) < 0)
|
||||
+ if ((nfields = virXPathNodeSet("./system_field", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < nfields; i++) {
|
||||
- g_autofree char *value = NULL;
|
||||
- g_autofree char *index = NULL;
|
||||
- g_autofree char *keyword = NULL;
|
||||
- VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
||||
-
|
||||
- ctxt->node = nodes[i];
|
||||
- if (!(index = virXPathString("string(./@index[1])", ctxt)) ||
|
||||
- strlen(index) > 1) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("<system_field> evaluation has failed"));
|
||||
- continue;
|
||||
- }
|
||||
- if (!(value = virXPathString("string(./text())", ctxt))) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("<system_field> value evaluation has failed"));
|
||||
- continue;
|
||||
- }
|
||||
- keyword = g_strdup_printf("Y%c", index[0]);
|
||||
- virPCIVPDResourceUpdateKeyword(res, readOnly, keyword, value);
|
||||
+ if (virNodeDeviceCapVPDParseCustomFieldOne(nodes[i], res, readOnly, 'Y') < 0)
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
@ -1,47 +0,0 @@
|
||||
From 15145b5ecb2e9186e42bbb295e1d44f93ff25cfb Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <15145b5ecb2e9186e42bbb295e1d44f93ff25cfb.1707394627.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 24 Jan 2024 16:27:35 +0100
|
||||
Subject: [PATCH] conf: virNodeDeviceCapVPDParse*: Remove pointless NULL checks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The function are never called with NULL argument so the checks can be
|
||||
removed.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit fb69acf5c255f6baedefe2a2535325af8088ced5)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-22314 [9.4.0]
|
||||
---
|
||||
src/conf/node_device_conf.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index dd174d3020..d7e1a23034 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -1023,9 +1023,6 @@ virNodeDeviceCapVPDParseReadOnlyFields(xmlXPathContextPtr ctxt, virPCIVPDResourc
|
||||
"serial_number", "part_number", NULL};
|
||||
size_t i = 0;
|
||||
|
||||
- if (res == NULL)
|
||||
- return -1;
|
||||
-
|
||||
res->ro = virPCIVPDResourceRONew();
|
||||
|
||||
while (keywords[i]) {
|
||||
@@ -1061,9 +1058,6 @@ virNodeDeviceCapVPDParseXML(xmlXPathContextPtr ctxt, virPCIVPDResource **res)
|
||||
size_t i = 0;
|
||||
g_autoptr(virPCIVPDResource) newres = g_new0(virPCIVPDResource, 1);
|
||||
|
||||
- if (res == NULL)
|
||||
- return -1;
|
||||
-
|
||||
if (!(newres->name = virXPathString("string(./name)", ctxt))) {
|
||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
_("Could not read a device name from the <name> element"));
|
||||
--
|
||||
2.43.0
|
151
SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch
Normal file
151
SOURCES/libvirt-conf-virtiofs-add-thread_pool-element.patch
Normal file
@ -0,0 +1,151 @@
|
||||
From 0c09e4225c511ce1b0ebe22e45962f83d5145e66 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0c09e4225c511ce1b0ebe22e45962f83d5145e66@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Fri, 10 Jun 2022 15:10:29 +0200
|
||||
Subject: [PATCH] conf: virtiofs: add thread_pool element
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add an element to configure the thread pool size:
|
||||
|
||||
...
|
||||
<binary>
|
||||
<thread_pool size='16'/>
|
||||
</binary>
|
||||
...
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2072905
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 0df2e7df80452f81edbfeb0ee355235b533346a9)
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2079582
|
||||
---
|
||||
docs/formatdomain.rst | 6 ++++++
|
||||
docs/schemas/domaincommon.rng | 9 +++++++++
|
||||
src/conf/domain_conf.c | 15 +++++++++++++++
|
||||
src/conf/domain_conf.h | 1 +
|
||||
.../qemuxml2argvdata/vhost-user-fs-fd-memory.xml | 1 +
|
||||
5 files changed, 32 insertions(+)
|
||||
|
||||
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
|
||||
index 17e89a0c0d..e6cf2ec083 100644
|
||||
--- a/docs/formatdomain.rst
|
||||
+++ b/docs/formatdomain.rst
|
||||
@@ -3316,6 +3316,7 @@ A directory on the host that can be accessed directly from the guest.
|
||||
<cache mode='always'/>
|
||||
<sandbox mode='namespace'/>
|
||||
<lock posix='on' flock='on'/>
|
||||
+ <thread_pool size='16'/>
|
||||
</binary>
|
||||
<source dir='/path'/>
|
||||
<target dir='mount_tag'/>
|
||||
@@ -3449,6 +3450,11 @@ A directory on the host that can be accessed directly from the guest.
|
||||
``chroot``, see the
|
||||
`virtiofsd documentation <https://qemu.readthedocs.io/en/latest/tools/virtiofsd.html>`__
|
||||
for more details. ( :since:`Since 7.2.0` )
|
||||
+ Element ``thread_pool`` accepts one attribute ``size`` which defines the
|
||||
+ maximum thread pool size. A value of "0" disables the pool.
|
||||
+ The thread pool helps increase the number of requests in flight when used with
|
||||
+ storage that has a higher latency. However, it has an overhead, and so for
|
||||
+ fast, low latency filesystems, it may be best to turn it off. ( :since:`Since 8.5.0` )
|
||||
``source``
|
||||
The resource on the host that is being accessed in the guest. The ``name``
|
||||
attribute must be used with ``type='template'``, and the ``dir`` attribute
|
||||
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
|
||||
index c9c1529979..79c8979410 100644
|
||||
--- a/docs/schemas/domaincommon.rng
|
||||
+++ b/docs/schemas/domaincommon.rng
|
||||
@@ -3064,6 +3064,15 @@
|
||||
</optional>
|
||||
</element>
|
||||
</optional>
|
||||
+ <optional>
|
||||
+ <element name="thread_pool">
|
||||
+ <optional>
|
||||
+ <attribute name="size">
|
||||
+ <data type="integer"/>
|
||||
+ </attribute>
|
||||
+ </optional>
|
||||
+ </element>
|
||||
+ </optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 92510973e6..95afd9226e 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -2447,6 +2447,8 @@ virDomainFSDefNew(virDomainXMLOption *xmlopt)
|
||||
|
||||
ret->src = virStorageSourceNew();
|
||||
|
||||
+ ret->thread_pool_size = -1;
|
||||
+
|
||||
if (xmlopt &&
|
||||
xmlopt->privateData.fsNew &&
|
||||
!(ret->privateData = xmlopt->privateData.fsNew()))
|
||||
@@ -9869,6 +9871,7 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt,
|
||||
if (def->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) {
|
||||
g_autofree char *queue_size = virXPathString("string(./driver/@queue)", ctxt);
|
||||
g_autofree char *binary = virXPathString("string(./binary/@path)", ctxt);
|
||||
+ g_autofree char *thread_pool_size = virXPathString("string(./binary/thread_pool/@size)", ctxt);
|
||||
g_autofree char *xattr = virXPathString("string(./binary/@xattr)", ctxt);
|
||||
g_autofree char *cache = virXPathString("string(./binary/cache/@mode)", ctxt);
|
||||
g_autofree char *sandbox = virXPathString("string(./binary/sandbox/@mode)", ctxt);
|
||||
@@ -9883,6 +9886,14 @@ virDomainFSDefParseXML(virDomainXMLOption *xmlopt,
|
||||
goto error;
|
||||
}
|
||||
|
||||
+ if (thread_pool_size &&
|
||||
+ virStrToLong_i(thread_pool_size, NULL, 10, &def->thread_pool_size) < 0) {
|
||||
+ virReportError(VIR_ERR_XML_ERROR,
|
||||
+ _("cannot parse thread pool size '%s' for virtiofs"),
|
||||
+ queue_size);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
if (binary)
|
||||
def->binary = virFileSanitizePath(binary);
|
||||
|
||||
@@ -24205,6 +24216,10 @@ virDomainFSDefFormat(virBuffer *buf,
|
||||
}
|
||||
|
||||
virXMLFormatElement(&binaryBuf, "lock", &lockAttrBuf, NULL);
|
||||
+
|
||||
+ if (def->thread_pool_size >= 0)
|
||||
+ virBufferAsprintf(&binaryBuf, "<thread_pool size='%d'/>\n", def->thread_pool_size);
|
||||
+
|
||||
}
|
||||
|
||||
virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio);
|
||||
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||
index 10af94e2e4..d0d0fdc815 100644
|
||||
--- a/src/conf/domain_conf.h
|
||||
+++ b/src/conf/domain_conf.h
|
||||
@@ -892,6 +892,7 @@ struct _virDomainFSDef {
|
||||
virTristateSwitch posix_lock;
|
||||
virTristateSwitch flock;
|
||||
virDomainFSSandboxMode sandbox;
|
||||
+ int thread_pool_size;
|
||||
virDomainVirtioOptions *virtio;
|
||||
virObject *privateData;
|
||||
};
|
||||
diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
|
||||
index abddf0870b..81de8c0dd7 100644
|
||||
--- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
|
||||
+++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
|
||||
@@ -32,6 +32,7 @@
|
||||
<cache mode='always'/>
|
||||
<sandbox mode='chroot'/>
|
||||
<lock posix='off' flock='off'/>
|
||||
+ <thread_pool size='16'/>
|
||||
</binary>
|
||||
<source dir='/path'/>
|
||||
<target dir='mount_tag'/>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,60 @@
|
||||
From 46f4cfe513f0f893c862dca7f02ed7d7932b2115 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <46f4cfe513f0f893c862dca7f02ed7d7932b2115@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Tue, 26 Apr 2022 12:50:41 +0200
|
||||
Subject: [PATCH] cpu_map: Disable cpu64-rhel* for host-model and baseline
|
||||
|
||||
These ancient RHEL-only CPU models should not really be used by any CPU
|
||||
definition created by libvirt. We keep them just for backwards
|
||||
compatibility with domains which might still be using them.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit d2e4d66be35cd04da72e5f5129a8a4da6a931505)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/cpu_map/x86_cpu64-rhel5.xml | 2 +-
|
||||
src/cpu_map/x86_cpu64-rhel6.xml | 2 +-
|
||||
tests/cputestdata/x86_64-baseline-no-vendor-result.xml | 3 ++-
|
||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/cpu_map/x86_cpu64-rhel5.xml b/src/cpu_map/x86_cpu64-rhel5.xml
|
||||
index be6bcdb7a6..7402b7603c 100644
|
||||
--- a/src/cpu_map/x86_cpu64-rhel5.xml
|
||||
+++ b/src/cpu_map/x86_cpu64-rhel5.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpus>
|
||||
<model name='cpu64-rhel5'>
|
||||
- <decode host='on' guest='on'/>
|
||||
+ <decode host='off' guest='off'/>
|
||||
<feature name='apic'/>
|
||||
<feature name='clflush'/>
|
||||
<feature name='cmov'/>
|
||||
diff --git a/src/cpu_map/x86_cpu64-rhel6.xml b/src/cpu_map/x86_cpu64-rhel6.xml
|
||||
index c62b1b5575..061939c733 100644
|
||||
--- a/src/cpu_map/x86_cpu64-rhel6.xml
|
||||
+++ b/src/cpu_map/x86_cpu64-rhel6.xml
|
||||
@@ -1,6 +1,6 @@
|
||||
<cpus>
|
||||
<model name='cpu64-rhel6'>
|
||||
- <decode host='on' guest='on'/>
|
||||
+ <decode host='off' guest='off'/>
|
||||
<feature name='apic'/>
|
||||
<feature name='clflush'/>
|
||||
<feature name='cmov'/>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
|
||||
index 00e03b2152..4b4921cf93 100644
|
||||
--- a/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-baseline-no-vendor-result.xml
|
||||
@@ -1,3 +1,4 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>cpu64-rhel6</model>
|
||||
+ <model fallback='allow'>kvm64</model>
|
||||
+ <feature policy='require' name='lahf_lm'/>
|
||||
</cpu>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,75 @@
|
||||
From 99a298a4a0575bf0072f504c4b8e4551400c44c0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <99a298a4a0575bf0072f504c4b8e4551400c44c0@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Tue, 26 Apr 2022 11:58:07 +0200
|
||||
Subject: [PATCH] cpu_x86: Consolidate signature match in x86DecodeUseCandidate
|
||||
|
||||
Checking the signature in two different places makes no sense since the
|
||||
code in between can only mark the candidate as the best option so far,
|
||||
which is what the second signature match does as well.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 35ce086667e68e8f546cf36473591dd7c19c72eb)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/cpu/cpu_x86.c | 31 ++++++++++++++-----------------
|
||||
1 file changed, 14 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||
index 5cb9caef8a..f007487824 100644
|
||||
--- a/src/cpu/cpu_x86.c
|
||||
+++ b/src/cpu/cpu_x86.c
|
||||
@@ -2020,15 +2020,22 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
}
|
||||
|
||||
/* Ideally we want to select a model with family/model equal to
|
||||
- * family/model of the real CPU. Once we found such model, we only
|
||||
+ * family/model of the real CPU and once we found such model, we only
|
||||
* consider candidates with matching family/model.
|
||||
*/
|
||||
- if (signature &&
|
||||
- virCPUx86SignaturesMatch(current->signatures, signature) &&
|
||||
- !virCPUx86SignaturesMatch(candidate->signatures, signature)) {
|
||||
- VIR_DEBUG("%s differs in signature from matching %s",
|
||||
- cpuCandidate->model, cpuCurrent->model);
|
||||
- return 0;
|
||||
+ if (signature) {
|
||||
+ if (virCPUx86SignaturesMatch(current->signatures, signature) &&
|
||||
+ !virCPUx86SignaturesMatch(candidate->signatures, signature)) {
|
||||
+ VIR_DEBUG("%s differs in signature from matching %s",
|
||||
+ cpuCandidate->model, cpuCurrent->model);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!virCPUx86SignaturesMatch(current->signatures, signature) &&
|
||||
+ virCPUx86SignaturesMatch(candidate->signatures, signature)) {
|
||||
+ VIR_DEBUG("%s provides matching signature", cpuCandidate->model);
|
||||
+ return 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) {
|
||||
@@ -2037,16 +2044,6 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
return 1;
|
||||
}
|
||||
|
||||
- /* Prefer a candidate with matching signature even though it would
|
||||
- * result in longer list of features.
|
||||
- */
|
||||
- if (signature &&
|
||||
- virCPUx86SignaturesMatch(candidate->signatures, signature) &&
|
||||
- !virCPUx86SignaturesMatch(current->signatures, signature)) {
|
||||
- VIR_DEBUG("%s provides matching signature", cpuCandidate->model);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
VIR_DEBUG("%s does not result in shorter feature list than %s",
|
||||
cpuCandidate->model, cpuCurrent->model);
|
||||
return 0;
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,272 @@
|
||||
From 752c74eeae67d41e7550991cb3bbe289984ec9d3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <752c74eeae67d41e7550991cb3bbe289984ec9d3@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Fri, 29 Apr 2022 10:35:02 +0200
|
||||
Subject: [PATCH] cpu_x86: Ignore enabled features for input models in
|
||||
x86DecodeUseCandidate
|
||||
|
||||
While we don't want to aim for the shortest list of disabled features in
|
||||
the baseline result (it would select a very old model), we want to do so
|
||||
while looking at any of the input models for which we're trying to
|
||||
compute a baseline CPU model. Given a set of input models, we always
|
||||
want to take the least capable one of them (i.e., the one with shortest
|
||||
list of disabled features) or a better model which is not one of the
|
||||
input models.
|
||||
|
||||
So when considering an input model, we just check whether its list of
|
||||
disabled features is shorter than the currently best one. When looking
|
||||
at other models we check both enabled and disabled features while
|
||||
penalizing disabled features as implemented by the previous patch.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit bb6cedd2082599323257ee0df18c93a6e0551b0b)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/cpu/cpu_x86.c | 66 ++++++++++++-------
|
||||
...4-baseline-Westmere+Nehalem-migratable.xml | 8 ++-
|
||||
...86_64-baseline-Westmere+Nehalem-result.xml | 8 ++-
|
||||
...-cpuid-baseline-Cooperlake+Cascadelake.xml | 13 ++--
|
||||
4 files changed, 64 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||
index ebcd96edb1..7b59dad8bf 100644
|
||||
--- a/src/cpu/cpu_x86.c
|
||||
+++ b/src/cpu/cpu_x86.c
|
||||
@@ -1975,7 +1975,8 @@ virCPUx86Compare(virCPUDef *host,
|
||||
|
||||
static int
|
||||
virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
|
||||
- virCPUDef *cpuCandidate)
|
||||
+ virCPUDef *cpuCandidate,
|
||||
+ bool isPreferred)
|
||||
{
|
||||
size_t current = cpuCurrent->nfeatures;
|
||||
size_t enabledCurrent = current;
|
||||
@@ -2017,6 +2018,14 @@ virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ if (isPreferred && disabled < disabledCurrent) {
|
||||
+ VIR_DEBUG("%s is in the list of preferred models and provides fewer "
|
||||
+ "disabled features than %s: %zu < %zu",
|
||||
+ cpuCandidate->model, cpuCurrent->model,
|
||||
+ disabled, disabledCurrent);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
VIR_DEBUG("%s is not better than %s: %zu (%zu, %zu) >= %zu (%zu, %zu)",
|
||||
cpuCandidate->model, cpuCurrent->model,
|
||||
candidate, enabled, disabled,
|
||||
@@ -2039,8 +2048,10 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
virCPUx86Model *candidate,
|
||||
virCPUDef *cpuCandidate,
|
||||
uint32_t signature,
|
||||
- const char *preferred)
|
||||
+ const char **preferred)
|
||||
{
|
||||
+ bool isPreferred = false;
|
||||
+
|
||||
if (cpuCandidate->type == VIR_CPU_TYPE_HOST &&
|
||||
!candidate->decodeHost) {
|
||||
VIR_DEBUG("%s is not supposed to be used for host CPU definition",
|
||||
@@ -2064,9 +2075,13 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
}
|
||||
}
|
||||
|
||||
- if (preferred && STREQ(cpuCandidate->model, preferred)) {
|
||||
- VIR_DEBUG("%s is the preferred model", cpuCandidate->model);
|
||||
- return 2;
|
||||
+ if (preferred) {
|
||||
+ isPreferred = g_strv_contains(preferred, cpuCandidate->model);
|
||||
+
|
||||
+ if (isPreferred && !preferred[1]) {
|
||||
+ VIR_DEBUG("%s is the preferred model", cpuCandidate->model);
|
||||
+ return 2;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!cpuCurrent) {
|
||||
@@ -2093,7 +2108,8 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
}
|
||||
}
|
||||
|
||||
- return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate);
|
||||
+ return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate,
|
||||
+ isPreferred);
|
||||
}
|
||||
|
||||
|
||||
@@ -2136,7 +2152,7 @@ static int
|
||||
x86Decode(virCPUDef *cpu,
|
||||
const virCPUx86Data *cpuData,
|
||||
virDomainCapsCPUModels *models,
|
||||
- const char *preferred,
|
||||
+ const char **preferred,
|
||||
bool migratable)
|
||||
{
|
||||
virCPUx86Map *map;
|
||||
@@ -2169,6 +2185,9 @@ x86Decode(virCPUDef *cpu,
|
||||
|
||||
x86DataFilterTSX(&data, vendor, map);
|
||||
|
||||
+ if (preferred && !preferred[0])
|
||||
+ preferred = NULL;
|
||||
+
|
||||
/* Walk through the CPU models in reverse order to check newest
|
||||
* models first.
|
||||
*/
|
||||
@@ -2176,16 +2195,18 @@ x86Decode(virCPUDef *cpu,
|
||||
candidate = map->models[i];
|
||||
if (models &&
|
||||
!(hvModel = virDomainCapsCPUModelsGet(models, candidate->name))) {
|
||||
- if (preferred && STREQ(candidate->name, preferred)) {
|
||||
+ if (preferred &&
|
||||
+ !preferred[1] &&
|
||||
+ STREQ(candidate->name, preferred[0])) {
|
||||
if (cpu->fallback != VIR_CPU_FALLBACK_ALLOW) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("CPU model %s is not supported by hypervisor"),
|
||||
- preferred);
|
||||
+ preferred[0]);
|
||||
return -1;
|
||||
} else {
|
||||
VIR_WARN("Preferred CPU model %s not allowed by"
|
||||
" hypervisor; closest supported model will be"
|
||||
- " used", preferred);
|
||||
+ " used", preferred[0]);
|
||||
}
|
||||
} else {
|
||||
VIR_DEBUG("CPU model %s not allowed by hypervisor; ignoring",
|
||||
@@ -2793,8 +2814,8 @@ virCPUx86Baseline(virCPUDef **cpus,
|
||||
size_t i;
|
||||
virCPUx86Vendor *vendor = NULL;
|
||||
bool outputVendor = true;
|
||||
- const char *modelName;
|
||||
- bool matchingNames = true;
|
||||
+ g_autofree char **modelNames = NULL;
|
||||
+ size_t namesLen = 0;
|
||||
g_autoptr(virCPUData) featData = NULL;
|
||||
|
||||
if (!(map = virCPUx86GetMap()))
|
||||
@@ -2816,19 +2837,17 @@ virCPUx86Baseline(virCPUDef **cpus,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- modelName = cpus[0]->model;
|
||||
+ modelNames = g_new0(char *, ncpus + 1);
|
||||
+ if (cpus[0]->model)
|
||||
+ modelNames[namesLen++] = cpus[0]->model;
|
||||
+
|
||||
for (i = 1; i < ncpus; i++) {
|
||||
g_autoptr(virCPUx86Model) model = NULL;
|
||||
const char *vn = NULL;
|
||||
|
||||
- if (matchingNames && cpus[i]->model) {
|
||||
- if (!modelName) {
|
||||
- modelName = cpus[i]->model;
|
||||
- } else if (STRNEQ(modelName, cpus[i]->model)) {
|
||||
- modelName = NULL;
|
||||
- matchingNames = false;
|
||||
- }
|
||||
- }
|
||||
+ if (cpus[i]->model &&
|
||||
+ !g_strv_contains((const char **) modelNames, cpus[i]->model))
|
||||
+ modelNames[namesLen++] = cpus[i]->model;
|
||||
|
||||
if (!(model = x86ModelFromCPU(cpus[i], map, -1)))
|
||||
return NULL;
|
||||
@@ -2891,10 +2910,11 @@ virCPUx86Baseline(virCPUDef **cpus,
|
||||
virCPUx86DataAddItem(&base_model->data, &vendor->data) < 0)
|
||||
return NULL;
|
||||
|
||||
- if (x86Decode(cpu, &base_model->data, models, modelName, migratable) < 0)
|
||||
+ if (x86Decode(cpu, &base_model->data, models,
|
||||
+ (const char **) modelNames, migratable) < 0)
|
||||
return NULL;
|
||||
|
||||
- if (STREQ_NULLABLE(cpu->model, modelName))
|
||||
+ if (namesLen == 1 && STREQ(cpu->model, modelNames[0]))
|
||||
cpu->fallback = VIR_CPU_FALLBACK_FORBID;
|
||||
|
||||
if (!outputVendor)
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
|
||||
index 775a27de2e..f5846b1619 100644
|
||||
--- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
|
||||
+++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
|
||||
@@ -1,10 +1,14 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>SandyBridge</model>
|
||||
+ <model fallback='allow'>Westmere</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='require' name='vme'/>
|
||||
<feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='pclmuldq'/>
|
||||
<feature policy='require' name='pcid'/>
|
||||
+ <feature policy='require' name='x2apic'/>
|
||||
+ <feature policy='require' name='tsc-deadline'/>
|
||||
+ <feature policy='require' name='xsave'/>
|
||||
<feature policy='require' name='osxsave'/>
|
||||
+ <feature policy='require' name='avx'/>
|
||||
<feature policy='require' name='hypervisor'/>
|
||||
- <feature policy='disable' name='rdtscp'/>
|
||||
</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
|
||||
index cafca97d62..166833276c 100644
|
||||
--- a/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
|
||||
+++ b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
|
||||
@@ -1,11 +1,15 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>SandyBridge</model>
|
||||
+ <model fallback='allow'>Westmere</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='require' name='vme'/>
|
||||
<feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='pclmuldq'/>
|
||||
<feature policy='require' name='pcid'/>
|
||||
+ <feature policy='require' name='x2apic'/>
|
||||
+ <feature policy='require' name='tsc-deadline'/>
|
||||
+ <feature policy='require' name='xsave'/>
|
||||
<feature policy='require' name='osxsave'/>
|
||||
+ <feature policy='require' name='avx'/>
|
||||
<feature policy='require' name='hypervisor'/>
|
||||
<feature policy='require' name='invtsc'/>
|
||||
- <feature policy='disable' name='rdtscp'/>
|
||||
</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
index 46c32c996f..ecac749b97 100644
|
||||
--- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
@@ -1,17 +1,22 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>Cooperlake</model>
|
||||
+ <model fallback='allow'>Cascadelake-Server</model>
|
||||
<vendor>Intel</vendor>
|
||||
<feature policy='require' name='ss'/>
|
||||
<feature policy='require' name='vmx'/>
|
||||
<feature policy='require' name='hypervisor'/>
|
||||
<feature policy='require' name='tsc_adjust'/>
|
||||
- <feature policy='require' name='mpx'/>
|
||||
<feature policy='require' name='umip'/>
|
||||
+ <feature policy='require' name='pku'/>
|
||||
<feature policy='require' name='md-clear'/>
|
||||
+ <feature policy='require' name='stibp'/>
|
||||
+ <feature policy='require' name='arch-capabilities'/>
|
||||
<feature policy='require' name='xsaves'/>
|
||||
<feature policy='require' name='ibpb'/>
|
||||
<feature policy='require' name='amd-ssbd'/>
|
||||
+ <feature policy='require' name='rdctl-no'/>
|
||||
+ <feature policy='require' name='ibrs-all'/>
|
||||
+ <feature policy='require' name='skip-l1dfl-vmentry'/>
|
||||
+ <feature policy='require' name='mds-no'/>
|
||||
+ <feature policy='require' name='pschange-mc-no'/>
|
||||
<feature policy='require' name='tsx-ctrl'/>
|
||||
- <feature policy='disable' name='avx512-bf16'/>
|
||||
- <feature policy='disable' name='taa-no'/>
|
||||
</cpu>
|
||||
--
|
||||
2.35.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,73 @@
|
||||
From 3d7a4041d31e403dc9e762b34f7faf36f7f20a28 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3d7a4041d31e403dc9e762b34f7faf36f7f20a28@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Tue, 26 Apr 2022 15:02:51 +0200
|
||||
Subject: [PATCH] cpu_x86: Refactor feature list comparison in
|
||||
x86DecodeUseCandidate
|
||||
|
||||
It will become more complicated and so it deserves to be separated into
|
||||
a new function.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 1d6ca40ac23c039abc4392b668f256d0eda33280)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/cpu/cpu_x86.c | 31 ++++++++++++++++++++++---------
|
||||
1 file changed, 22 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||
index f007487824..81c2441b8b 100644
|
||||
--- a/src/cpu/cpu_x86.c
|
||||
+++ b/src/cpu/cpu_x86.c
|
||||
@@ -1970,6 +1970,27 @@ virCPUx86Compare(virCPUDef *host,
|
||||
}
|
||||
|
||||
|
||||
+static int
|
||||
+virCPUx86CompareCandidateFeatureList(virCPUDef *cpuCurrent,
|
||||
+ virCPUDef *cpuCandidate)
|
||||
+{
|
||||
+ size_t current = cpuCurrent->nfeatures;
|
||||
+ size_t candidate = cpuCandidate->nfeatures;
|
||||
+
|
||||
+ if (candidate < current) {
|
||||
+ VIR_DEBUG("%s is better than %s: %zu < %zu",
|
||||
+ cpuCandidate->model, cpuCurrent->model,
|
||||
+ candidate, current);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ VIR_DEBUG("%s is not better than %s: %zu >= %zu",
|
||||
+ cpuCandidate->model, cpuCurrent->model,
|
||||
+ candidate, current);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Checks whether a candidate model is a better fit for the CPU data than the
|
||||
* current model.
|
||||
@@ -2038,15 +2059,7 @@ x86DecodeUseCandidate(virCPUx86Model *current,
|
||||
}
|
||||
}
|
||||
|
||||
- if (cpuCurrent->nfeatures > cpuCandidate->nfeatures) {
|
||||
- VIR_DEBUG("%s results in shorter feature list than %s",
|
||||
- cpuCandidate->model, cpuCurrent->model);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
- VIR_DEBUG("%s does not result in shorter feature list than %s",
|
||||
- cpuCandidate->model, cpuCurrent->model);
|
||||
- return 0;
|
||||
+ return virCPUx86CompareCandidateFeatureList(cpuCurrent, cpuCandidate);
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
498
SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch
Normal file
498
SOURCES/libvirt-cputest-Add-some-real-world-baseline-tests.patch
Normal file
@ -0,0 +1,498 @@
|
||||
From b37a398da4323407de24d19afac937eac80170cc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b37a398da4323407de24d19afac937eac80170cc@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Thu, 21 Apr 2022 18:25:15 +0200
|
||||
Subject: [PATCH] cputest: Add some real world baseline tests
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 63d633b9a4fc42da7e2acaf45501914607d968a5)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
tests/cputest.c | 118 +++++++++++++++---
|
||||
...id-baseline-Broadwell-IBRS+Cascadelake.xml | 11 ++
|
||||
..._64-cpuid-baseline-Cascadelake+Icelake.xml | 14 +++
|
||||
...puid-baseline-Cascadelake+Skylake-IBRS.xml | 12 ++
|
||||
..._64-cpuid-baseline-Cascadelake+Skylake.xml | 8 ++
|
||||
...-cpuid-baseline-Cooperlake+Cascadelake.xml | 17 +++
|
||||
...6_64-cpuid-baseline-Cooperlake+Icelake.xml | 14 +++
|
||||
.../x86_64-cpuid-baseline-EPYC+Rome.xml | 13 ++
|
||||
.../x86_64-cpuid-baseline-Haswell+Skylake.xml | 14 +++
|
||||
...-baseline-Haswell-noTSX-IBRS+Broadwell.xml | 14 +++
|
||||
...seline-Haswell-noTSX-IBRS+Skylake-IBRS.xml | 14 +++
|
||||
...id-baseline-Haswell-noTSX-IBRS+Skylake.xml | 14 +++
|
||||
.../x86_64-cpuid-baseline-Ryzen+Rome.xml | 13 ++
|
||||
...4-cpuid-baseline-Skylake-Client+Server.xml | 9 ++
|
||||
14 files changed, 271 insertions(+), 14 deletions(-)
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
|
||||
create mode 100644 tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
|
||||
|
||||
diff --git a/tests/cputest.c b/tests/cputest.c
|
||||
index b939e20718..b39ec7e18b 100644
|
||||
--- a/tests/cputest.c
|
||||
+++ b/tests/cputest.c
|
||||
@@ -58,6 +58,8 @@ struct data {
|
||||
const char *name;
|
||||
virDomainCapsCPUModels *models;
|
||||
const char *modelsName;
|
||||
+ const char **cpus;
|
||||
+ int ncpus;
|
||||
unsigned int flags;
|
||||
int result;
|
||||
};
|
||||
@@ -561,6 +563,60 @@ cpuTestCPUID(bool guest, const void *arg)
|
||||
}
|
||||
|
||||
|
||||
+static int
|
||||
+cpuTestCPUIDBaseline(const void *arg)
|
||||
+{
|
||||
+ const struct data *data = arg;
|
||||
+ int ret = -1;
|
||||
+ virCPUDef **cpus = NULL;
|
||||
+ virCPUDef *baseline = NULL;
|
||||
+ g_autofree char *result = NULL;
|
||||
+ size_t i;
|
||||
+
|
||||
+ cpus = g_new0(virCPUDef *, data->ncpus);
|
||||
+ for (i = 0; i < data->ncpus; i++) {
|
||||
+ g_autofree char *name = NULL;
|
||||
+
|
||||
+ name = g_strdup_printf("cpuid-%s-json", data->cpus[i]);
|
||||
+ if (!(cpus[i] = cpuTestLoadXML(data->arch, name)))
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ baseline = virCPUBaseline(data->arch, cpus, data->ncpus, NULL, NULL, false);
|
||||
+ if (!baseline)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ result = g_strdup_printf("cpuid-baseline-%s", data->name);
|
||||
+
|
||||
+ if (cpuTestCompareXML(data->arch, baseline, result) < 0)
|
||||
+ goto cleanup;
|
||||
+
|
||||
+ for (i = 0; i < data->ncpus; i++) {
|
||||
+ virCPUCompareResult cmp;
|
||||
+
|
||||
+ cmp = virCPUCompare(data->arch, cpus[i], baseline, false);
|
||||
+ if (cmp != VIR_CPU_COMPARE_SUPERSET &&
|
||||
+ cmp != VIR_CPU_COMPARE_IDENTICAL) {
|
||||
+ VIR_TEST_VERBOSE("\nbaseline CPU is incompatible with CPU %zu", i);
|
||||
+ VIR_TEST_VERBOSE("%74s", "... ");
|
||||
+ ret = -1;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ret = 0;
|
||||
+
|
||||
+ cleanup:
|
||||
+ if (cpus) {
|
||||
+ for (i = 0; i < data->ncpus; i++)
|
||||
+ virCPUDefFree(cpus[i]);
|
||||
+ VIR_FREE(cpus);
|
||||
+ }
|
||||
+ virCPUDefFree(baseline);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
cpuTestHostCPUID(const void *arg)
|
||||
{
|
||||
@@ -888,13 +944,13 @@ mymain(void)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
-#define DO_TEST(arch, api, name, host, cpu, \
|
||||
+#define DO_TEST(arch, api, name, host, cpu, cpus, ncpus, \
|
||||
models, flags, result) \
|
||||
do { \
|
||||
struct data data = { \
|
||||
arch, host, cpu, models, \
|
||||
models == NULL ? NULL : #models, \
|
||||
- flags, result \
|
||||
+ cpus, ncpus, flags, result \
|
||||
}; \
|
||||
g_autofree char *testLabel = NULL; \
|
||||
\
|
||||
@@ -907,12 +963,12 @@ mymain(void)
|
||||
#define DO_TEST_COMPARE(arch, host, cpu, result) \
|
||||
DO_TEST(arch, cpuTestCompare, \
|
||||
host "/" cpu " (" #result ")", \
|
||||
- host, cpu, NULL, 0, result)
|
||||
+ host, cpu, NULL, 0, NULL, 0, result)
|
||||
|
||||
#define DO_TEST_UPDATE_ONLY(arch, host, cpu) \
|
||||
DO_TEST(arch, cpuTestUpdate, \
|
||||
cpu " on " host, \
|
||||
- host, cpu, NULL, 0, 0)
|
||||
+ host, cpu, NULL, 0, NULL, 0, 0)
|
||||
|
||||
#define DO_TEST_UPDATE(arch, host, cpu, result) \
|
||||
do { \
|
||||
@@ -930,31 +986,31 @@ mymain(void)
|
||||
suffix = " (migratable)"; \
|
||||
label = g_strdup_printf("%s%s", name, suffix); \
|
||||
DO_TEST(arch, cpuTestBaseline, label, NULL, \
|
||||
- "baseline-" name, NULL, flags, result); \
|
||||
+ "baseline-" name, NULL, 0, NULL, flags, result); \
|
||||
} while (0)
|
||||
|
||||
#define DO_TEST_HASFEATURE(arch, host, feature, result) \
|
||||
DO_TEST(arch, cpuTestHasFeature, \
|
||||
host "/" feature " (" #result ")", \
|
||||
- host, feature, NULL, 0, result)
|
||||
+ host, feature, NULL, 0, NULL, 0, result)
|
||||
|
||||
#define DO_TEST_GUESTCPU(arch, host, cpu, models, result) \
|
||||
DO_TEST(arch, cpuTestGuestCPU, \
|
||||
host "/" cpu " (" #models ")", \
|
||||
- host, cpu, models, 0, result)
|
||||
+ host, cpu, NULL, 0, models, 0, result)
|
||||
|
||||
#if WITH_QEMU
|
||||
# define DO_TEST_JSON(arch, host, json) \
|
||||
do { \
|
||||
if (json == JSON_MODELS) { \
|
||||
DO_TEST(arch, cpuTestGuestCPUID, host, host, \
|
||||
- NULL, NULL, 0, 0); \
|
||||
+ NULL, NULL, 0, NULL, 0, 0); \
|
||||
} \
|
||||
if (json != JSON_NONE) { \
|
||||
DO_TEST(arch, cpuTestJSONCPUID, host, host, \
|
||||
- NULL, NULL, json, 0); \
|
||||
+ NULL, NULL, 0, NULL, json, 0); \
|
||||
DO_TEST(arch, cpuTestJSONSignature, host, host, \
|
||||
- NULL, NULL, 0, 0); \
|
||||
+ NULL, NULL, 0, NULL, 0, 0); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
@@ -964,18 +1020,26 @@ mymain(void)
|
||||
#define DO_TEST_CPUID(arch, host, json) \
|
||||
do { \
|
||||
DO_TEST(arch, cpuTestHostCPUID, host, host, \
|
||||
- NULL, NULL, 0, 0); \
|
||||
+ NULL, NULL, 0, NULL, 0, 0); \
|
||||
DO_TEST(arch, cpuTestGuestCPUID, host, host, \
|
||||
- NULL, NULL, json, 0); \
|
||||
+ NULL, NULL, 0, NULL, json, 0); \
|
||||
DO_TEST(arch, cpuTestCPUIDSignature, host, host, \
|
||||
- NULL, NULL, 0, 0); \
|
||||
+ NULL, NULL, 0, NULL, 0, 0); \
|
||||
DO_TEST_JSON(arch, host, json); \
|
||||
if (json != JSON_NONE) { \
|
||||
DO_TEST(arch, cpuTestUpdateLive, host, host, \
|
||||
- NULL, NULL, json, 0); \
|
||||
+ NULL, NULL, 0, NULL, json, 0); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
+#define DO_TEST_CPUID_BASELINE(arch, label, cpu1, cpu2) \
|
||||
+ do { \
|
||||
+ const char *cpus[] = {cpu1, cpu2}; \
|
||||
+ DO_TEST(arch, cpuTestCPUIDBaseline, \
|
||||
+ label " (" cpu1 ", " cpu2 ")", \
|
||||
+ NULL, label, cpus, 2, NULL, 0, 0); \
|
||||
+ } while (0)
|
||||
+
|
||||
/* host to host comparison */
|
||||
DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE(VIR_ARCH_X86_64, "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
@@ -1157,6 +1221,32 @@ mymain(void)
|
||||
DO_TEST_CPUID(VIR_ARCH_X86_64, "Ice-Lake-Server", JSON_MODELS);
|
||||
DO_TEST_CPUID(VIR_ARCH_X86_64, "Cooperlake", JSON_MODELS);
|
||||
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Ryzen+Rome",
|
||||
+ "Ryzen-7-1800X-Eight-Core", "Ryzen-9-3900X-12-Core");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "EPYC+Rome",
|
||||
+ "EPYC-7601-32-Core", "EPYC-7502-32-Core");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake",
|
||||
+ "Xeon-E5-2609-v3", "Xeon-Gold-6148");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Skylake-IBRS",
|
||||
+ "Xeon-E5-2609-v3", "Xeon-Gold-6130");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Broadwell-IBRS+Cascadelake",
|
||||
+ "Xeon-E5-2623-v4", "Xeon-Platinum-8268");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake-IBRS",
|
||||
+ "Xeon-Platinum-8268", "Xeon-Gold-6130");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Skylake",
|
||||
+ "Xeon-Platinum-9242", "Xeon-Gold-6148");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cascadelake+Icelake",
|
||||
+ "Xeon-Platinum-9242", "Ice-Lake-Server");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Icelake",
|
||||
+ "Cooperlake", "Ice-Lake-Server");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Cooperlake+Cascadelake",
|
||||
+ "Cooperlake", "Xeon-Platinum-9242");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Skylake-Client+Server",
|
||||
+ "Core-i5-6600", "Xeon-Gold-6148");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell-noTSX-IBRS+Broadwell",
|
||||
+ "Xeon-E5-2609-v3", "Xeon-E5-2650-v4");
|
||||
+ DO_TEST_CPUID_BASELINE(VIR_ARCH_X86_64, "Haswell+Skylake",
|
||||
+ "Xeon-E7-8890-v3", "Xeon-Gold-5115");
|
||||
cleanup:
|
||||
#if WITH_QEMU
|
||||
qemuTestDriverFree(&driver);
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..4e3f253e9b
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Broadwell-IBRS+Cascadelake.xml
|
||||
@@ -0,0 +1,11 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Skylake-Client-IBRS</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='disable' name='mpx'/>
|
||||
+ <feature policy='disable' name='xsavec'/>
|
||||
+ <feature policy='disable' name='xgetbv1'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..e372a3e446
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Icelake.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Cooperlake</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='mpx'/>
|
||||
+ <feature policy='require' name='umip'/>
|
||||
+ <feature policy='require' name='xsaves'/>
|
||||
+ <feature policy='disable' name='avx512-bf16'/>
|
||||
+ <feature policy='disable' name='mds-no'/>
|
||||
+ <feature policy='disable' name='pschange-mc-no'/>
|
||||
+ <feature policy='disable' name='taa-no'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
|
||||
new file mode 100644
|
||||
index 0000000000..e559e01583
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake-IBRS.xml
|
||||
@@ -0,0 +1,12 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Cascadelake-Server</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='umip'/>
|
||||
+ <feature policy='require' name='pku'/>
|
||||
+ <feature policy='require' name='xsaves'/>
|
||||
+ <feature policy='require' name='skip-l1dfl-vmentry'/>
|
||||
+ <feature policy='disable' name='avx512vnni'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..906259df0b
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cascadelake+Skylake.xml
|
||||
@@ -0,0 +1,8 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Skylake-Server</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='clflushopt'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..46c32c996f
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml
|
||||
@@ -0,0 +1,17 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Cooperlake</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='vmx'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='mpx'/>
|
||||
+ <feature policy='require' name='umip'/>
|
||||
+ <feature policy='require' name='md-clear'/>
|
||||
+ <feature policy='require' name='xsaves'/>
|
||||
+ <feature policy='require' name='ibpb'/>
|
||||
+ <feature policy='require' name='amd-ssbd'/>
|
||||
+ <feature policy='require' name='tsx-ctrl'/>
|
||||
+ <feature policy='disable' name='avx512-bf16'/>
|
||||
+ <feature policy='disable' name='taa-no'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..e372a3e446
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Icelake.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Cooperlake</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='mpx'/>
|
||||
+ <feature policy='require' name='umip'/>
|
||||
+ <feature policy='require' name='xsaves'/>
|
||||
+ <feature policy='disable' name='avx512-bf16'/>
|
||||
+ <feature policy='disable' name='mds-no'/>
|
||||
+ <feature policy='disable' name='pschange-mc-no'/>
|
||||
+ <feature policy='disable' name='taa-no'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
|
||||
new file mode 100644
|
||||
index 0000000000..e1984b2890
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-EPYC+Rome.xml
|
||||
@@ -0,0 +1,13 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>EPYC</model>
|
||||
+ <vendor>AMD</vendor>
|
||||
+ <feature policy='require' name='x2apic'/>
|
||||
+ <feature policy='require' name='tsc-deadline'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='cmp_legacy'/>
|
||||
+ <feature policy='require' name='npt'/>
|
||||
+ <feature policy='require' name='nrip-save'/>
|
||||
+ <feature policy='disable' name='svm'/>
|
||||
+ <feature policy='disable' name='monitor'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..e687a679b3
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell+Skylake.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Haswell</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='vme'/>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='f16c'/>
|
||||
+ <feature policy='require' name='rdrand'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='arat'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='xsaveopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='require' name='abm'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
|
||||
new file mode 100644
|
||||
index 0000000000..651457b17a
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Broadwell.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Haswell-noTSX</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='vme'/>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='f16c'/>
|
||||
+ <feature policy='require' name='rdrand'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='arat'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='xsaveopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='require' name='abm'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
|
||||
new file mode 100644
|
||||
index 0000000000..8bda1c02e2
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake-IBRS.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Haswell-noTSX-IBRS</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='vme'/>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='f16c'/>
|
||||
+ <feature policy='require' name='rdrand'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='arat'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='xsaveopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='require' name='abm'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
|
||||
new file mode 100644
|
||||
index 0000000000..651457b17a
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Haswell-noTSX-IBRS+Skylake.xml
|
||||
@@ -0,0 +1,14 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Haswell-noTSX</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='vme'/>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='f16c'/>
|
||||
+ <feature policy='require' name='rdrand'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='arat'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='xsaveopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+ <feature policy='require' name='abm'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
|
||||
new file mode 100644
|
||||
index 0000000000..051402b9d5
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Ryzen+Rome.xml
|
||||
@@ -0,0 +1,13 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>EPYC</model>
|
||||
+ <vendor>AMD</vendor>
|
||||
+ <feature policy='require' name='x2apic'/>
|
||||
+ <feature policy='require' name='tsc-deadline'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='cmp_legacy'/>
|
||||
+ <feature policy='require' name='npt'/>
|
||||
+ <feature policy='require' name='nrip-save'/>
|
||||
+ <feature policy='disable' name='sha-ni'/>
|
||||
+ <feature policy='disable' name='monitor'/>
|
||||
+</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
|
||||
new file mode 100644
|
||||
index 0000000000..d46ff26eeb
|
||||
--- /dev/null
|
||||
+++ b/tests/cputestdata/x86_64-cpuid-baseline-Skylake-Client+Server.xml
|
||||
@@ -0,0 +1,9 @@
|
||||
+<cpu mode='custom' match='exact'>
|
||||
+ <model fallback='allow'>Skylake-Client</model>
|
||||
+ <vendor>Intel</vendor>
|
||||
+ <feature policy='require' name='ss'/>
|
||||
+ <feature policy='require' name='hypervisor'/>
|
||||
+ <feature policy='require' name='tsc_adjust'/>
|
||||
+ <feature policy='require' name='clflushopt'/>
|
||||
+ <feature policy='require' name='pdpe1gb'/>
|
||||
+</cpu>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,334 @@
|
||||
From 50d94f13286ca19ef1f457be72debdbf77547df6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <50d94f13286ca19ef1f457be72debdbf77547df6@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 4 May 2022 16:21:38 +0200
|
||||
Subject: [PATCH] cputest: Drop some old artificial baseline tests
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 6aff36019bbaf643f451779621c6c88cab0e64a7)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
tests/cputest.c | 6 ---
|
||||
.../cputestdata/x86_64-baseline-1-result.xml | 5 --
|
||||
tests/cputestdata/x86_64-baseline-1.xml | 20 --------
|
||||
.../cputestdata/x86_64-baseline-2-result.xml | 4 --
|
||||
tests/cputestdata/x86_64-baseline-2.xml | 22 ---------
|
||||
.../x86_64-baseline-5-expanded.xml | 47 -------------------
|
||||
.../cputestdata/x86_64-baseline-5-result.xml | 10 ----
|
||||
tests/cputestdata/x86_64-baseline-5.xml | 35 --------------
|
||||
.../cputestdata/x86_64-baseline-7-result.xml | 4 --
|
||||
tests/cputestdata/x86_64-baseline-7.xml | 24 ----------
|
||||
.../cputestdata/x86_64-baseline-8-result.xml | 4 --
|
||||
tests/cputestdata/x86_64-baseline-8.xml | 28 -----------
|
||||
12 files changed, 209 deletions(-)
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-1-result.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-1.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-2-result.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-2.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-5-expanded.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-5-result.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-5.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-7-result.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-7.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-8-result.xml
|
||||
delete mode 100644 tests/cputestdata/x86_64-baseline-8.xml
|
||||
|
||||
diff --git a/tests/cputest.c b/tests/cputest.c
|
||||
index 0f0621292a..20d56836be 100644
|
||||
--- a/tests/cputest.c
|
||||
+++ b/tests/cputest.c
|
||||
@@ -1051,18 +1051,12 @@ mymain(void)
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "1", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "2", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "7", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "8", 0, 0);
|
||||
|
||||
DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1);
|
||||
DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0);
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-1-result.xml b/tests/cputestdata/x86_64-baseline-1-result.xml
|
||||
deleted file mode 100644
|
||||
index 96c4f43b3d..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-1-result.xml
|
||||
+++ /dev/null
|
||||
@@ -1,5 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>Conroe</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <feature policy='disable' name='lahf_lm'/>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-1.xml b/tests/cputestdata/x86_64-baseline-1.xml
|
||||
deleted file mode 100644
|
||||
index 509e6a85d2..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-1.xml
|
||||
+++ /dev/null
|
||||
@@ -1,20 +0,0 @@
|
||||
-<cpuTest>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Penryn</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='2' cores='4' threads='1'/>
|
||||
-</cpu>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Conroe</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='1' threads='1'/>
|
||||
-</cpu>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>core2duo</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='1' threads='1'/>
|
||||
-</cpu>
|
||||
-</cpuTest>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-2-result.xml b/tests/cputestdata/x86_64-baseline-2-result.xml
|
||||
deleted file mode 100644
|
||||
index a11352d0b1..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-2-result.xml
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>core2duo</model>
|
||||
- <feature policy='disable' name='nx'/>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-2.xml b/tests/cputestdata/x86_64-baseline-2.xml
|
||||
deleted file mode 100644
|
||||
index 055223fd34..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-2.xml
|
||||
+++ /dev/null
|
||||
@@ -1,22 +0,0 @@
|
||||
-<cpuTest>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>core2duo</model>
|
||||
- <topology sockets='1' cores='2' threads='1'/>
|
||||
-</cpu>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>pentiumpro</model>
|
||||
- <topology sockets='1' cores='2' threads='1'/>
|
||||
- <feature name='mtrr'/>
|
||||
- <feature name='clflush'/>
|
||||
- <feature name='mca'/>
|
||||
- <feature name='vme'/>
|
||||
- <feature name='pse36'/>
|
||||
- <feature name='pni'/>
|
||||
- <feature name='monitor'/>
|
||||
- <feature name='ssse3'/>
|
||||
- <feature name='lm'/>
|
||||
- <feature name='syscall'/>
|
||||
-</cpu>
|
||||
-</cpuTest>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-5-expanded.xml b/tests/cputestdata/x86_64-baseline-5-expanded.xml
|
||||
deleted file mode 100644
|
||||
index 2c1b400150..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-5-expanded.xml
|
||||
+++ /dev/null
|
||||
@@ -1,47 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>SandyBridge</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <feature policy='require' name='aes'/>
|
||||
- <feature policy='require' name='apic'/>
|
||||
- <feature policy='require' name='avx'/>
|
||||
- <feature policy='require' name='clflush'/>
|
||||
- <feature policy='require' name='cmov'/>
|
||||
- <feature policy='require' name='cx16'/>
|
||||
- <feature policy='require' name='cx8'/>
|
||||
- <feature policy='require' name='de'/>
|
||||
- <feature policy='require' name='fpu'/>
|
||||
- <feature policy='require' name='fxsr'/>
|
||||
- <feature policy='require' name='hypervisor'/>
|
||||
- <feature policy='require' name='lahf_lm'/>
|
||||
- <feature policy='require' name='lm'/>
|
||||
- <feature policy='require' name='mca'/>
|
||||
- <feature policy='require' name='mce'/>
|
||||
- <feature policy='require' name='mmx'/>
|
||||
- <feature policy='require' name='msr'/>
|
||||
- <feature policy='require' name='mtrr'/>
|
||||
- <feature policy='require' name='nx'/>
|
||||
- <feature policy='require' name='osxsave'/>
|
||||
- <feature policy='require' name='pae'/>
|
||||
- <feature policy='require' name='pat'/>
|
||||
- <feature policy='require' name='pcid'/>
|
||||
- <feature policy='require' name='pclmuldq'/>
|
||||
- <feature policy='require' name='pge'/>
|
||||
- <feature policy='require' name='pni'/>
|
||||
- <feature policy='require' name='popcnt'/>
|
||||
- <feature policy='require' name='pse'/>
|
||||
- <feature policy='require' name='pse36'/>
|
||||
- <feature policy='disable' name='rdtscp'/>
|
||||
- <feature policy='require' name='sep'/>
|
||||
- <feature policy='require' name='ss'/>
|
||||
- <feature policy='require' name='sse'/>
|
||||
- <feature policy='require' name='sse2'/>
|
||||
- <feature policy='require' name='sse4.1'/>
|
||||
- <feature policy='require' name='sse4.2'/>
|
||||
- <feature policy='require' name='ssse3'/>
|
||||
- <feature policy='require' name='syscall'/>
|
||||
- <feature policy='require' name='tsc'/>
|
||||
- <feature policy='require' name='tsc-deadline'/>
|
||||
- <feature policy='require' name='vme'/>
|
||||
- <feature policy='require' name='x2apic'/>
|
||||
- <feature policy='require' name='xsave'/>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-5-result.xml b/tests/cputestdata/x86_64-baseline-5-result.xml
|
||||
deleted file mode 100644
|
||||
index 775a27de2e..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-5-result.xml
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>SandyBridge</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <feature policy='require' name='vme'/>
|
||||
- <feature policy='require' name='ss'/>
|
||||
- <feature policy='require' name='pcid'/>
|
||||
- <feature policy='require' name='osxsave'/>
|
||||
- <feature policy='require' name='hypervisor'/>
|
||||
- <feature policy='disable' name='rdtscp'/>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-5.xml b/tests/cputestdata/x86_64-baseline-5.xml
|
||||
deleted file mode 100644
|
||||
index 80cd533ca4..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-5.xml
|
||||
+++ /dev/null
|
||||
@@ -1,35 +0,0 @@
|
||||
-<cpuTest>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Westmere</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='4' cores='1' threads='1'/>
|
||||
- <feature name='hypervisor'/>
|
||||
- <feature name='avx'/>
|
||||
- <feature name='osxsave'/>
|
||||
- <feature name='xsave'/>
|
||||
- <feature name='tsc-deadline'/>
|
||||
- <feature name='x2apic'/>
|
||||
- <feature name='pcid'/>
|
||||
- <feature name='pclmuldq'/>
|
||||
- <feature name='ss'/>
|
||||
- <feature name='vme'/>
|
||||
-</cpu>
|
||||
-<cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Nehalem</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='4' cores='1' threads='1'/>
|
||||
- <feature name='aes'/>
|
||||
- <feature name='hypervisor'/>
|
||||
- <feature name='avx'/>
|
||||
- <feature name='osxsave'/>
|
||||
- <feature name='xsave'/>
|
||||
- <feature name='tsc-deadline'/>
|
||||
- <feature name='x2apic'/>
|
||||
- <feature name='pcid'/>
|
||||
- <feature name='pclmuldq'/>
|
||||
- <feature name='ss'/>
|
||||
- <feature name='vme'/>
|
||||
-</cpu>
|
||||
-</cpuTest>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-7-result.xml b/tests/cputestdata/x86_64-baseline-7-result.xml
|
||||
deleted file mode 100644
|
||||
index 2af549e77a..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-7-result.xml
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>Haswell-noTSX</model>
|
||||
- <vendor>Intel</vendor>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-7.xml b/tests/cputestdata/x86_64-baseline-7.xml
|
||||
deleted file mode 100644
|
||||
index b7e61b160c..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-7.xml
|
||||
+++ /dev/null
|
||||
@@ -1,24 +0,0 @@
|
||||
-<cpuTest>
|
||||
- <cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>SandyBridge</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='2' threads='2'/>
|
||||
- <feature name='invpcid'/>
|
||||
- <feature name='erms'/>
|
||||
- <feature name='bmi2'/>
|
||||
- <feature name='smep'/>
|
||||
- <feature name='avx2'/>
|
||||
- <feature name='bmi1'/>
|
||||
- <feature name='fsgsbase'/>
|
||||
- <feature name='movbe'/>
|
||||
- <feature name='pcid'/>
|
||||
- <feature name='fma'/>
|
||||
- </cpu>
|
||||
- <cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Haswell-noTSX</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='2' threads='2'/>
|
||||
- </cpu>
|
||||
-</cpuTest>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-8-result.xml b/tests/cputestdata/x86_64-baseline-8-result.xml
|
||||
deleted file mode 100644
|
||||
index 88226b3dab..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-8-result.xml
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-<cpu mode='custom' match='exact'>
|
||||
- <model fallback='allow'>Broadwell-noTSX</model>
|
||||
- <vendor>Intel</vendor>
|
||||
-</cpu>
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-8.xml b/tests/cputestdata/x86_64-baseline-8.xml
|
||||
deleted file mode 100644
|
||||
index f1ee67d542..0000000000
|
||||
--- a/tests/cputestdata/x86_64-baseline-8.xml
|
||||
+++ /dev/null
|
||||
@@ -1,28 +0,0 @@
|
||||
-<cpuTest>
|
||||
- <cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>SandyBridge</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='2' threads='2'/>
|
||||
- <feature name='invpcid'/>
|
||||
- <feature name='erms'/>
|
||||
- <feature name='bmi2'/>
|
||||
- <feature name='smep'/>
|
||||
- <feature name='avx2'/>
|
||||
- <feature name='bmi1'/>
|
||||
- <feature name='fsgsbase'/>
|
||||
- <feature name='movbe'/>
|
||||
- <feature name='pcid'/>
|
||||
- <feature name='fma'/>
|
||||
- <feature name='3dnowprefetch'/>
|
||||
- <feature name='rdseed'/>
|
||||
- <feature name='adx'/>
|
||||
- <feature name='smap'/>
|
||||
- </cpu>
|
||||
- <cpu>
|
||||
- <arch>x86_64</arch>
|
||||
- <model>Broadwell-noTSX</model>
|
||||
- <vendor>Intel</vendor>
|
||||
- <topology sockets='1' cores='2' threads='2'/>
|
||||
- </cpu>
|
||||
-</cpuTest>
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,97 @@
|
||||
From 6cf9cd8f6d9e90eadd58d8a37129e7401876e4e8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <6cf9cd8f6d9e90eadd58d8a37129e7401876e4e8@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 4 May 2022 16:28:03 +0200
|
||||
Subject: [PATCH] cputest: Give better names to baseline tests
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 3daa68e26514dc114d71f4c44f7d728e93a53cd0)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1851227
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
tests/cputest.c | 12 ++++++------
|
||||
... x86_64-baseline-Westmere+Nehalem-migratable.xml} | 0
|
||||
...l => x86_64-baseline-Westmere+Nehalem-result.xml} | 0
|
||||
...ne-6.xml => x86_64-baseline-Westmere+Nehalem.xml} | 0
|
||||
...ded.xml => x86_64-baseline-features-expanded.xml} | 0
|
||||
...esult.xml => x86_64-baseline-features-result.xml} | 0
|
||||
...4-baseline-4.xml => x86_64-baseline-features.xml} | 0
|
||||
...anded.xml => x86_64-baseline-simple-expanded.xml} | 0
|
||||
...-result.xml => x86_64-baseline-simple-result.xml} | 0
|
||||
..._64-baseline-3.xml => x86_64-baseline-simple.xml} | 0
|
||||
10 files changed, 6 insertions(+), 6 deletions(-)
|
||||
rename tests/cputestdata/{x86_64-baseline-6-migratable.xml => x86_64-baseline-Westmere+Nehalem-migratable.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-6-result.xml => x86_64-baseline-Westmere+Nehalem-result.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-6.xml => x86_64-baseline-Westmere+Nehalem.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-4-expanded.xml => x86_64-baseline-features-expanded.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-4-result.xml => x86_64-baseline-features-result.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-4.xml => x86_64-baseline-features.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-3-expanded.xml => x86_64-baseline-simple-expanded.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-3-result.xml => x86_64-baseline-simple-result.xml} (100%)
|
||||
rename tests/cputestdata/{x86_64-baseline-3.xml => x86_64-baseline-simple.xml} (100%)
|
||||
|
||||
diff --git a/tests/cputest.c b/tests/cputest.c
|
||||
index 20d56836be..b939e20718 100644
|
||||
--- a/tests/cputest.c
|
||||
+++ b/tests/cputest.c
|
||||
@@ -1051,12 +1051,12 @@ mymain(void)
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "incompatible-vendors", 0, -1);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "no-vendor", 0, 0);
|
||||
DO_TEST_BASELINE(VIR_ARCH_X86_64, "some-vendors", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", 0, 0);
|
||||
- DO_TEST_BASELINE(VIR_ARCH_X86_64, "6", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", 0, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "simple", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", 0, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "features", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", 0, 0);
|
||||
+ DO_TEST_BASELINE(VIR_ARCH_X86_64, "Westmere+Nehalem", VIR_CONNECT_BASELINE_CPU_MIGRATABLE, 0);
|
||||
|
||||
DO_TEST_BASELINE(VIR_ARCH_PPC64, "incompatible-vendors", 0, -1);
|
||||
DO_TEST_BASELINE(VIR_ARCH_PPC64, "no-vendor", 0, 0);
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-6-migratable.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-6-migratable.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-migratable.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-6-result.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-6-result.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem-result.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-6.xml b/tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-6.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-Westmere+Nehalem.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-4-expanded.xml b/tests/cputestdata/x86_64-baseline-features-expanded.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-4-expanded.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-features-expanded.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-4-result.xml b/tests/cputestdata/x86_64-baseline-features-result.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-4-result.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-features-result.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-4.xml b/tests/cputestdata/x86_64-baseline-features.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-4.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-features.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-3-expanded.xml b/tests/cputestdata/x86_64-baseline-simple-expanded.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-3-expanded.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-simple-expanded.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-3-result.xml b/tests/cputestdata/x86_64-baseline-simple-result.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-3-result.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-simple-result.xml
|
||||
diff --git a/tests/cputestdata/x86_64-baseline-3.xml b/tests/cputestdata/x86_64-baseline-simple.xml
|
||||
similarity index 100%
|
||||
rename from tests/cputestdata/x86_64-baseline-3.xml
|
||||
rename to tests/cputestdata/x86_64-baseline-simple.xml
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,123 +0,0 @@
|
||||
From 8d48d5fe02c0afcf5bbe68e0a182ee11f9a108dc Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <8d48d5fe02c0afcf5bbe68e0a182ee11f9a108dc.1708614745.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Mon, 19 Feb 2024 15:37:16 +0100
|
||||
Subject: [PATCH] domain_validate: Account for NVDIMM label size properly when
|
||||
checking for memory conflicts
|
||||
|
||||
As of v9.8.0-rc1~7 we check whether two <memory/> devices don't
|
||||
overlap (since we allow setting where a <memory/> device should
|
||||
be mapped to). We do this pretty straightforward, by comparing
|
||||
start and end address of each <memory/> device combination.
|
||||
But since only the start address is given (an exposed in the
|
||||
XML), the end address is computed trivially as:
|
||||
|
||||
start + mem->size * 1024
|
||||
|
||||
And for majority of memory device types this works. Except for
|
||||
NVDIMMs. For them the <memory/> device consists of two separate
|
||||
regions: 1) actual memory device, and 2) label.
|
||||
|
||||
Label is where NVDIMM stores some additional information like
|
||||
namespaces partition and so on. But it's not mapped into the
|
||||
guest the same way as actual memory device. In fact, mem->size is
|
||||
a sum of both actual memory device and label sizes. And to make
|
||||
things a bit worse, both sizes are subject to alignment (either
|
||||
the alignsize value specified in XML, or system page size if not
|
||||
specified in XML).
|
||||
|
||||
Therefore, to get the size of actual memory device we need to
|
||||
take mem->size and substract label size rounded up to alignment.
|
||||
|
||||
If we don't do this we report there's an overlap between two
|
||||
NVDIMMs even when in reality there's none.
|
||||
|
||||
Fixes: 3fd64fb0e236fc80ffa2cc977c0d471f11fc39bf
|
||||
Fixes: 91f9a9fb4fc0d34ed8d7a869de3d9f87687c3618
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-4452?focusedId=23805174#comment-23805174
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
|
||||
(cherry picked from commit 4545f313c23e7000451d1cec793ebc8da1a2c25f)
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/conf/domain_validate.c | 51 ++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 49 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
|
||||
index 46479f10f2..faa7659f07 100644
|
||||
--- a/src/conf/domain_validate.c
|
||||
+++ b/src/conf/domain_validate.c
|
||||
@@ -2225,6 +2225,53 @@ virDomainHostdevDefValidate(const virDomainHostdevDef *hostdev)
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * virDomainMemoryGetMappedSize:
|
||||
+ * @mem: memory device definition
|
||||
+ *
|
||||
+ * For given memory device definition (@mem) calculate size mapped into
|
||||
+ * the guest. This is usually mem->size, except for NVDIMM where its
|
||||
+ * label is mapped elsewhere.
|
||||
+ *
|
||||
+ * Returns: Number of bytes a memory device takes when mapped into a
|
||||
+ * guest.
|
||||
+ */
|
||||
+static unsigned long long
|
||||
+virDomainMemoryGetMappedSize(const virDomainMemoryDef *mem)
|
||||
+{
|
||||
+ unsigned long long ret = mem->size;
|
||||
+
|
||||
+ if (mem->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM) {
|
||||
+ unsigned long long alignsize = mem->source.nvdimm.alignsize;
|
||||
+ unsigned long long labelsize = 0;
|
||||
+
|
||||
+ /* For NVDIMM the situation is a bit more complicated. Firstly,
|
||||
+ * its <label/> is not mapped as a part of memory device, so we
|
||||
+ * must subtract label size from NVDIMM size. Secondly,
|
||||
+ * remaining memory is then aligned again (rounded down). But
|
||||
+ * for our purposes we might just round label size up and
|
||||
+ * achieve the same (numeric) result. */
|
||||
+
|
||||
+ if (alignsize == 0) {
|
||||
+ long pagesize = virGetSystemPageSizeKB();
|
||||
+
|
||||
+ /* If no alignment is specified in the XML, fallback to
|
||||
+ * system page size alignment. */
|
||||
+ if (pagesize > 0)
|
||||
+ alignsize = pagesize;
|
||||
+ }
|
||||
+
|
||||
+ if (alignsize > 0) {
|
||||
+ labelsize = VIR_ROUND_UP(mem->target.nvdimm.labelsize, alignsize);
|
||||
+
|
||||
+ ret -= labelsize;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret * 1024;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
virDomainMemoryDefCheckConflict(const virDomainMemoryDef *mem,
|
||||
const virDomainDef *def)
|
||||
@@ -2259,7 +2306,7 @@ virDomainMemoryDefCheckConflict(const virDomainMemoryDef *mem,
|
||||
}
|
||||
|
||||
/* thisStart and thisEnd are in bytes, mem->size in kibibytes */
|
||||
- thisEnd = thisStart + mem->size * 1024;
|
||||
+ thisEnd = thisStart + virDomainMemoryGetMappedSize(mem);
|
||||
|
||||
for (i = 0; i < def->nmems; i++) {
|
||||
const virDomainMemoryDef *other = def->mems[i];
|
||||
@@ -2316,7 +2363,7 @@ virDomainMemoryDefCheckConflict(const virDomainMemoryDef *mem,
|
||||
if (thisStart == 0 || otherStart == 0)
|
||||
continue;
|
||||
|
||||
- otherEnd = otherStart + other->size * 1024;
|
||||
+ otherEnd = otherStart + virDomainMemoryGetMappedSize(other);
|
||||
|
||||
if ((thisStart <= otherStart && thisEnd > otherStart) ||
|
||||
(otherStart <= thisStart && otherEnd > thisStart)) {
|
||||
--
|
||||
2.43.2
|
@ -1,53 +0,0 @@
|
||||
From d3593c911c3e02cf5c9c876cddf2fc8ba2eede06 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <d3593c911c3e02cf5c9c876cddf2fc8ba2eede06.1706524416.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 19 Jan 2024 08:22:13 +0100
|
||||
Subject: [PATCH] domain_validate: Check for domain address conflicts fully
|
||||
|
||||
Current implementation of virDomainMemoryDefCheckConflict() does
|
||||
only a one way comparison, i.e. if there's a memory device within
|
||||
def->mems[] which address falls in [mem->address, mem->address +
|
||||
mem->size] range (mem is basically an iterator within
|
||||
def->mems[]). And for static XML this works just fine. Problem is
|
||||
with hot/cold plugging of a memory device. Then mem points to
|
||||
freshly parsed memory device and these half checks are
|
||||
insufficient. Not only we must check whether an existing memory
|
||||
device doesn't clash with freshly parsed memory device, but also
|
||||
whether freshly parsed memory device does not fall into range of
|
||||
already existing memory device.
|
||||
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-4452
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit 91f9a9fb4fc0d34ed8d7a869de3d9f87687c3618)
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/conf/domain_validate.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
|
||||
index d485ec4fb1..46479f10f2 100644
|
||||
--- a/src/conf/domain_validate.c
|
||||
+++ b/src/conf/domain_validate.c
|
||||
@@ -2264,6 +2264,7 @@ virDomainMemoryDefCheckConflict(const virDomainMemoryDef *mem,
|
||||
for (i = 0; i < def->nmems; i++) {
|
||||
const virDomainMemoryDef *other = def->mems[i];
|
||||
unsigned long long otherStart = 0;
|
||||
+ unsigned long long otherEnd = 0;
|
||||
|
||||
if (other == mem)
|
||||
continue;
|
||||
@@ -2315,7 +2316,10 @@ virDomainMemoryDefCheckConflict(const virDomainMemoryDef *mem,
|
||||
if (thisStart == 0 || otherStart == 0)
|
||||
continue;
|
||||
|
||||
- if (thisStart <= otherStart && thisEnd > otherStart) {
|
||||
+ otherEnd = otherStart + other->size * 1024;
|
||||
+
|
||||
+ if ((thisStart <= otherStart && thisEnd > otherStart) ||
|
||||
+ (otherStart <= thisStart && otherEnd > thisStart)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("memory device address [0x%1$llx:0x%2$llx] overlaps with other memory device (0x%3$llx)"),
|
||||
thisStart, thisEnd, otherStart);
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,111 @@
|
||||
From 296343c5a950668d790f9cd5ebd7b466e8156d03 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <296343c5a950668d790f9cd5ebd7b466e8156d03@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 14 Jun 2022 13:23:29 +0200
|
||||
Subject: [PATCH] domain_validate: Split out validation of disk startup policy
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move the code into 'virDomainDiskDefValidateStartupPolicy' which will be
|
||||
later reused in the qemu driver.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 3603a18bcec18842cedecbd8329723062b87795c)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2095758
|
||||
---
|
||||
src/conf/domain_validate.c | 45 ++++++++++++++++++++++++--------------
|
||||
src/conf/domain_validate.h | 2 ++
|
||||
src/libvirt_private.syms | 1 +
|
||||
3 files changed, 31 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
|
||||
index 452742e67c..bfff7339ef 100644
|
||||
--- a/src/conf/domain_validate.c
|
||||
+++ b/src/conf/domain_validate.c
|
||||
@@ -598,6 +598,32 @@ virDomainDiskDefSourceLUNValidate(const virStorageSource *src)
|
||||
}
|
||||
|
||||
|
||||
+int
|
||||
+virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk)
|
||||
+{
|
||||
+ if (disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_DEFAULT)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) {
|
||||
+ virReportError(VIR_ERR_XML_ERROR,
|
||||
+ _("disk startupPolicy '%s' is not allowed for disk of '%s' type"),
|
||||
+ virDomainStartupPolicyTypeToString(disk->startupPolicy),
|
||||
+ virStorageTypeToString(disk->src->type));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM &&
|
||||
+ disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
|
||||
+ disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_REQUISITE) {
|
||||
+ virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
+ _("disk startupPolicy 'requisite' is allowed only for cdrom or floppy"));
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
virDomainDiskDefValidate(const virDomainDef *def,
|
||||
const virDomainDiskDef *disk)
|
||||
@@ -775,23 +801,8 @@ virDomainDiskDefValidate(const virDomainDef *def,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (disk->startupPolicy != VIR_DOMAIN_STARTUP_POLICY_DEFAULT) {
|
||||
- if (disk->src->type == VIR_STORAGE_TYPE_NETWORK) {
|
||||
- virReportError(VIR_ERR_XML_ERROR,
|
||||
- _("disk startupPolicy '%s' is not allowed for disk of '%s' type"),
|
||||
- virDomainStartupPolicyTypeToString(disk->startupPolicy),
|
||||
- virStorageTypeToString(disk->src->type));
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (disk->device != VIR_DOMAIN_DISK_DEVICE_CDROM &&
|
||||
- disk->device != VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
|
||||
- disk->startupPolicy == VIR_DOMAIN_STARTUP_POLICY_REQUISITE) {
|
||||
- virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||
- _("disk startupPolicy 'requisite' is allowed only for cdrom or floppy"));
|
||||
- return -1;
|
||||
- }
|
||||
- }
|
||||
+ if (virDomainDiskDefValidateStartupPolicy(disk) < 0)
|
||||
+ return -1;
|
||||
|
||||
if (disk->wwn && !virValidateWWN(disk->wwn))
|
||||
return -1;
|
||||
diff --git a/src/conf/domain_validate.h b/src/conf/domain_validate.h
|
||||
index 430d61fd3c..07b99195e3 100644
|
||||
--- a/src/conf/domain_validate.h
|
||||
+++ b/src/conf/domain_validate.h
|
||||
@@ -41,4 +41,6 @@ int virDomainDeviceDefValidate(const virDomainDeviceDef *dev,
|
||||
|
||||
int virDomainDiskDefValidateSource(const virStorageSource *src);
|
||||
|
||||
+int virDomainDiskDefValidateStartupPolicy(const virDomainDiskDef *disk);
|
||||
+
|
||||
int virDomainDiskDefSourceLUNValidate(const virStorageSource *src);
|
||||
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
||||
index 2c42e2a5e8..5b7a056151 100644
|
||||
--- a/src/libvirt_private.syms
|
||||
+++ b/src/libvirt_private.syms
|
||||
@@ -777,6 +777,7 @@ virDomainActualNetDefValidate;
|
||||
virDomainDefValidate;
|
||||
virDomainDeviceValidateAliasForHotplug;
|
||||
virDomainDiskDefSourceLUNValidate;
|
||||
+virDomainDiskDefValidateStartupPolicy;
|
||||
|
||||
|
||||
# conf/interface_conf.h
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,77 @@
|
||||
From 08ddc711a2e6d94a0fce55fec8e012a434655d2c Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <08ddc711a2e6d94a0fce55fec8e012a434655d2c.1690812875.git.jdenemar@redhat.com>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Fri, 1 Apr 2022 14:30:05 +0200
|
||||
Subject: [PATCH] lib: Set up cpuset controller for restrictive numatune
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The aim of 'restrictive' numatune mode is to rely solely on
|
||||
CGroups to have QEMU running on configured NUMA nodes. However,
|
||||
we were never setting the cpuset controller when a domain was
|
||||
starting up. We are doing so only when
|
||||
virDomainSetNumaParameters() is called (aka live pinning).
|
||||
|
||||
This is obviously wrong. Fortunately, fix is simple as
|
||||
'restrictive' is similar to 'strict' - every location where
|
||||
VIR_DOMAIN_NUMATUNE_MEM_STRICT occurs can be audited and
|
||||
VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE case can be added.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2070380
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 629282d8845407c1aff9a26f5dc026e15121f8cd)
|
||||
|
||||
Conflicts:
|
||||
- src/ch/ch_process.c: The CH driver diverged because it's
|
||||
unsupported downstream. Just drop the conflicting hunk from
|
||||
there.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2223464
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/lxc/lxc_controller.c | 3 ++-
|
||||
src/qemu/qemu_process.c | 6 ++++--
|
||||
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
|
||||
index 3c930eaacd..6fd8373256 100644
|
||||
--- a/src/lxc/lxc_controller.c
|
||||
+++ b/src/lxc/lxc_controller.c
|
||||
@@ -812,7 +812,8 @@ static int virLXCControllerSetupResourceLimits(virLXCController *ctrl)
|
||||
virDomainNumatuneMemMode mode;
|
||||
|
||||
if (virDomainNumatuneGetMode(ctrl->def->numa, -1, &mode) == 0) {
|
||||
- if (mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
|
||||
+ if ((mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT ||
|
||||
+ mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) &&
|
||||
virCgroupControllerAvailable(VIR_CGROUP_CONTROLLER_CPUSET)) {
|
||||
/* Use virNuma* API iff necessary. Once set and child is exec()-ed,
|
||||
* there's no way for us to change it. Rely on cgroups (if available
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index 0fb665bc82..73d54f01cd 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -2645,7 +2645,8 @@ qemuProcessSetupPid(virDomainObj *vm,
|
||||
virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) {
|
||||
|
||||
if (virDomainNumatuneGetMode(vm->def->numa, -1, &mem_mode) == 0 &&
|
||||
- mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
|
||||
+ (mem_mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT ||
|
||||
+ mem_mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) &&
|
||||
virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
|
||||
priv->autoNodeset,
|
||||
&mem_mask, -1) < 0)
|
||||
@@ -3162,7 +3163,8 @@ static int qemuProcessHook(void *data)
|
||||
goto cleanup;
|
||||
|
||||
if (virDomainNumatuneGetMode(h->vm->def->numa, -1, &mode) == 0) {
|
||||
- if (mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT &&
|
||||
+ if ((mode == VIR_DOMAIN_NUMATUNE_MEM_STRICT ||
|
||||
+ mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) &&
|
||||
h->cfg->cgroupControllers & (1 << VIR_CGROUP_CONTROLLER_CPUSET) &&
|
||||
virCgroupControllerAvailable(VIR_CGROUP_CONTROLLER_CPUSET)) {
|
||||
/* Use virNuma* API iff necessary. Once set and child is exec()-ed,
|
||||
--
|
||||
2.41.0
|
@ -0,0 +1,84 @@
|
||||
From 71a79a215d278d83f3cd3da330e0378209983b6b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <71a79a215d278d83f3cd3da330e0378209983b6b@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 26 Jan 2022 14:00:13 +0100
|
||||
Subject: [PATCH] node_device: Rework udevKludgeStorageType()
|
||||
|
||||
The udevKludgeStorageType() function looks at devlink name
|
||||
(/dev/XXX) and guesses the type of the (storage) device using a
|
||||
series of STRPREFIX() calls. Well those can be turn into an array
|
||||
and a for() loop, especially if we are about to add a new case
|
||||
(in the next commit).
|
||||
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit ec9e2adb961f2e1a121f47e7985142e827f3347b)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2056673
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/node_device/node_device_udev.c | 43 ++++++++++++++++--------------
|
||||
1 file changed, 23 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index cd1722f934..dd18401e78 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -890,32 +890,35 @@ udevProcessDASD(struct udev_device *device,
|
||||
static int
|
||||
udevKludgeStorageType(virNodeDeviceDef *def)
|
||||
{
|
||||
+ size_t i;
|
||||
+ const struct {
|
||||
+ const char *prefix;
|
||||
+ const char *subst;
|
||||
+ } fixups[] = {
|
||||
+ /* virtio disk */
|
||||
+ { "/dev/vd", "disk" },
|
||||
+
|
||||
+ /* For Direct Access Storage Devices (DASDs) there are
|
||||
+ * currently no identifiers in udev besides ID_PATH. Since
|
||||
+ * ID_TYPE=disk does not exist on DASDs they fall through
|
||||
+ * the udevProcessStorage detection logic. */
|
||||
+ { "/dev/dasd", "dasd" },
|
||||
+ };
|
||||
+
|
||||
VIR_DEBUG("Could not find definitive storage type for device "
|
||||
"with sysfs path '%s', trying to guess it",
|
||||
def->sysfs_path);
|
||||
|
||||
- /* virtio disk */
|
||||
- if (STRPREFIX(def->caps->data.storage.block, "/dev/vd")) {
|
||||
- def->caps->data.storage.drive_type = g_strdup("disk");
|
||||
- VIR_DEBUG("Found storage type '%s' for device "
|
||||
- "with sysfs path '%s'",
|
||||
- def->caps->data.storage.drive_type,
|
||||
- def->sysfs_path);
|
||||
- return 0;
|
||||
+ for (i = 0; i < G_N_ELEMENTS(fixups); i++) {
|
||||
+ if (STRPREFIX(def->caps->data.storage.block, fixups[i].prefix)) {
|
||||
+ def->caps->data.storage.drive_type = g_strdup(fixups[i].subst);
|
||||
+ VIR_DEBUG("Found storage type '%s' for device with sysfs path '%s'",
|
||||
+ def->caps->data.storage.drive_type,
|
||||
+ def->sysfs_path);
|
||||
+ return 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
- /* For Direct Access Storage Devices (DASDs) there are
|
||||
- * currently no identifiers in udev besides ID_PATH. Since
|
||||
- * ID_TYPE=disk does not exist on DASDs they fall through
|
||||
- * the udevProcessStorage detection logic. */
|
||||
- if (STRPREFIX(def->caps->data.storage.block, "/dev/dasd")) {
|
||||
- def->caps->data.storage.drive_type = g_strdup("dasd");
|
||||
- VIR_DEBUG("Found storage type '%s' for device "
|
||||
- "with sysfs path '%s'",
|
||||
- def->caps->data.storage.drive_type,
|
||||
- def->sysfs_path);
|
||||
- return 0;
|
||||
- }
|
||||
VIR_DEBUG("Could not determine storage type "
|
||||
"for device with sysfs path '%s'", def->sysfs_path);
|
||||
return -1;
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,39 @@
|
||||
From c04c7a986bd3514730e4169bf1a70bbec1fda006 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c04c7a986bd3514730e4169bf1a70bbec1fda006@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 26 Jan 2022 13:47:33 +0100
|
||||
Subject: [PATCH] node_device: Treat NVMe disks as regular disks
|
||||
|
||||
Unfortunately, udev doesn't set ID_TYPE attribute for NVMe disks,
|
||||
therefore we have to add another case into udevKludgeStorageType()
|
||||
to treat /dev/nvme* devlinks as any other disk.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045953
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit f103976ff34a52298df1810d82ececa3e7da4291)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2056673
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/node_device/node_device_udev.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index dd18401e78..a9e8bf10da 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -903,6 +903,11 @@ udevKludgeStorageType(virNodeDeviceDef *def)
|
||||
* ID_TYPE=disk does not exist on DASDs they fall through
|
||||
* the udevProcessStorage detection logic. */
|
||||
{ "/dev/dasd", "dasd" },
|
||||
+
|
||||
+ /* NVMe disk. While strictly speaking /dev/nvme is a
|
||||
+ * controller not a disk, this function is called if and
|
||||
+ * only if @def is of VIR_NODE_DEV_CAP_STORAGE type. */
|
||||
+ { "/dev/nvme", "disk" },
|
||||
};
|
||||
|
||||
VIR_DEBUG("Could not find definitive storage type for device "
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 989a569c9c9da0fbf89aab7f292669366b2503f1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <989a569c9c9da0fbf89aab7f292669366b2503f1@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Wed, 30 Nov 2022 14:53:21 +0100
|
||||
Subject: [PATCH] node_device_conf: Avoid memleak in
|
||||
virNodeDeviceGetPCIVPDDynamicCap()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The virNodeDeviceGetPCIVPDDynamicCap() function is called from
|
||||
virNodeDeviceGetPCIDynamicCaps() and therefore has to be a wee
|
||||
bit more clever about adding VPD capability. Namely, it has to
|
||||
remove the old one before adding a new one. This is how other
|
||||
functions called from virNodeDeviceGetPCIDynamicCaps() behave
|
||||
as well.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143235
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 64d32118540aca3d42bc5ee21c8b780cafe04bfa)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2023-2700
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/conf/node_device_conf.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index 16b9497faf..eee94a3900 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -3100,6 +3100,9 @@ virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev)
|
||||
virPCIDeviceAddress devAddr;
|
||||
g_autoptr(virPCIVPDResource) res = NULL;
|
||||
|
||||
+ g_clear_pointer(&devCapPCIDev->vpd, virPCIVPDResourceFree);
|
||||
+ devCapPCIDev->flags &= ~VIR_NODE_DEV_CAP_FLAG_PCI_VPD;
|
||||
+
|
||||
devAddr.domain = devCapPCIDev->domain;
|
||||
devAddr.bus = devCapPCIDev->bus;
|
||||
devAddr.slot = devCapPCIDev->slot;
|
||||
@@ -3113,8 +3116,6 @@ virNodeDeviceGetPCIVPDDynamicCap(virNodeDevCapPCIDev *devCapPCIDev)
|
||||
if ((res = virPCIDeviceGetVPD(pciDev))) {
|
||||
devCapPCIDev->flags |= VIR_NODE_DEV_CAP_FLAG_PCI_VPD;
|
||||
devCapPCIDev->vpd = g_steal_pointer(&res);
|
||||
- } else {
|
||||
- virPCIVPDResourceFree(g_steal_pointer(&devCapPCIDev->vpd));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,151 @@
|
||||
From 5921eeddf0a284ccbec04896901c9bd4177de6dd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5921eeddf0a284ccbec04896901c9bd4177de6dd@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:15 +0200
|
||||
Subject: [PATCH] nodedev: add optional device address of channel device to css
|
||||
device
|
||||
|
||||
Add the new introduced sysfs attribute dev_busid which provides the address
|
||||
of the device in the subchannel independent from the bound device driver.
|
||||
It is added if available in the sysfs as optional channel_dev_addr element into
|
||||
the css device capabilty providing the ccw deivce address attributes cssid,
|
||||
ssid and devno.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 122b975e4004c83b6fc442ec6cdfd71eb5b55cc4)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
docs/schemas/nodedev.rng | 5 +++++
|
||||
src/conf/node_device_conf.c | 28 ++++++++++++++++++++++++++++
|
||||
src/conf/node_device_conf.h | 2 ++
|
||||
src/node_device/node_device_udev.c | 8 ++++++++
|
||||
4 files changed, 43 insertions(+)
|
||||
|
||||
diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng
|
||||
index 29515d2d7e..43f1abc247 100644
|
||||
--- a/docs/schemas/nodedev.rng
|
||||
+++ b/docs/schemas/nodedev.rng
|
||||
@@ -677,6 +677,11 @@
|
||||
<value>css</value>
|
||||
</attribute>
|
||||
<ref name="capccwaddress"/>
|
||||
+ <optional>
|
||||
+ <element name="channel_dev_addr">
|
||||
+ <ref name="capccwaddress"/>
|
||||
+ </element>
|
||||
+ </optional>
|
||||
<optional>
|
||||
<ref name="mdev_types"/>
|
||||
</optional>
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index fcb5be24e1..16b9497faf 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -643,6 +643,17 @@ virNodeDeviceCapCSSDefFormat(virBuffer *buf,
|
||||
|
||||
virNodeDeviceCapCCWDefFormat(buf, data);
|
||||
|
||||
+ if (ccw_dev.channel_dev_addr) {
|
||||
+ virCCWDeviceAddress *ccw = ccw_dev.channel_dev_addr;
|
||||
+ virBufferAddLit(buf, "<channel_dev_addr>\n");
|
||||
+ virBufferAdjustIndent(buf, 2);
|
||||
+ virBufferAsprintf(buf, "<cssid>0x%x</cssid>\n", ccw->cssid);
|
||||
+ virBufferAsprintf(buf, "<ssid>0x%x</ssid>\n", ccw->ssid);
|
||||
+ virBufferAsprintf(buf, "<devno>0x%04x</devno>\n", ccw->devno);
|
||||
+ virBufferAdjustIndent(buf, -2);
|
||||
+ virBufferAddLit(buf, "</channel_dev_addr>\n");
|
||||
+ }
|
||||
+
|
||||
if (ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV)
|
||||
virNodeDeviceCapMdevTypesFormat(buf,
|
||||
ccw_dev.mdev_types,
|
||||
@@ -1255,6 +1266,7 @@ virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt,
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
int n = 0;
|
||||
size_t i = 0;
|
||||
+ xmlNodePtr channel_ddno = NULL;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
@@ -1269,6 +1281,21 @@ virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* channel_dev_addr is optional */
|
||||
+ if ((channel_ddno = virXPathNode("./channel_dev_addr[1]", ctxt))) {
|
||||
+ g_autofree virCCWDeviceAddress *channel_dev = NULL;
|
||||
+
|
||||
+ channel_dev = g_new0(virCCWDeviceAddress, 1);
|
||||
+
|
||||
+ if (virNodeDevCCWDeviceAddressParseXML(ctxt,
|
||||
+ channel_ddno,
|
||||
+ def->name,
|
||||
+ channel_dev) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ccw_dev->channel_dev_addr = g_steal_pointer(&channel_dev);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2637,6 +2664,7 @@ virNodeDevCapsDefFree(virNodeDevCapsDef *caps)
|
||||
for (i = 0; i < data->ccw_dev.nmdev_types; i++)
|
||||
virMediatedDeviceTypeFree(data->ccw_dev.mdev_types[i]);
|
||||
g_free(data->ccw_dev.mdev_types);
|
||||
+ g_free(data->ccw_dev.channel_dev_addr);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_AP_MATRIX:
|
||||
g_free(data->ap_matrix.addr);
|
||||
diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h
|
||||
index e4d1f67d53..d1751ed874 100644
|
||||
--- a/src/conf/node_device_conf.h
|
||||
+++ b/src/conf/node_device_conf.h
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "internal.h"
|
||||
#include "virbitmap.h"
|
||||
+#include "virccw.h"
|
||||
#include "virpcivpd.h"
|
||||
#include "virscsihost.h"
|
||||
#include "virpci.h"
|
||||
@@ -279,6 +280,7 @@ struct _virNodeDevCapCCW {
|
||||
unsigned int flags; /* enum virNodeDevCCWCapFlags */
|
||||
virMediatedDeviceType **mdev_types;
|
||||
size_t nmdev_types;
|
||||
+ virCCWDeviceAddress *channel_dev_addr;
|
||||
};
|
||||
|
||||
typedef struct _virNodeDevCapVDPA virNodeDevCapVDPA;
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index ffcb3e8640..611a2592ca 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -1128,6 +1128,8 @@ static int
|
||||
udevProcessCSS(struct udev_device *device,
|
||||
virNodeDeviceDef *def)
|
||||
{
|
||||
+ g_autofree char *dev_busid = NULL;
|
||||
+
|
||||
/* only process IO subchannel and vfio-ccw devices to keep the list sane */
|
||||
if (!def->driver ||
|
||||
(STRNEQ(def->driver, "io_subchannel") &&
|
||||
@@ -1139,6 +1141,12 @@ udevProcessCSS(struct udev_device *device,
|
||||
|
||||
udevGenerateDeviceName(device, def, NULL);
|
||||
|
||||
+ /* process optional channel devices information */
|
||||
+ udevGetStringSysfsAttr(device, "dev_busid", &dev_busid);
|
||||
+
|
||||
+ if (dev_busid != NULL)
|
||||
+ def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid);
|
||||
+
|
||||
if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0)
|
||||
return -1;
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,149 @@
|
||||
From ea4976de7bccfe8016950d040629a6818a58db4e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ea4976de7bccfe8016950d040629a6818a58db4e@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:16 +0200
|
||||
Subject: [PATCH] nodedev: add tests for optional device address to css device
|
||||
|
||||
Add nodedev schema parsing and format tests for the optional new device
|
||||
address on the css devices.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 127fda5e84790af2c5a16b61a87e339391cccb3b)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
.../css_0_0_10000-invalid.xml | 10 +++++++++
|
||||
...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 22 +++++++++++++++++++
|
||||
.../css_0_0_ffff_channel_dev_addr-invalid.xml | 15 +++++++++++++
|
||||
.../css_0_0_ffff_channel_dev_addr.xml | 15 +++++++++++++
|
||||
...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 1 +
|
||||
.../css_0_0_ffff_channel_dev_addr.xml | 1 +
|
||||
tests/nodedevxml2xmltest.c | 2 ++
|
||||
7 files changed, 66 insertions(+)
|
||||
create mode 100644 tests/nodedevschemadata/css_0_0_10000-invalid.xml
|
||||
create mode 100644 tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
|
||||
create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
|
||||
create mode 120000 tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
create mode 120000 tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
|
||||
|
||||
diff --git a/tests/nodedevschemadata/css_0_0_10000-invalid.xml b/tests/nodedevschemadata/css_0_0_10000-invalid.xml
|
||||
new file mode 100644
|
||||
index 0000000000..740bb489a7
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevschemadata/css_0_0_10000-invalid.xml
|
||||
@@ -0,0 +1,10 @@
|
||||
+<device>
|
||||
+ <name>css_0_0_10000</name>
|
||||
+ <path>/sys/devices/css0/0.0.10000</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <capability type='css'>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0x10000</devno>
|
||||
+ </capability>
|
||||
+</device>
|
||||
diff --git a/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
new file mode 100644
|
||||
index 0000000000..198dcb0cb0
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
@@ -0,0 +1,22 @@
|
||||
+<device>
|
||||
+ <name>css_0_0_fffe</name>
|
||||
+ <path>/sys/devices/css0/0.0.fffe</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <capability type='css'>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0xfffe</devno>
|
||||
+ <channel_dev_addr>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0x0815</devno>
|
||||
+ </channel_dev_addr>
|
||||
+ <capability type='mdev_types'>
|
||||
+ <type id='vfio_ccw-io'>
|
||||
+ <name>I/O subchannel (Non-QDIO)</name>
|
||||
+ <deviceAPI>vfio-ccw</deviceAPI>
|
||||
+ <availableInstances>1</availableInstances>
|
||||
+ </type>
|
||||
+ </capability>
|
||||
+ </capability>
|
||||
+</device>
|
||||
diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
|
||||
new file mode 100644
|
||||
index 0000000000..3f2c5558c7
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
|
||||
@@ -0,0 +1,15 @@
|
||||
+<device>
|
||||
+ <name>css_0_0_ffff</name>
|
||||
+ <path>/sys/devices/css0/0.0.ffff</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <capability type='css'>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0xffff</devno>
|
||||
+ <channel_dev_addr>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0x10000</devno>
|
||||
+ </channel_dev_addr>
|
||||
+ </capability>
|
||||
+</device>
|
||||
diff --git a/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
|
||||
new file mode 100644
|
||||
index 0000000000..17a77cb282
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
|
||||
@@ -0,0 +1,15 @@
|
||||
+<device>
|
||||
+ <name>css_0_0_ffff</name>
|
||||
+ <path>/sys/devices/css0/0.0.ffff</path>
|
||||
+ <parent>computer</parent>
|
||||
+ <capability type='css'>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0xffff</devno>
|
||||
+ <channel_dev_addr>
|
||||
+ <cssid>0x0</cssid>
|
||||
+ <ssid>0x0</ssid>
|
||||
+ <devno>0x0815</devno>
|
||||
+ </channel_dev_addr>
|
||||
+ </capability>
|
||||
+</device>
|
||||
diff --git a/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
new file mode 120000
|
||||
index 0000000000..65ab582ee8
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
@@ -0,0 +1 @@
|
||||
+../nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
|
||||
\ No newline at end of file
|
||||
diff --git a/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
|
||||
new file mode 120000
|
||||
index 0000000000..cbfe719777
|
||||
--- /dev/null
|
||||
+++ b/tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
|
||||
@@ -0,0 +1 @@
|
||||
+../nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
|
||||
\ No newline at end of file
|
||||
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
|
||||
index 557347fb07..ad9562cc82 100644
|
||||
--- a/tests/nodedevxml2xmltest.c
|
||||
+++ b/tests/nodedevxml2xmltest.c
|
||||
@@ -125,7 +125,9 @@ mymain(void)
|
||||
DO_TEST("mdev_3627463d_b7f0_4fea_b468_f1da537d301b");
|
||||
DO_TEST("ccw_0_0_ffff");
|
||||
DO_TEST("css_0_0_ffff");
|
||||
+ DO_TEST("css_0_0_ffff_channel_dev_addr");
|
||||
DO_TEST("css_0_0_fffe_mdev_types");
|
||||
+ DO_TEST("css_0_0_fffe_mdev_types_channel_dev_addr");
|
||||
DO_TEST("ap_card07");
|
||||
DO_TEST("ap_07_0038");
|
||||
DO_TEST("ap_matrix");
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
From d82e4473a66da27d2c6f41f8ecadacbd00f44430 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d82e4473a66da27d2c6f41f8ecadacbd00f44430@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:00 +0200
|
||||
Subject: [PATCH] nodedev: fix reported error msg in css cap XML parsing
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 78094a4bd1562fec73ae99c67ddcbedd83953d5c)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/conf/node_device_conf.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index 0bac0fde8d..a6ebf4b66f 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -1193,7 +1193,7 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
|
||||
if (virStrToLong_uip(ssid, NULL, 0, &ccw_dev->ssid) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("invalid ssid value '%s' for '%s'"),
|
||||
- cssid, def->name);
|
||||
+ ssid, def->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 7c60078d7a6442dc8cb5a711876d28f70d892bff Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <7c60078d7a6442dc8cb5a711876d28f70d892bff@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Mon, 23 May 2022 17:56:21 +0200
|
||||
Subject: [PATCH] nodedev: prevent internal error on dev_busid parse
|
||||
|
||||
As "none" is a legal value represented in the sysfs attribute dev_busid
|
||||
this patch prevents libvirt from incorrectly reporting an internal error.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Suggested-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit e37c39747be0792d03c450e56ddb3c78d08cbf3e)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/node_device/node_device_udev.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index 611a2592ca..b76e3de681 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -1144,7 +1144,7 @@ udevProcessCSS(struct udev_device *device,
|
||||
/* process optional channel devices information */
|
||||
udevGetStringSysfsAttr(device, "dev_busid", &dev_busid);
|
||||
|
||||
- if (dev_busid != NULL)
|
||||
+ if (dev_busid != NULL && STRNEQ(dev_busid, "none"))
|
||||
def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid);
|
||||
|
||||
if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0)
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,140 @@
|
||||
From ef8c30a091b5b0f08f9405878b49c21c5525dd0a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ef8c30a091b5b0f08f9405878b49c21c5525dd0a@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:12 +0200
|
||||
Subject: [PATCH] nodedev: refactor ccw device address parsing from XML
|
||||
|
||||
Move ccw device address XML parsing into new method for later reuse.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 4402295d371a62ab8632d23002283b8a7721e6a7)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/conf/node_device_conf.c | 96 ++++++++++++++++++++++---------------
|
||||
1 file changed, 58 insertions(+), 38 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index 1e00f65717..8982368465 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -1141,6 +1141,58 @@ virNodeDevAPMatrixCapabilityParseXML(xmlXPathContextPtr ctxt,
|
||||
}
|
||||
|
||||
|
||||
+static int
|
||||
+virNodeDevCCWDeviceAddressParseXML(xmlXPathContextPtr ctxt,
|
||||
+ xmlNodePtr node,
|
||||
+ const char *dev_name,
|
||||
+ virCCWDeviceAddress *ccw_addr)
|
||||
+{
|
||||
+ VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
+ g_autofree char *cssid = NULL;
|
||||
+ g_autofree char *ssid = NULL;
|
||||
+ g_autofree char *devno = NULL;
|
||||
+
|
||||
+ ctxt->node = node;
|
||||
+
|
||||
+ if (!(cssid = virXPathString("string(./cssid[1])", ctxt))) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("missing cssid value for '%s'"), dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (virStrToLong_uip(cssid, NULL, 0, &ccw_addr->cssid) < 0) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("invalid cssid value '%s' for '%s'"),
|
||||
+ cssid, dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (!(ssid = virXPathString("string(./ssid[1])", ctxt))) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("missing ssid value for '%s'"), dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (virStrToLong_uip(ssid, NULL, 0, &ccw_addr->ssid) < 0) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("invalid ssid value '%s' for '%s'"),
|
||||
+ ssid, dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (!(devno = virXPathString("string(./devno[1])", ctxt))) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("missing devno value for '%s'"), dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (virStrToLong_uip(devno, NULL, 16, &ccw_addr->devno) < 0) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("invalid devno value '%s' for '%s'"),
|
||||
+ devno, dev_name);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
@@ -1178,50 +1230,18 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
int n = 0;
|
||||
size_t i = 0;
|
||||
- g_autofree char *cssid = NULL;
|
||||
- g_autofree char *ssid = NULL;
|
||||
- g_autofree char *devno = NULL;
|
||||
+ g_autofree virCCWDeviceAddress *ccw_addr = NULL;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
- if (!(cssid = virXPathString("string(./cssid[1])", ctxt))) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("missing cssid value for '%s'"), def->name);
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (virStrToLong_uip(cssid, NULL, 0, &ccw_dev->cssid) < 0) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("invalid cssid value '%s' for '%s'"),
|
||||
- cssid, def->name);
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (!(ssid = virXPathString("string(./ssid[1])", ctxt))) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("missing ssid value for '%s'"), def->name);
|
||||
- return -1;
|
||||
- }
|
||||
+ ccw_addr = g_new0(virCCWDeviceAddress, 1);
|
||||
|
||||
- if (virStrToLong_uip(ssid, NULL, 0, &ccw_dev->ssid) < 0) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("invalid ssid value '%s' for '%s'"),
|
||||
- ssid, def->name);
|
||||
+ if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0)
|
||||
return -1;
|
||||
- }
|
||||
|
||||
- if (!(devno = virXPathString("string(./devno[1])", ctxt))) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("missing devno value for '%s'"), def->name);
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (virStrToLong_uip(devno, NULL, 16, &ccw_dev->devno) < 0) {
|
||||
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
- _("invalid devno value '%s' for '%s'"),
|
||||
- devno, def->name);
|
||||
- return -1;
|
||||
- }
|
||||
+ ccw_dev->cssid = ccw_addr->cssid;
|
||||
+ ccw_dev->ssid = ccw_addr->ssid;
|
||||
+ ccw_dev->devno = ccw_addr->devno;
|
||||
|
||||
if ((n = virXPathNodeSet("./capability", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,99 @@
|
||||
From 286c821eee3b682d6aa4aeaa13aad92382708803 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <286c821eee3b682d6aa4aeaa13aad92382708803@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:13 +0200
|
||||
Subject: [PATCH] nodedev: refactor css XML parsing from ccw XML parsing
|
||||
|
||||
In preparation for easier extension later.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 245ff2d6634b3afb0dbf0d295051e458095bfc80)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/conf/node_device_conf.c | 40 +++++++++++++++++++++++++++----------
|
||||
1 file changed, 30 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index 8982368465..fcb5be24e1 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -1193,6 +1193,31 @@ virNodeDevCCWDeviceAddressParseXML(xmlXPathContextPtr ctxt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+
|
||||
+static int
|
||||
+virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
|
||||
+ virNodeDeviceDef *def,
|
||||
+ xmlNodePtr node,
|
||||
+ virNodeDevCapCCW *ccw_dev)
|
||||
+{
|
||||
+ VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
+ g_autofree virCCWDeviceAddress *ccw_addr = NULL;
|
||||
+
|
||||
+ ctxt->node = node;
|
||||
+
|
||||
+ ccw_addr = g_new0(virCCWDeviceAddress, 1);
|
||||
+
|
||||
+ if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ ccw_dev->cssid = ccw_addr->cssid;
|
||||
+ ccw_dev->ssid = ccw_addr->ssid;
|
||||
+ ccw_dev->devno = ccw_addr->devno;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int
|
||||
virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
@@ -1221,7 +1246,7 @@ virNodeDevCSSCapabilityParseXML(xmlXPathContextPtr ctxt,
|
||||
|
||||
|
||||
static int
|
||||
-virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
|
||||
+virNodeDevCapCSSParseXML(xmlXPathContextPtr ctxt,
|
||||
virNodeDeviceDef *def,
|
||||
xmlNodePtr node,
|
||||
virNodeDevCapCCW *ccw_dev)
|
||||
@@ -1230,19 +1255,12 @@ virNodeDevCapCCWParseXML(xmlXPathContextPtr ctxt,
|
||||
g_autofree xmlNodePtr *nodes = NULL;
|
||||
int n = 0;
|
||||
size_t i = 0;
|
||||
- g_autofree virCCWDeviceAddress *ccw_addr = NULL;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
- ccw_addr = g_new0(virCCWDeviceAddress, 1);
|
||||
-
|
||||
- if (virNodeDevCCWDeviceAddressParseXML(ctxt, node, def->name, ccw_addr) < 0)
|
||||
+ if (virNodeDevCapCCWParseXML(ctxt, def, node, ccw_dev) < 0)
|
||||
return -1;
|
||||
|
||||
- ccw_dev->cssid = ccw_addr->cssid;
|
||||
- ccw_dev->ssid = ccw_addr->ssid;
|
||||
- ccw_dev->devno = ccw_addr->devno;
|
||||
-
|
||||
if ((n = virXPathNodeSet("./capability", ctxt, &nodes)) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -2282,9 +2300,11 @@ virNodeDevCapsDefParseXML(xmlXPathContextPtr ctxt,
|
||||
ret = virNodeDevCapMdevParseXML(ctxt, def, node, &caps->data.mdev);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_CCW_DEV:
|
||||
- case VIR_NODE_DEV_CAP_CSS_DEV:
|
||||
ret = virNodeDevCapCCWParseXML(ctxt, def, node, &caps->data.ccw_dev);
|
||||
break;
|
||||
+ case VIR_NODE_DEV_CAP_CSS_DEV:
|
||||
+ ret = virNodeDevCapCSSParseXML(ctxt, def, node, &caps->data.ccw_dev);
|
||||
+ break;
|
||||
case VIR_NODE_DEV_CAP_AP_CARD:
|
||||
ret = virNodeDevCapAPCardParseXML(ctxt, def, node,
|
||||
&caps->data.ap_card);
|
||||
--
|
||||
2.39.1
|
||||
|
@ -0,0 +1,62 @@
|
||||
From d370e2e984b4501060ea0d7a10629db0bfe51ef2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d370e2e984b4501060ea0d7a10629db0bfe51ef2@dist-git>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Fri, 13 May 2022 12:31:11 +0200
|
||||
Subject: [PATCH] nodedev: refactor css format from ccw format method
|
||||
|
||||
In preparation for easier extension later.
|
||||
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit c5864885060b136214b4bcef25d604cc3d147014)
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2165011
|
||||
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||||
---
|
||||
src/conf/node_device_conf.c | 21 +++++++++++++++++----
|
||||
1 file changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c
|
||||
index a6ebf4b66f..1e00f65717 100644
|
||||
--- a/src/conf/node_device_conf.c
|
||||
+++ b/src/conf/node_device_conf.c
|
||||
@@ -632,10 +632,21 @@ virNodeDeviceCapCCWDefFormat(virBuffer *buf,
|
||||
data->ccw_dev.ssid);
|
||||
virBufferAsprintf(buf, "<devno>0x%04x</devno>\n",
|
||||
data->ccw_dev.devno);
|
||||
- if (data->ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV)
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+virNodeDeviceCapCSSDefFormat(virBuffer *buf,
|
||||
+ const virNodeDevCapData *data)
|
||||
+{
|
||||
+ virNodeDevCapCCW ccw_dev = data->ccw_dev;
|
||||
+
|
||||
+ virNodeDeviceCapCCWDefFormat(buf, data);
|
||||
+
|
||||
+ if (ccw_dev.flags & VIR_NODE_DEV_CAP_FLAG_CSS_MDEV)
|
||||
virNodeDeviceCapMdevTypesFormat(buf,
|
||||
- data->ccw_dev.mdev_types,
|
||||
- data->ccw_dev.nmdev_types);
|
||||
+ ccw_dev.mdev_types,
|
||||
+ ccw_dev.nmdev_types);
|
||||
}
|
||||
|
||||
|
||||
@@ -724,9 +735,11 @@ virNodeDeviceDefFormat(const virNodeDeviceDef *def)
|
||||
virNodeDeviceCapMdevDefFormat(&buf, data);
|
||||
break;
|
||||
case VIR_NODE_DEV_CAP_CCW_DEV:
|
||||
- case VIR_NODE_DEV_CAP_CSS_DEV:
|
||||
virNodeDeviceCapCCWDefFormat(&buf, data);
|
||||
break;
|
||||
+ case VIR_NODE_DEV_CAP_CSS_DEV:
|
||||
+ virNodeDeviceCapCSSDefFormat(&buf, data);
|
||||
+ break;
|
||||
case VIR_NODE_DEV_CAP_VDPA:
|
||||
virNodeDeviceCapVDPADefFormat(&buf, data);
|
||||
break;
|
||||
--
|
||||
2.39.1
|
||||
|
79
SOURCES/libvirt-nodedev-update-transient-mdevs.patch
Normal file
79
SOURCES/libvirt-nodedev-update-transient-mdevs.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From aebcc09c7060f6eace93821c6a782031cf107d85 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <aebcc09c7060f6eace93821c6a782031cf107d85.1687452713.git.jdenemar@redhat.com>
|
||||
From: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Date: Mon, 8 May 2023 19:10:46 +0200
|
||||
Subject: [PATCH] nodedev: update transient mdevs
|
||||
|
||||
Instead of updating defined mdevs only add another update for active
|
||||
devices as well to cover transient mdev devices as well.
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2143158
|
||||
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||||
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2143160
|
||||
|
||||
(cherry picked from commit 44a0f2f0c8ff5e78c238013ed297b8fce223ac5a)
|
||||
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
||||
---
|
||||
src/node_device/node_device_driver.c | 31 ++++++++++++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
|
||||
index e6ab4bb94c..943f6121a0 100644
|
||||
--- a/src/node_device/node_device_driver.c
|
||||
+++ b/src/node_device/node_device_driver.c
|
||||
@@ -1651,6 +1651,24 @@ virMdevctlListDefined(virNodeDeviceDef ***devs, char **errmsg)
|
||||
}
|
||||
|
||||
|
||||
+static int
|
||||
+virMdevctlListActive(virNodeDeviceDef ***devs, char **errmsg)
|
||||
+{
|
||||
+ int status;
|
||||
+ g_autofree char *output = NULL;
|
||||
+ g_autoptr(virCommand) cmd = nodeDeviceGetMdevctlListCommand(false, &output, errmsg);
|
||||
+
|
||||
+ if (virCommandRun(cmd, &status) < 0 || status != 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (!output)
|
||||
+ return -1;
|
||||
+
|
||||
+ return nodeDeviceParseMdevctlJSON(output, devs);
|
||||
+}
|
||||
+
|
||||
+
|
||||
typedef struct _virMdevctlForEachData virMdevctlForEachData;
|
||||
struct _virMdevctlForEachData {
|
||||
int ndefs;
|
||||
@@ -1712,6 +1730,8 @@ int
|
||||
nodeDeviceUpdateMediatedDevices(void)
|
||||
{
|
||||
g_autofree virNodeDeviceDef **defs = NULL;
|
||||
+ g_autofree virNodeDeviceDef **act_defs = NULL;
|
||||
+ int act_ndefs = 0;
|
||||
g_autofree char *errmsg = NULL;
|
||||
g_autofree char *mdevctl = NULL;
|
||||
virMdevctlForEachData data = { 0, };
|
||||
@@ -1738,6 +1758,17 @@ nodeDeviceUpdateMediatedDevices(void)
|
||||
if (nodeDeviceUpdateMediatedDevice(defs[i]) < 0)
|
||||
return -1;
|
||||
|
||||
+ /* Update active/transient mdev devices */
|
||||
+ if ((act_ndefs = virMdevctlListActive(&act_defs, &errmsg)) < 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("failed to query mdevs from mdevctl: %1$s"), errmsg);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < act_ndefs; i++)
|
||||
+ if (nodeDeviceUpdateMediatedDevice(act_defs[i]) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.41.0
|
@ -0,0 +1,55 @@
|
||||
From dc6ab8b51ff53ba22abfb84f24641aa87320038a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <dc6ab8b51ff53ba22abfb84f24641aa87320038a@dist-git>
|
||||
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
|
||||
Date: Tue, 8 Mar 2022 17:28:38 +0000
|
||||
Subject: [PATCH] nwfilter: fix crash when counting number of network filters
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The virNWFilterObjListNumOfNWFilters method iterates over the
|
||||
driver->nwfilters, accessing virNWFilterObj instances. As such
|
||||
it needs to be protected against concurrent modification of
|
||||
the driver->nwfilters object.
|
||||
|
||||
This API allows unprivileged users to connect, so users with
|
||||
read-only access to libvirt can cause a denial of service
|
||||
crash if they are able to race with a call of virNWFilterUndefine.
|
||||
Since network filters are usually statically defined, this is
|
||||
considered a low severity problem.
|
||||
|
||||
This is assigned CVE-2022-0897.
|
||||
|
||||
Reviewed-by: Eric Blake <eblake@redhat.com>
|
||||
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
||||
(cherry picked from commit a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2063902
|
||||
---
|
||||
src/nwfilter/nwfilter_driver.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
|
||||
index 200451d6b1..956aca6421 100644
|
||||
--- a/src/nwfilter/nwfilter_driver.c
|
||||
+++ b/src/nwfilter/nwfilter_driver.c
|
||||
@@ -478,11 +478,15 @@ nwfilterLookupByName(virConnectPtr conn,
|
||||
static int
|
||||
nwfilterConnectNumOfNWFilters(virConnectPtr conn)
|
||||
{
|
||||
+ int ret;
|
||||
if (virConnectNumOfNWFiltersEnsureACL(conn) < 0)
|
||||
return -1;
|
||||
|
||||
- return virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn,
|
||||
- virConnectNumOfNWFiltersCheckACL);
|
||||
+ nwfilterDriverLock();
|
||||
+ ret = virNWFilterObjListNumOfNWFilters(driver->nwfilters, conn,
|
||||
+ virConnectNumOfNWFiltersCheckACL);
|
||||
+ nwfilterDriverUnlock();
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
155
SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch
Normal file
155
SOURCES/libvirt-qemu-Add-qemuDomainSetMaxMemLock-helper.patch
Normal file
@ -0,0 +1,155 @@
|
||||
From 2595c7716b19214b2729b41b86656f96a2cd18bc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <2595c7716b19214b2729b41b86656f96a2cd18bc@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 22 Jun 2022 15:21:30 +0200
|
||||
Subject: [PATCH] qemu: Add qemuDomainSetMaxMemLock helper
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
qemuDomainAdjustMaxMemLock combined computing the desired limit with
|
||||
applying it. This patch separates the code to apply a memory locking
|
||||
limit to a new qemuDomainSetMaxMemLock helper for better reusability.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit dff51c7f5760ded8235076f55d082fe4363f2f78)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2089433
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_domain.c | 95 ++++++++++++++++++++++++++----------------
|
||||
src/qemu/qemu_domain.h | 3 ++
|
||||
2 files changed, 61 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index ee7d310903..a81789f194 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -9261,6 +9261,61 @@ qemuDomainGetMemLockLimitBytes(virDomainDef *def,
|
||||
}
|
||||
|
||||
|
||||
+/**
|
||||
+ * qemuDomainSetMaxMemLock:
|
||||
+ * @vm: domain
|
||||
+ * @limit: the desired memory locking limit
|
||||
+ * @origPtr: where to store (or load from) the original value of the limit
|
||||
+ *
|
||||
+ * Set the memory locking limit for @vm unless it's already big enough. If
|
||||
+ * @origPtr is non-NULL, the original value of the limit will be store there
|
||||
+ * and can be restored by calling this function with @limit == 0.
|
||||
+ *
|
||||
+ * Returns: 0 on success, -1 otherwise.
|
||||
+ */
|
||||
+int
|
||||
+qemuDomainSetMaxMemLock(virDomainObj *vm,
|
||||
+ unsigned long long limit,
|
||||
+ unsigned long long *origPtr)
|
||||
+{
|
||||
+ unsigned long long current = 0;
|
||||
+
|
||||
+ if (virProcessGetMaxMemLock(vm->pid, ¤t) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (limit > 0) {
|
||||
+ VIR_DEBUG("Requested memory lock limit: %llu", limit);
|
||||
+ /* If the limit is already high enough, we can assume
|
||||
+ * that some external process is taking care of managing
|
||||
+ * process limits and we shouldn't do anything ourselves:
|
||||
+ * we're probably running in a containerized environment
|
||||
+ * where we don't have enough privilege anyway */
|
||||
+ if (current >= limit) {
|
||||
+ VIR_DEBUG("Current limit %llu is big enough", current);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* If this is the first time adjusting the limit, save the current
|
||||
+ * value so that we can restore it once memory locking is no longer
|
||||
+ * required */
|
||||
+ if (origPtr && *origPtr == 0)
|
||||
+ *origPtr = current;
|
||||
+ } else {
|
||||
+ /* Once memory locking is no longer required, we can restore the
|
||||
+ * original, usually very low, limit. But only if we actually stored
|
||||
+ * the original limit before. */
|
||||
+ if (!origPtr || *origPtr == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ limit = *origPtr;
|
||||
+ *origPtr = 0;
|
||||
+ VIR_DEBUG("Resetting memory lock limit back to %llu", limit);
|
||||
+ }
|
||||
+
|
||||
+ return virProcessSetMaxMemLock(vm->pid, limit);
|
||||
+}
|
||||
+
|
||||
+
|
||||
/**
|
||||
* qemuDomainAdjustMaxMemLock:
|
||||
* @vm: domain
|
||||
@@ -9282,43 +9337,9 @@ int
|
||||
qemuDomainAdjustMaxMemLock(virDomainObj *vm,
|
||||
bool forceVFIO)
|
||||
{
|
||||
- qemuDomainObjPrivate *priv = vm->privateData;
|
||||
- unsigned long long currentMemLock = 0;
|
||||
- unsigned long long desiredMemLock = 0;
|
||||
-
|
||||
- desiredMemLock = qemuDomainGetMemLockLimitBytes(vm->def, forceVFIO);
|
||||
- if (virProcessGetMaxMemLock(vm->pid, ¤tMemLock) < 0)
|
||||
- return -1;
|
||||
-
|
||||
- if (desiredMemLock > 0) {
|
||||
- if (currentMemLock < desiredMemLock) {
|
||||
- /* If this is the first time adjusting the limit, save the current
|
||||
- * value so that we can restore it once memory locking is no longer
|
||||
- * required */
|
||||
- if (priv->originalMemlock == 0) {
|
||||
- priv->originalMemlock = currentMemLock;
|
||||
- }
|
||||
- } else {
|
||||
- /* If the limit is already high enough, we can assume
|
||||
- * that some external process is taking care of managing
|
||||
- * process limits and we shouldn't do anything ourselves:
|
||||
- * we're probably running in a containerized environment
|
||||
- * where we don't have enough privilege anyway */
|
||||
- desiredMemLock = 0;
|
||||
- }
|
||||
- } else {
|
||||
- /* Once memory locking is no longer required, we can restore the
|
||||
- * original, usually very low, limit */
|
||||
- desiredMemLock = priv->originalMemlock;
|
||||
- priv->originalMemlock = 0;
|
||||
- }
|
||||
-
|
||||
- if (desiredMemLock > 0 &&
|
||||
- virProcessSetMaxMemLock(vm->pid, desiredMemLock) < 0) {
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
+ return qemuDomainSetMaxMemLock(vm,
|
||||
+ qemuDomainGetMemLockLimitBytes(vm->def, forceVFIO),
|
||||
+ &QEMU_DOMAIN_PRIVATE(vm)->originalMemlock);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
|
||||
index e9497d20de..6d1d23439a 100644
|
||||
--- a/src/qemu/qemu_domain.h
|
||||
+++ b/src/qemu/qemu_domain.h
|
||||
@@ -789,6 +789,9 @@ int qemuDomainAdjustMaxMemLock(virDomainObj *vm,
|
||||
bool forceVFIO);
|
||||
int qemuDomainAdjustMaxMemLockHostdev(virDomainObj *vm,
|
||||
virDomainHostdevDef *hostdev);
|
||||
+int qemuDomainSetMaxMemLock(virDomainObj *vm,
|
||||
+ unsigned long long limit,
|
||||
+ unsigned long long *origPtr);
|
||||
|
||||
int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
||||
const virDomainMemoryDef *mem);
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,139 +0,0 @@
|
||||
From 68a98ee089f39edeb2d07f6268cbbcb12629ee8b Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <68a98ee089f39edeb2d07f6268cbbcb12629ee8b.1713796876.git.jdenemar@redhat.com>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Tue, 16 Apr 2024 12:57:22 +0200
|
||||
Subject: [PATCH] qemu: Fix migration with custom XML
|
||||
|
||||
Ages ago origCPU in domain private data was introduced to provide
|
||||
backward compatibility when migrating to an old libvirt, which did not
|
||||
support fetching updated CPU definition from QEMU. Thus origCPU will
|
||||
contain the original CPU definition before such update. But only if the
|
||||
update actually changed anything. Let's always fill origCPU with the
|
||||
original definition when starting a domain so that we can rely on it
|
||||
being always set, even if it matches the updated definition.
|
||||
|
||||
This fixes migration or save operations with custom domain XML after
|
||||
commit v10.1.0-88-g14d3517410, which expected origCPU to be always set
|
||||
to the CPU definition from inactive XML to check features explicitly
|
||||
requested by a user.
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-30622
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Tested-by: Han Han <hhan@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 4331048257071211fb98c21453b187919d42dae7)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-32654
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_domain.c | 33 ++++++++++++++++++++-------------
|
||||
src/qemu/qemu_process.c | 19 +++++++------------
|
||||
2 files changed, 27 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index 1daa53dd1b..341c543280 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -10868,12 +10868,13 @@ virSaveCookieCallbacks virQEMUDriverDomainSaveCookie = {
|
||||
* @vm: domain which is being started
|
||||
* @cpu: CPU updated when the domain was running previously (before migration,
|
||||
* snapshot, or save)
|
||||
- * @origCPU: where to store the original CPU from vm->def in case @cpu was
|
||||
- * used instead
|
||||
+ * @origCPU: where to store the original CPU from vm->def
|
||||
*
|
||||
- * Replace the CPU definition with the updated one when QEMU is new enough to
|
||||
- * allow us to check extra features it is about to enable or disable when
|
||||
- * starting a domain. The original CPU is stored in @origCPU.
|
||||
+ * Save the original CPU definition from inactive XML in @origCPU so that we
|
||||
+ * can safely update it and still be able to check what exactly a user asked
|
||||
+ * for. The domain definition will either contain a copy of the original CPU
|
||||
+ * definition or a copy of @cpu in case the domain was already running and
|
||||
+ * we're just restoring a saved state or preparing for incoming migration.
|
||||
*
|
||||
* Returns 0 on success, -1 on error.
|
||||
*/
|
||||
@@ -10886,18 +10887,24 @@ qemuDomainUpdateCPU(virDomainObj *vm,
|
||||
|
||||
*origCPU = NULL;
|
||||
|
||||
- if (!cpu || !vm->def->cpu ||
|
||||
- !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION) ||
|
||||
- virCPUDefIsEqual(vm->def->cpu, cpu, false))
|
||||
+ if (!vm->def->cpu)
|
||||
return 0;
|
||||
|
||||
- if (!(cpu = virCPUDefCopy(cpu)))
|
||||
- return -1;
|
||||
+ if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION))
|
||||
+ return 0;
|
||||
+
|
||||
+ /* nothing to do if only topology part of CPU def is used */
|
||||
+ if (vm->def->cpu->mode == VIR_CPU_MODE_CUSTOM && !vm->def->cpu->model)
|
||||
+ return 0;
|
||||
+
|
||||
+ VIR_DEBUG("Replacing CPU definition");
|
||||
|
||||
- VIR_DEBUG("Replacing CPU def with the updated one");
|
||||
+ *origCPU = g_steal_pointer(&vm->def->cpu);
|
||||
|
||||
- *origCPU = vm->def->cpu;
|
||||
- vm->def->cpu = cpu;
|
||||
+ if (cpu)
|
||||
+ vm->def->cpu = virCPUDefCopy(cpu);
|
||||
+ else
|
||||
+ vm->def->cpu = virCPUDefCopy(*origCPU);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index 3563ad215c..b75599de68 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -4402,8 +4402,6 @@ qemuProcessUpdateLiveGuestCPU(virDomainObj *vm,
|
||||
virCPUData *disabled)
|
||||
{
|
||||
virDomainDef *def = vm->def;
|
||||
- qemuDomainObjPrivate *priv = vm->privateData;
|
||||
- g_autoptr(virCPUDef) orig = NULL;
|
||||
int rc;
|
||||
|
||||
if (!enabled)
|
||||
@@ -4414,19 +4412,11 @@ qemuProcessUpdateLiveGuestCPU(virDomainObj *vm,
|
||||
!def->cpu->model))
|
||||
return 0;
|
||||
|
||||
- orig = virCPUDefCopy(def->cpu);
|
||||
-
|
||||
- if ((rc = virCPUUpdateLive(def->os.arch, def->cpu, enabled, disabled)) < 0) {
|
||||
+ if ((rc = virCPUUpdateLive(def->os.arch, def->cpu, enabled, disabled)) < 0)
|
||||
return -1;
|
||||
- } else if (rc == 0) {
|
||||
- /* Store the original CPU in priv if QEMU changed it and we didn't
|
||||
- * get the original CPU via migration, restore, or snapshot revert.
|
||||
- */
|
||||
- if (!priv->origCPU && !virCPUDefIsEqual(def->cpu, orig, false))
|
||||
- priv->origCPU = g_steal_pointer(&orig);
|
||||
|
||||
+ if (rc == 0)
|
||||
def->cpu->check = VIR_CPU_CHECK_FULL;
|
||||
- }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -9144,6 +9134,11 @@ qemuProcessReconnect(void *opaque)
|
||||
|
||||
qemuDomainVcpuPersistOrder(obj->def);
|
||||
|
||||
+ /* Make sure the original CPU is always preserved in priv->origCPU. */
|
||||
+ if (!priv->origCPU &&
|
||||
+ qemuDomainUpdateCPU(obj, NULL, &priv->origCPU) < 0)
|
||||
+ goto error;
|
||||
+
|
||||
if (qemuProcessRefreshCPU(driver, obj) < 0)
|
||||
goto error;
|
||||
|
||||
--
|
||||
2.44.0
|
@ -1,111 +0,0 @@
|
||||
From e622970c8785ec1f7e142d72f792d89f870e07d0 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 12 Jun 2024 16:44:28 +0200
|
||||
Subject: [PATCH] qemu: Fix migration with disabled vmx-* CPU features
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When starting a domain on a host which lacks a vmx-* CPU feature which
|
||||
is expected to be enabled by the CPU model specified in the domain XML,
|
||||
libvirt properly marks such feature as disabled in the active domain
|
||||
XML. But migrating the domain to a similar host which lacks the same
|
||||
vmx-* feature will fail with libvirt reporting the feature as missing.
|
||||
This is because of a bug in the hack ensuring backward compatibility
|
||||
libvirt running on the destination thinks the missing feature is
|
||||
expected to be enabled.
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-40899
|
||||
|
||||
Fixes: v10.1.0-85-g5fbfa5ab8a
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/cpu/cpu_x86.c | 50 ++++++++++++++++++++++++++++-------------------
|
||||
1 file changed, 30 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
|
||||
index 7a70eed9e7f..fcbce0ec467 100644
|
||||
--- a/src/cpu/cpu_x86.c
|
||||
+++ b/src/cpu/cpu_x86.c
|
||||
@@ -3023,10 +3023,7 @@ virCPUx86UpdateLive(virCPUDef *cpu,
|
||||
if (!(map = virCPUx86GetMap()))
|
||||
return -1;
|
||||
|
||||
- if (!(model = x86ModelFromCPU(cpu, map, -1)))
|
||||
- return -1;
|
||||
-
|
||||
- if (hostPassthrough &&
|
||||
+ if (!(model = x86ModelFromCPU(cpu, map, -1)) ||
|
||||
!(modelDisabled = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_DISABLE)))
|
||||
return -1;
|
||||
|
||||
@@ -3039,39 +3036,52 @@ virCPUx86UpdateLive(virCPUDef *cpu,
|
||||
for (i = 0; i < map->nfeatures; i++) {
|
||||
virCPUx86Feature *feature = map->features[i];
|
||||
virCPUFeaturePolicy expected = VIR_CPU_FEATURE_LAST;
|
||||
+ bool explicit = false;
|
||||
+ bool ignore = false;
|
||||
|
||||
- if (x86DataIsSubset(&model->data, &feature->data))
|
||||
+ if (x86DataIsSubset(&model->data, &feature->data)) {
|
||||
+ explicit = true;
|
||||
expected = VIR_CPU_FEATURE_REQUIRE;
|
||||
- else if (!hostPassthrough ||
|
||||
- x86DataIsSubset(&modelDisabled->data, &feature->data))
|
||||
+ } else if (x86DataIsSubset(&modelDisabled->data, &feature->data)) {
|
||||
+ explicit = true;
|
||||
+ expected = VIR_CPU_FEATURE_DISABLE;
|
||||
+ } else if (!hostPassthrough) {
|
||||
+ /* implicitly disabled */
|
||||
expected = VIR_CPU_FEATURE_DISABLE;
|
||||
+ }
|
||||
+
|
||||
+ /* Features enabled or disabled by the hypervisor are ignored by
|
||||
+ * check='full' in case they were added to the model later and not
|
||||
+ * explicitly mentioned in the CPU definition. This matches how libvirt
|
||||
+ * behaved before the features were added.
|
||||
+ */
|
||||
+ if (!explicit &&
|
||||
+ g_strv_contains((const char **) model->addedFeatures, feature->name))
|
||||
+ ignore = true;
|
||||
|
||||
if (expected == VIR_CPU_FEATURE_DISABLE &&
|
||||
x86DataIsSubset(&enabled, &feature->data)) {
|
||||
VIR_DEBUG("Feature '%s' enabled by the hypervisor", feature->name);
|
||||
|
||||
- /* Extra features enabled by the hypervisor are ignored by
|
||||
- * check='full' in case they were added to the model later for
|
||||
- * backward compatibility with the older definition of the model.
|
||||
- */
|
||||
- if (cpu->check == VIR_CPU_CHECK_FULL &&
|
||||
- !g_strv_contains((const char **) model->addedFeatures, feature->name)) {
|
||||
+ if (cpu->check == VIR_CPU_CHECK_FULL && !ignore)
|
||||
virBufferAsprintf(&bufAdded, "%s,", feature->name);
|
||||
- } else if (virCPUDefUpdateFeature(cpu, feature->name,
|
||||
- VIR_CPU_FEATURE_REQUIRE) < 0) {
|
||||
+ else if (virCPUDefUpdateFeature(cpu, feature->name,
|
||||
+ VIR_CPU_FEATURE_REQUIRE) < 0)
|
||||
return -1;
|
||||
- }
|
||||
}
|
||||
|
||||
if (x86DataIsSubset(&disabled, &feature->data) ||
|
||||
(expected == VIR_CPU_FEATURE_REQUIRE &&
|
||||
!x86DataIsSubset(&enabled, &feature->data))) {
|
||||
VIR_DEBUG("Feature '%s' disabled by the hypervisor", feature->name);
|
||||
- if (cpu->check == VIR_CPU_CHECK_FULL)
|
||||
+
|
||||
+ if (cpu->check == VIR_CPU_CHECK_FULL && !ignore) {
|
||||
virBufferAsprintf(&bufRemoved, "%s,", feature->name);
|
||||
- else if (virCPUDefUpdateFeature(cpu, feature->name,
|
||||
- VIR_CPU_FEATURE_DISABLE) < 0)
|
||||
- return -1;
|
||||
+ } else {
|
||||
+ if (virCPUDefUpdateFeature(cpu, feature->name, VIR_CPU_FEATURE_DISABLE) < 0)
|
||||
+ return -1;
|
||||
+ x86DataSubtract(&disabled, &feature->data);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
From 08fef741d85ecfb3493c47f5f1334f91c30e3233 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <08fef741d85ecfb3493c47f5f1334f91c30e3233@dist-git>
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Wed, 9 Feb 2022 11:08:42 +0100
|
||||
Subject: [PATCH] qemu: Ignore missing vm.unprivileged_userfaultfd sysctl
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Older kernels did not support this sysctl, but they did not restrict
|
||||
userfaultfd in any way so everything worked as if
|
||||
vm.unprivileged_userfaultfd was set to 1. Thus we can safely ignore
|
||||
errors when setting the value.
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 558f00397a0d46ad22bf53a22a40ed6fc4fdb5eb)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2148578
|
||||
|
||||
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/postcopy-migration.sysctl | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/postcopy-migration.sysctl b/src/qemu/postcopy-migration.sysctl
|
||||
index aa8f015ae0..db3f11e49f 100644
|
||||
--- a/src/qemu/postcopy-migration.sysctl
|
||||
+++ b/src/qemu/postcopy-migration.sysctl
|
||||
@@ -3,4 +3,4 @@
|
||||
# privileged processes.
|
||||
# It can be safely overridden by a file in /etc/sysctl.d/ in case post-copy
|
||||
# migration is not used on the host.
|
||||
-vm.unprivileged_userfaultfd = 1
|
||||
+-vm.unprivileged_userfaultfd = 1
|
||||
--
|
||||
2.39.0
|
||||
|
@ -1,208 +0,0 @@
|
||||
From 8fbc827a89ef1163b64d39a2ff9b1c067ea82b63 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <8fbc827a89ef1163b64d39a2ff9b1c067ea82b63.1706524416.git.jdenemar@redhat.com>
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 18:42:13 +0100
|
||||
Subject: [PATCH] qemu: Introduce QEMU_CAPS_SMP_CLUSTERS
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit beb27dc61ed4bfe60ca32ec2cbbc937215f9e139)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_capabilities.c | 2 ++
|
||||
src/qemu/qemu_capabilities.h | 1 +
|
||||
tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml | 1 +
|
||||
tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml | 1 +
|
||||
14 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
||||
index 3d35333f09..a4d42b40ed 100644
|
||||
--- a/src/qemu/qemu_capabilities.c
|
||||
+++ b/src/qemu/qemu_capabilities.c
|
||||
@@ -699,6 +699,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
||||
"run-with.async-teardown", /* QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN */
|
||||
"virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA */
|
||||
"virtio-blk.iothread-mapping", /* QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING */
|
||||
+ "smp-clusters", /* QEMU_CAPS_SMP_CLUSTERS */
|
||||
);
|
||||
|
||||
|
||||
@@ -1552,6 +1553,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
|
||||
{ "query-display-options/ret-type/+sdl", QEMU_CAPS_SDL },
|
||||
{ "query-display-options/ret-type/+egl-headless", QEMU_CAPS_EGL_HEADLESS },
|
||||
{ "query-hotpluggable-cpus/ret-type/props/die-id", QEMU_CAPS_SMP_DIES },
|
||||
+ { "query-hotpluggable-cpus/ret-type/props/cluster-id", QEMU_CAPS_SMP_CLUSTERS },
|
||||
{ "query-named-block-nodes/arg-type/flat", QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT },
|
||||
{ "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE },
|
||||
{ "set-numa-node/arg-type/+hmat-lb", QEMU_CAPS_NUMA_HMAT },
|
||||
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
||||
index 279e9a8273..a353750670 100644
|
||||
--- a/src/qemu/qemu_capabilities.h
|
||||
+++ b/src/qemu/qemu_capabilities.h
|
||||
@@ -678,6 +678,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
||||
QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN, /* asynchronous teardown -run-with async-teardown=on|off */
|
||||
QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA, /* virtio-blk-vhost-vdpa block driver */
|
||||
QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING, /* virtio-blk supports per-virtqueue iothread mapping */
|
||||
+ QEMU_CAPS_SMP_CLUSTERS, /* -smp clusters= */
|
||||
|
||||
QEMU_CAPS_LAST /* this must always be the last item */
|
||||
} virQEMUCapsFlags;
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
index 4315241d1d..536524cf18 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.1.0_ppc64.xml
|
||||
@@ -154,6 +154,7 @@
|
||||
<flag name='virtio-crypto'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7001000</version>
|
||||
<microcodeVersion>42900244</microcodeVersion>
|
||||
<package>v7.1.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
index bd84750dc5..58e1111982 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.1.0_x86_64.xml
|
||||
@@ -188,6 +188,7 @@
|
||||
<flag name='virtio-crypto'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7001000</version>
|
||||
<microcodeVersion>43100244</microcodeVersion>
|
||||
<package>v7.1.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml b/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml
|
||||
index a1fc441412..127b8ee4c2 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml
|
||||
@@ -149,6 +149,7 @@
|
||||
<flag name='virtio-crypto'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7002000</version>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
<package>qemu-7.2.0-6.fc37</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml
|
||||
index 06a01a2c4c..a30ec3c164 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64+hvf.xml
|
||||
@@ -192,6 +192,7 @@
|
||||
<flag name='cryptodev-backend-lkcf'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7002000</version>
|
||||
<microcodeVersion>43100245</microcodeVersion>
|
||||
<package>v7.2.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml
|
||||
index 8ac1529c30..24ac7b8f6e 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_7.2.0_x86_64.xml
|
||||
@@ -192,6 +192,7 @@
|
||||
<flag name='cryptodev-backend-lkcf'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7002000</version>
|
||||
<microcodeVersion>43100245</microcodeVersion>
|
||||
<package>v7.2.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml
|
||||
index 31300d3d31..3f2acb5018 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.0.0_riscv64.xml
|
||||
@@ -138,6 +138,7 @@
|
||||
<flag name='virtio-crypto'/>
|
||||
<flag name='pvpanic-pci'/>
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>7002050</version>
|
||||
<microcodeVersion>0</microcodeVersion>
|
||||
<package>v7.2.0-333-g222059a0fc</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml
|
||||
index c2fa8eb028..85869f6b5d 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml
|
||||
@@ -196,6 +196,7 @@
|
||||
<flag name='virtio-gpu.blob'/>
|
||||
<flag name='rbd-encryption-layering'/>
|
||||
<flag name='rbd-encryption-luks-any'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8000000</version>
|
||||
<microcodeVersion>43100244</microcodeVersion>
|
||||
<package>v8.0.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml
|
||||
index 427ee9d5c7..19422f08fa 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml
|
||||
@@ -112,6 +112,7 @@
|
||||
<flag name='rbd-encryption-layering'/>
|
||||
<flag name='rbd-encryption-luks-any'/>
|
||||
<flag name='run-with.async-teardown'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8000050</version>
|
||||
<microcodeVersion>39100245</microcodeVersion>
|
||||
<package>v8.0.0-1270-g1c12355b</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml
|
||||
index d266dd0f31..0caee53550 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml
|
||||
@@ -198,6 +198,7 @@
|
||||
<flag name='qcow2-discard-no-unref'/>
|
||||
<flag name='run-with.async-teardown'/>
|
||||
<flag name='virtio-blk-vhost-vdpa'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8001000</version>
|
||||
<microcodeVersion>43100245</microcodeVersion>
|
||||
<package>v8.1.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml
|
||||
index 40d490c1c0..54fd349365 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.2.0_aarch64.xml
|
||||
@@ -162,6 +162,7 @@
|
||||
<flag name='rbd-encryption-luks-any'/>
|
||||
<flag name='qcow2-discard-no-unref'/>
|
||||
<flag name='run-with.async-teardown'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8002000</version>
|
||||
<microcodeVersion>61700246</microcodeVersion>
|
||||
<package>v8.2.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml
|
||||
index ee52952702..8a6527810a 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml
|
||||
@@ -199,6 +199,7 @@
|
||||
<flag name='qcow2-discard-no-unref'/>
|
||||
<flag name='run-with.async-teardown'/>
|
||||
<flag name='virtio-blk-vhost-vdpa'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8002000</version>
|
||||
<microcodeVersion>43100246</microcodeVersion>
|
||||
<package>v8.2.0</package>
|
||||
diff --git a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml
|
||||
index 65d86f7016..b4c3b1bae3 100644
|
||||
--- a/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml
|
||||
+++ b/tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml
|
||||
@@ -200,6 +200,7 @@
|
||||
<flag name='run-with.async-teardown'/>
|
||||
<flag name='virtio-blk-vhost-vdpa'/>
|
||||
<flag name='virtio-blk.iothread-mapping'/>
|
||||
+ <flag name='smp-clusters'/>
|
||||
<version>8002050</version>
|
||||
<microcodeVersion>43100245</microcodeVersion>
|
||||
<package>v8.2.0-196-g7425b6277f</package>
|
||||
--
|
||||
2.43.0
|
@ -1,117 +0,0 @@
|
||||
From 66312c8fea7d122acfd833e495e6b81642baff33 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <66312c8fea7d122acfd833e495e6b81642baff33.1706524416.git.jdenemar@redhat.com>
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 18:51:29 +0100
|
||||
Subject: [PATCH] qemu: Make monitor aware of CPU clusters
|
||||
|
||||
This makes it so libvirt can obtain accurate information about
|
||||
guest CPUs from QEMU, and should make it possible to correctly
|
||||
perform operations such as CPU hotplug.
|
||||
|
||||
Of course this is mostly moot at the moment: only aarch64 can use
|
||||
CPU clusters, and CPU hotplug is not yet implemented on that
|
||||
architecture.
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 763381df53d5a67804f828cb8db661f694d35296)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_domain.c | 3 ++-
|
||||
src/qemu/qemu_monitor.c | 2 ++
|
||||
src/qemu/qemu_monitor.h | 2 ++
|
||||
src/qemu/qemu_monitor_json.c | 5 +++++
|
||||
4 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index 3a00fb689e..e2a1bf2c13 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -9900,11 +9900,12 @@ qemuDomainRefreshVcpuInfo(virDomainObj *vm,
|
||||
|
||||
if (validTIDs)
|
||||
VIR_DEBUG("vCPU[%zu] PID %llu is valid "
|
||||
- "(node=%d socket=%d die=%d core=%d thread=%d)",
|
||||
+ "(node=%d socket=%d die=%d cluster=%d core=%d thread=%d)",
|
||||
i, (unsigned long long)info[i].tid,
|
||||
info[i].node_id,
|
||||
info[i].socket_id,
|
||||
info[i].die_id,
|
||||
+ info[i].cluster_id,
|
||||
info[i].core_id,
|
||||
info[i].thread_id);
|
||||
}
|
||||
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
|
||||
index dfad4ee1ea..a1773d86d4 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -1501,6 +1501,7 @@ qemuMonitorCPUInfoClear(qemuMonitorCPUInfo *cpus,
|
||||
cpus[i].qemu_id = -1;
|
||||
cpus[i].socket_id = -1;
|
||||
cpus[i].die_id = -1;
|
||||
+ cpus[i].cluster_id = -1;
|
||||
cpus[i].core_id = -1;
|
||||
cpus[i].thread_id = -1;
|
||||
cpus[i].node_id = -1;
|
||||
@@ -1658,6 +1659,7 @@ qemuMonitorGetCPUInfoHotplug(struct qemuMonitorQueryHotpluggableCpusEntry *hotpl
|
||||
!vcpus[mainvcpu].online;
|
||||
vcpus[mainvcpu].socket_id = hotplugvcpus[i].socket_id;
|
||||
vcpus[mainvcpu].die_id = hotplugvcpus[i].die_id;
|
||||
+ vcpus[mainvcpu].cluster_id = hotplugvcpus[i].cluster_id;
|
||||
vcpus[mainvcpu].core_id = hotplugvcpus[i].core_id;
|
||||
vcpus[mainvcpu].thread_id = hotplugvcpus[i].thread_id;
|
||||
vcpus[mainvcpu].node_id = hotplugvcpus[i].node_id;
|
||||
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
|
||||
index c4af9b407d..981c609e9f 100644
|
||||
--- a/src/qemu/qemu_monitor.h
|
||||
+++ b/src/qemu/qemu_monitor.h
|
||||
@@ -590,6 +590,7 @@ struct qemuMonitorQueryHotpluggableCpusEntry {
|
||||
int node_id;
|
||||
int socket_id;
|
||||
int die_id;
|
||||
+ int cluster_id;
|
||||
int core_id;
|
||||
int thread_id;
|
||||
|
||||
@@ -613,6 +614,7 @@ struct _qemuMonitorCPUInfo {
|
||||
* all entries are -1 */
|
||||
int socket_id;
|
||||
int die_id;
|
||||
+ int cluster_id;
|
||||
int core_id;
|
||||
int thread_id;
|
||||
int node_id;
|
||||
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
|
||||
index 9cb0f3d1d8..e114b6bfb1 100644
|
||||
--- a/src/qemu/qemu_monitor_json.c
|
||||
+++ b/src/qemu/qemu_monitor_json.c
|
||||
@@ -7579,12 +7579,14 @@ qemuMonitorJSONProcessHotpluggableCpusReply(virJSONValue *vcpu,
|
||||
entry->node_id = -1;
|
||||
entry->socket_id = -1;
|
||||
entry->die_id = -1;
|
||||
+ entry->cluster_id = -1;
|
||||
entry->core_id = -1;
|
||||
entry->thread_id = -1;
|
||||
|
||||
ignore_value(virJSONValueObjectGetNumberInt(props, "node-id", &entry->node_id));
|
||||
ignore_value(virJSONValueObjectGetNumberInt(props, "socket-id", &entry->socket_id));
|
||||
ignore_value(virJSONValueObjectGetNumberInt(props, "die-id", &entry->die_id));
|
||||
+ ignore_value(virJSONValueObjectGetNumberInt(props, "cluster-id", &entry->cluster_id));
|
||||
ignore_value(virJSONValueObjectGetNumberInt(props, "core-id", &entry->core_id));
|
||||
ignore_value(virJSONValueObjectGetNumberInt(props, "thread-id", &entry->thread_id));
|
||||
|
||||
@@ -7622,6 +7624,9 @@ qemuMonitorQueryHotpluggableCpusEntrySort(const void *p1,
|
||||
if (a->die_id != b->die_id)
|
||||
return a->die_id - b->die_id;
|
||||
|
||||
+ if (a->cluster_id != b->cluster_id)
|
||||
+ return a->cluster_id - b->cluster_id;
|
||||
+
|
||||
if (a->core_id != b->core_id)
|
||||
return a->core_id - b->core_id;
|
||||
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,105 @@
|
||||
From 85b7d8295d72214b08f0fff93c473baaa88a569b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <85b7d8295d72214b08f0fff93c473baaa88a569b@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 14 Feb 2022 15:57:21 +0100
|
||||
Subject: [PATCH] qemu: Make 'struct _qemuMonitorMessage' private
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move the declaration of the struct into 'qemu_monitor_priv.h' as other
|
||||
code has no business in peeking into the monitor messages.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit f9ae469a6ebb17e0990096e826f049c1c46cd760)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2170472
|
||||
---
|
||||
src/qemu/qemu_monitor.h | 14 --------------
|
||||
src/qemu/qemu_monitor_json.c | 3 +++
|
||||
src/qemu/qemu_monitor_priv.h | 16 ++++++++++++++++
|
||||
tests/qemucapsprobemock.c | 3 +++
|
||||
4 files changed, 22 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
|
||||
index a4a4edf5a6..d00967d84f 100644
|
||||
--- a/src/qemu/qemu_monitor.h
|
||||
+++ b/src/qemu/qemu_monitor.h
|
||||
@@ -34,21 +34,7 @@
|
||||
#include "virenum.h"
|
||||
|
||||
typedef struct _qemuMonitor qemuMonitor;
|
||||
-
|
||||
typedef struct _qemuMonitorMessage qemuMonitorMessage;
|
||||
-struct _qemuMonitorMessage {
|
||||
- int txFD;
|
||||
-
|
||||
- const char *txBuffer;
|
||||
- int txOffset;
|
||||
- int txLength;
|
||||
-
|
||||
- /* Used by the JSON monitor to hold reply / error */
|
||||
- void *rxObject;
|
||||
-
|
||||
- /* True if rxObject is ready, or a fatal error occurred on the monitor channel */
|
||||
- bool finished;
|
||||
-};
|
||||
|
||||
typedef enum {
|
||||
QEMU_MONITOR_EVENT_PANIC_INFO_TYPE_NONE = 0,
|
||||
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
|
||||
index 34a46b9b41..7d8755246f 100644
|
||||
--- a/src/qemu/qemu_monitor_json.c
|
||||
+++ b/src/qemu/qemu_monitor_json.c
|
||||
@@ -44,6 +44,9 @@
|
||||
# include "libvirt_qemu_probes.h"
|
||||
#endif
|
||||
|
||||
+#define LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW
|
||||
+#include "qemu_monitor_priv.h"
|
||||
+
|
||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||
|
||||
VIR_LOG_INIT("qemu.qemu_monitor_json");
|
||||
diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h
|
||||
index 31bb3526b9..6115f830de 100644
|
||||
--- a/src/qemu/qemu_monitor_priv.h
|
||||
+++ b/src/qemu/qemu_monitor_priv.h
|
||||
@@ -24,5 +24,21 @@
|
||||
|
||||
#include "qemu_monitor.h"
|
||||
|
||||
+
|
||||
+struct _qemuMonitorMessage {
|
||||
+ int txFD;
|
||||
+
|
||||
+ const char *txBuffer;
|
||||
+ int txOffset;
|
||||
+ int txLength;
|
||||
+
|
||||
+ /* Used by the JSON monitor to hold reply / error */
|
||||
+ void *rxObject;
|
||||
+
|
||||
+ /* True if rxObject is ready, or a fatal error occurred on the monitor channel */
|
||||
+ bool finished;
|
||||
+};
|
||||
+
|
||||
+
|
||||
void
|
||||
qemuMonitorResetCommandID(qemuMonitor *mon);
|
||||
diff --git a/tests/qemucapsprobemock.c b/tests/qemucapsprobemock.c
|
||||
index 915036d178..2717ed5d84 100644
|
||||
--- a/tests/qemucapsprobemock.c
|
||||
+++ b/tests/qemucapsprobemock.c
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "qemu/qemu_monitor.h"
|
||||
#include "qemu/qemu_monitor_json.h"
|
||||
|
||||
+#define LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW
|
||||
+#include "qemu/qemu_monitor_priv.h"
|
||||
+
|
||||
#define REAL_SYM(realFunc) \
|
||||
do { \
|
||||
if (!realFunc && !(realFunc = dlsym(RTLD_NEXT, __FUNCTION__))) { \
|
||||
--
|
||||
2.40.1
|
@ -1,646 +0,0 @@
|
||||
From 53727afb9517dbfe4182f669eaf8dbe8c38e143c Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <53727afb9517dbfe4182f669eaf8dbe8c38e143c.1706524416.git.jdenemar@redhat.com>
|
||||
From: Andrea Bolognani <abologna@redhat.com>
|
||||
Date: Fri, 5 Jan 2024 18:44:56 +0100
|
||||
Subject: [PATCH] qemu: Use CPU clusters for guests
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 655459420adb447da4744408e62537bc6ae960dd)
|
||||
|
||||
https://issues.redhat.com/browse/RHEL-7043
|
||||
|
||||
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_command.c | 5 ++++-
|
||||
.../qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args | 2 +-
|
||||
.../qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args | 2 +-
|
||||
.../cpu-numa-no-memory-element.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args | 2 +-
|
||||
.../fd-memory-no-numa-topology.x86_64-latest.args | 2 +-
|
||||
.../fd-memory-numa-topology.x86_64-latest.args | 2 +-
|
||||
.../fd-memory-numa-topology2.x86_64-latest.args | 2 +-
|
||||
.../fd-memory-numa-topology3.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args | 2 +-
|
||||
.../memfd-memory-default-hugepage.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-dimm-addr.x86_64-latest.args | 2 +-
|
||||
.../qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-multiple.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-access.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-align.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-label.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-pmem.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-ppc64.ppc64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm-readonly.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-nvdimm.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-virtio-mem.x86_64-latest.args | 2 +-
|
||||
.../memory-hotplug-virtio-pmem.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args | 2 +-
|
||||
.../numad-auto-memory-vcpu-cpuset.x86_64-latest.args | 2 +-
|
||||
...to-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args | 2 +-
|
||||
.../numad-auto-vcpu-no-numatune.x86_64-latest.args | 2 +-
|
||||
.../numad-auto-vcpu-static-numatune.x86_64-latest.args | 2 +-
|
||||
.../numad-static-memory-auto-vcpu.x86_64-latest.args | 2 +-
|
||||
.../numad-static-vcpu-no-numatune.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/numad.x86_64-latest.args | 2 +-
|
||||
.../numatune-auto-nodeset-invalid.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args | 2 +-
|
||||
tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args | 2 +-
|
||||
.../qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args | 2 +-
|
||||
44 files changed, 47 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||
index 71daa85e55..712feb7b81 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -7226,7 +7226,8 @@ qemuBuildSmpCommandLine(virCommand *cmd,
|
||||
_("Only 1 die per socket is supported"));
|
||||
return -1;
|
||||
}
|
||||
- if (def->cpu->clusters != 1) {
|
||||
+ if (def->cpu->clusters != 1 &&
|
||||
+ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_CLUSTERS)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Only 1 cluster per die is supported"));
|
||||
return -1;
|
||||
@@ -7234,6 +7235,8 @@ qemuBuildSmpCommandLine(virCommand *cmd,
|
||||
virBufferAsprintf(&buf, ",sockets=%u", def->cpu->sockets);
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_DIES))
|
||||
virBufferAsprintf(&buf, ",dies=%u", def->cpu->dies);
|
||||
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SMP_CLUSTERS))
|
||||
+ virBufferAsprintf(&buf, ",clusters=%u", def->cpu->clusters);
|
||||
virBufferAsprintf(&buf, ",cores=%u", def->cpu->cores);
|
||||
virBufferAsprintf(&buf, ",threads=%u", def->cpu->threads);
|
||||
} else {
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args
|
||||
index 009c08d71a..af1b464104 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-hotplug-startup.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 1,maxcpus=6,sockets=3,dies=1,cores=2,threads=1 \
|
||||
+-smp 1,maxcpus=6,sockets=3,dies=1,clusters=1,cores=2,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args
|
||||
index 3b12934425..22fca082a8 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa-disjoint.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-3,cpus=8-11,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args
|
||||
index ee6974326d..bc4a6ad5f3 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa-disordered.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=328704k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-5,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args
|
||||
index 0c9ec88b8b..1e486b1bbc 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa-memshared.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node0","share":true,"size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node1","share":false,"size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa-no-memory-element.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa-no-memory-element.x86_64-latest.args
|
||||
index 31a61f023e..59372c4ab9 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa-no-memory-element.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa-no-memory-element.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args
|
||||
index 31a61f023e..59372c4ab9 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa1.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args
|
||||
index 31a61f023e..59372c4ab9 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-numa2.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args
|
||||
index 009c08d71a..af1b464104 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-topology1.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 1,maxcpus=6,sockets=3,dies=1,cores=2,threads=1 \
|
||||
+-smp 1,maxcpus=6,sockets=3,dies=1,clusters=1,cores=2,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args
|
||||
index 7ba175fa80..8560eb6126 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-topology2.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 6,sockets=1,dies=1,cores=2,threads=3 \
|
||||
+-smp 6,sockets=1,dies=1,clusters=1,cores=2,threads=3 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args
|
||||
index c11b4cd307..3878c558b8 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-topology3.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 6,sockets=3,dies=1,cores=2,threads=1 \
|
||||
+-smp 6,sockets=3,dies=1,clusters=1,cores=2,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args
|
||||
index d0e31ba2b5..8720038c0d 100644
|
||||
--- a/tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/cpu-topology4.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 1,maxcpus=6,sockets=1,dies=3,cores=2,threads=1 \
|
||||
+-smp 1,maxcpus=6,sockets=1,dies=3,clusters=1,cores=2,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-no-numa-topology.x86_64-latest.args b/tests/qemuxml2argvdata/fd-memory-no-numa-topology.x86_64-latest.args
|
||||
index 58b3c7b544..1bd75a85a6 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-no-numa-topology.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-no-numa-topology.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-m size=14680064k \
|
||||
-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/pc.ram","share":true,"x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":15032385536}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 8,sockets=8,dies=1,cores=1,threads=1 \
|
||||
+-smp 8,sockets=8,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology.x86_64-latest.args b/tests/qemuxml2argvdata/fd-memory-numa-topology.x86_64-latest.args
|
||||
index 21f9a16540..17ef506431 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=14680064k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 8,sockets=1,dies=1,cores=8,threads=1 \
|
||||
+-smp 8,sockets=1,dies=1,clusters=1,cores=8,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":true,"prealloc":true,"size":15032385536}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology2.x86_64-latest.args b/tests/qemuxml2argvdata/fd-memory-numa-topology2.x86_64-latest.args
|
||||
index 3bf16f9caf..b247231b85 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology2.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology2.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=29360128k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 20,sockets=1,dies=1,cores=20,threads=1 \
|
||||
+-smp 20,sockets=1,dies=1,clusters=1,cores=20,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":false,"prealloc":true,"size":15032385536}' \
|
||||
-numa node,nodeid=0,cpus=0-7,cpus=16-19,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1","share":true,"prealloc":true,"size":15032385536}' \
|
||||
diff --git a/tests/qemuxml2argvdata/fd-memory-numa-topology3.x86_64-latest.args b/tests/qemuxml2argvdata/fd-memory-numa-topology3.x86_64-latest.args
|
||||
index 3153e22d56..9e94209499 100644
|
||||
--- a/tests/qemuxml2argvdata/fd-memory-numa-topology3.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/fd-memory-numa-topology3.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=44040192k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 32,sockets=1,dies=1,cores=32,threads=1 \
|
||||
+-smp 32,sockets=1,dies=1,clusters=1,cores=32,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node0","share":true,"prealloc":true,"size":15032385536}' \
|
||||
-numa node,nodeid=0,cpus=0-1,cpus=6-31,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/var/lib/libvirt/qemu/ram/-1-instance-00000092/ram-node1","share":true,"prealloc":true,"size":15032385536}' \
|
||||
diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
|
||||
index fa376accb5..f30db0ad09 100644
|
||||
--- a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=1048576k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
|
||||
index 55969eb2fd..f850d7be60 100644
|
||||
--- a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=14680064k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 8,sockets=1,dies=1,cores=8,threads=1 \
|
||||
+-smp 8,sockets=1,dies=1,clusters=1,cores=8,threads=1 \
|
||||
-object '{"qom-type":"thread-context","id":"tc-ram-node0","node-affinity":[3]}' \
|
||||
-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"host-nodes":[3],"policy":"preferred","prealloc-context":"tc-ram-node0"}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
|
||||
index 1ef2d69fcb..dbe2b82a56 100644
|
||||
--- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-instance-00000092/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=14680064k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 8,sockets=1,dies=1,cores=8,threads=1 \
|
||||
+-smp 8,sockets=1,dies=1,clusters=1,cores=8,threads=1 \
|
||||
-object '{"qom-type":"thread-context","id":"tc-ram-node0","node-affinity":[3]}' \
|
||||
-object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"prealloc-threads":8,"size":15032385536,"host-nodes":[3],"policy":"preferred","prealloc-context":"tc-ram-node0"}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
|
||||
index 6ae1fd1b98..c15fe191de 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args
|
||||
index 71817da309..a729930db2 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args
|
||||
index ad1dad01ac..f1f2f93a11 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-multiple.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=2095104k,slots=2,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
|
||||
index f09ae22927..d53732b39e 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
|
||||
index 6cfe4b8263..cba467d9d3 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
|
||||
index 4041c15b2b..2ad23a0224 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
|
||||
index 3547e96c00..ac5ca187b1 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args
|
||||
index 9b57518fca..c2c1623d9f 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.ppc64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu POWER9 \
|
||||
-m size=1048576k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args
|
||||
index 9b57518fca..c2c1623d9f 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.ppc64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu POWER9 \
|
||||
-m size=1048576k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
|
||||
index 17bacfb2f6..8af4673841 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
|
||||
index 1321e5556e..6531caa908 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=1048576k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
|
||||
index 607ce9b0e8..dbe96ae21d 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=2095104k,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
|
||||
index 9bbde420a9..df7b7f80a9 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=2095104k,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args
|
||||
index 53f0fbc68f..d04d9d73e9 100644
|
||||
--- a/tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/memory-hotplug.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k,slots=16,maxmem=1099511627776k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
|
||||
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.args b/tests/qemuxml2argvdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.args
|
||||
index d4238f3d9e..138c8255f7 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-auto-memory-vcpu-cpuset.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"interleave"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args b/tests/qemuxml2argvdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args
|
||||
index d4238f3d9e..138c8255f7 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-auto-memory-vcpu-no-cpuset-and-placement.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"interleave"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args b/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args
|
||||
index 7022d2cc00..f13f04c9d4 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-auto-vcpu-no-numatune.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"bind"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-auto-vcpu-static-numatune.x86_64-latest.args b/tests/qemuxml2argvdata/numad-auto-vcpu-static-numatune.x86_64-latest.args
|
||||
index 9ddfb286b5..f1c49619db 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-auto-vcpu-static-numatune.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-auto-vcpu-static-numatune.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0],"policy":"interleave"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-static-memory-auto-vcpu.x86_64-latest.args b/tests/qemuxml2argvdata/numad-static-memory-auto-vcpu.x86_64-latest.args
|
||||
index d4238f3d9e..138c8255f7 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-static-memory-auto-vcpu.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-static-memory-auto-vcpu.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"interleave"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args b/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args
|
||||
index ffbccb8408..76ca5c4bea 100644
|
||||
--- a/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad-static-vcpu-no-numatune.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numad.x86_64-latest.args b/tests/qemuxml2argvdata/numad.x86_64-latest.args
|
||||
index d4238f3d9e..138c8255f7 100644
|
||||
--- a/tests/qemuxml2argvdata/numad.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numad.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"interleave"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/numatune-auto-nodeset-invalid.x86_64-latest.args b/tests/qemuxml2argvdata/numatune-auto-nodeset-invalid.x86_64-latest.args
|
||||
index 57a2b893f1..e35471d91b 100644
|
||||
--- a/tests/qemuxml2argvdata/numatune-auto-nodeset-invalid.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/numatune-auto-nodeset-invalid.x86_64-latest.args
|
||||
@@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-m size=219136k \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"host-nodes":[0,1,2,3],"policy":"preferred"}' \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 2,sockets=2,dies=1,cores=1,threads=1 \
|
||||
+-smp 2,sockets=2,dies=1,clusters=1,cores=1,threads=1 \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
diff --git a/tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args b/tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args
|
||||
index bf553a8e32..d3960731be 100644
|
||||
--- a/tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/pci-expander-bus.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-expander-test/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args b/tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args
|
||||
index 3fb86c29c2..b179fadc27 100644
|
||||
--- a/tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/pcie-expander-bus.x86_64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-pcie-expander-bus-te/.config \
|
||||
-cpu qemu64 \
|
||||
-m size=219136k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 16,sockets=2,dies=1,cores=4,threads=2 \
|
||||
+-smp 16,sockets=2,dies=1,clusters=1,cores=4,threads=2 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":112197632}' \
|
||||
-numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":112197632}' \
|
||||
diff --git a/tests/qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args b/tests/qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args
|
||||
index 7ffcb1d8c5..942540a296 100644
|
||||
--- a/tests/qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args
|
||||
+++ b/tests/qemuxml2argvdata/pseries-phb-numa-node.ppc64-latest.args
|
||||
@@ -15,7 +15,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
|
||||
-cpu POWER9 \
|
||||
-m size=2097152k \
|
||||
-overcommit mem-lock=off \
|
||||
--smp 8,sockets=2,dies=1,cores=1,threads=4 \
|
||||
+-smp 8,sockets=2,dies=1,clusters=1,cores=1,threads=4 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824,"host-nodes":[1],"policy":"bind"}' \
|
||||
-numa node,nodeid=0,cpus=0-3,memdev=ram-node0 \
|
||||
-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":1073741824,"host-nodes":[2],"policy":"bind"}' \
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,72 @@
|
||||
From fa7cff4e684ededd184976d4fdf217cc155825b8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fa7cff4e684ededd184976d4fdf217cc155825b8@dist-git>
|
||||
From: Michal Privoznik <mprivozn@redhat.com>
|
||||
Date: Mon, 31 Jan 2022 12:55:47 +0100
|
||||
Subject: [PATCH] qemu: Validate domain definition even on migration
|
||||
|
||||
When we are about to spawn QEMU, we validate the domain
|
||||
definition against qemuCaps. Except when domain is/was already
|
||||
running before (i.e. on incoming migration, snapshots, resume
|
||||
from a file). However, especially on incoming migration it may
|
||||
happen that the destination QEMU is different to the source
|
||||
QEMU, e.g. the destination QEMU may have some devices disabled.
|
||||
|
||||
And we have a function that validates devices/features requested
|
||||
in domain XML against the desired QEMU capabilities (aka
|
||||
qemuCaps) - it's virDomainDefValidate() which calls
|
||||
qemuValidateDomainDef() and qemuValidateDomainDeviceDef()
|
||||
subsequently.
|
||||
|
||||
But the problem here is that the validation function is
|
||||
explicitly skipped over in specific scenarios (like incoming
|
||||
migration, restore from a snapshot or previously saved file).
|
||||
|
||||
This in turn means that we may spawn QEMU and request
|
||||
device/features it doesn't support. When that happens QEMU fails
|
||||
to load migration stream:
|
||||
|
||||
qemu-kvm: ... 'virtio-mem-pci' is not a valid device model name
|
||||
|
||||
(NB, while the example shows one particular device, the problem
|
||||
is paramount)
|
||||
|
||||
This problem is easier to run into since we are slowly moving
|
||||
validation from qemu_command.c into said validation functions.
|
||||
|
||||
The solution is simple: do the validation in all cases. And while
|
||||
it may happen that users would be unable to migrate/restore a
|
||||
guest due to a bug in our validator, spawning QEMU without
|
||||
validation is worse (especially when you consider that users can
|
||||
supply their own XMLs for migrate/restore operations - these were
|
||||
never validated).
|
||||
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2048435
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
||||
(cherry picked from commit 517b8c12b98d7ac0bb4d582e0b491d50d776eb6d)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2050702
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_process.c | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
||||
index 5c9ca0fe4f..5c6657a876 100644
|
||||
--- a/src/qemu/qemu_process.c
|
||||
+++ b/src/qemu/qemu_process.c
|
||||
@@ -5411,11 +5411,7 @@ qemuProcessStartValidate(virQEMUDriver *driver,
|
||||
|
||||
}
|
||||
|
||||
- /* Checks below should not be executed when starting a qemu process for a
|
||||
- * VM that was running before (migration, snapshots, save). It's more
|
||||
- * important to start such VM than keep the configuration clean */
|
||||
- if ((flags & VIR_QEMU_PROCESS_START_NEW) &&
|
||||
- virDomainDefValidate(vm->def, 0, driver->xmlopt, qemuCaps) < 0)
|
||||
+ if (virDomainDefValidate(vm->def, 0, driver->xmlopt, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuProcessStartValidateGraphics(vm) < 0)
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,46 @@
|
||||
From c57b31305a7fc8c2a4d11e11e7a48c4826160fa2 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c57b31305a7fc8c2a4d11e11e7a48c4826160fa2@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 1 Mar 2023 16:51:42 +0100
|
||||
Subject: [PATCH] qemu: agent: Make fetching of 'can-offline' member from
|
||||
'guest-query-vcpus' optional
|
||||
|
||||
The 'can-offline' member is optional according to agent's schema and in
|
||||
fact in certain cases it's not returned. Libvirt then spams the logs
|
||||
if something is polling the bulk guest stats API.
|
||||
|
||||
Noticed when going through oVirt logs which appears to call the bulk
|
||||
stats API repeatedly.
|
||||
|
||||
Instead of requiring it we simply reply that the vCPU can't be offlined.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Laine Stump <laine@redhat.com>
|
||||
(cherry picked from commit 790ea58153b9ef1120a577d1a87a4ca2e988ee5c)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2174447
|
||||
---
|
||||
src/qemu/qemu_agent.c | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
|
||||
index db844148a6..09b7340bc8 100644
|
||||
--- a/src/qemu/qemu_agent.c
|
||||
+++ b/src/qemu/qemu_agent.c
|
||||
@@ -1371,12 +1371,8 @@ qemuAgentGetVCPUs(qemuAgent *agent,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (virJSONValueObjectGetBoolean(entry, "can-offline",
|
||||
- &in->offlinable) < 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("'can-offline' missing in reply of guest-get-vcpus"));
|
||||
- return -1;
|
||||
- }
|
||||
+ in->offlinable = false;
|
||||
+ ignore_value(virJSONValueObjectGetBoolean(entry, "can-offline", &in->offlinable));
|
||||
}
|
||||
|
||||
return ndata;
|
||||
--
|
||||
2.39.2
|
||||
|
@ -0,0 +1,39 @@
|
||||
From 521e9a7731ac678ca790da4b04dabe4369efb984 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <521e9a7731ac678ca790da4b04dabe4369efb984@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 1 Mar 2023 17:09:42 +0100
|
||||
Subject: [PATCH] qemu: domain: Fix logic when tainting domain
|
||||
|
||||
Originally the code was skipping all repeated taints with the same taint
|
||||
flag but a logic bug introduced in commit 30626ed15b239c424ae inverted
|
||||
the condition. This caused that actually the first occurence was NOT
|
||||
logged but any subsequent was.
|
||||
|
||||
This was noticed when going through oVirt logs as they use custom guest
|
||||
agent commands and the logs are totally spammed with this message.
|
||||
|
||||
Fixes: 30626ed15b239c424ae891f096057a696eadd715
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Laine Stump <laine@redhat.com>
|
||||
(cherry picked from commit 9134b40d0b43a5e1a9928b0a0d948205941d9807)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2174447
|
||||
---
|
||||
src/qemu/qemu_domain.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||
index c24d1e4d53..c70661fc49 100644
|
||||
--- a/src/qemu/qemu_domain.c
|
||||
+++ b/src/qemu/qemu_domain.c
|
||||
@@ -6369,7 +6369,7 @@ void qemuDomainObjTaintMsg(virQEMUDriver *driver,
|
||||
const char *extrasuffix = "";
|
||||
va_list args;
|
||||
|
||||
- if (virDomainObjTaint(obj, taint)) {
|
||||
+ if (!virDomainObjTaint(obj, taint)) {
|
||||
/* If an extra message was given we must always
|
||||
* emit the taint warning, otherwise it is a
|
||||
* one-time only warning per VM
|
||||
--
|
||||
2.39.2
|
||||
|
44
SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch
Normal file
44
SOURCES/libvirt-qemu-fix-inactive-snapshot-revert.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <94bc9eaf3bbcaec47bd233378bbbb45f5f1523ca@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Thu, 20 Jan 2022 14:53:33 +0100
|
||||
Subject: [PATCH] qemu: fix inactive snapshot revert
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The commit splitting out the qemuSnapshotRevertInactive function
|
||||
dropped the 'defined = true' line by accident and instead
|
||||
returned -1, leaving the user with a cryptic error:
|
||||
error: An error occurred, but the cause is unknown
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2039136
|
||||
https://gitlab.com/libvirt/libvirt/-/issues/266
|
||||
|
||||
Fixes: 85e4a13c3f19078fb6af5ffb4a80022c142cbc7e
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 76deb656132bb8817ddae4b7f417930c4db824c9)
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2043584
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_snapshot.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
|
||||
index f92e00f9c0..ac7bab90f8 100644
|
||||
--- a/src/qemu/qemu_snapshot.c
|
||||
+++ b/src/qemu/qemu_snapshot.c
|
||||
@@ -2193,7 +2193,7 @@ qemuSnapshotRevertInactive(virDomainObj *vm,
|
||||
|
||||
if (*inactiveConfig) {
|
||||
virDomainObjAssignDef(vm, inactiveConfig, false, NULL);
|
||||
- return -1;
|
||||
+ defined = true;
|
||||
}
|
||||
|
||||
if (flags & (VIR_DOMAIN_SNAPSHOT_REVERT_RUNNING |
|
||||
--
|
||||
2.35.0
|
||||
|
@ -0,0 +1,67 @@
|
||||
From c70b1a8d8a4bc34bcbf9ef4bccac678257b8c494 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c70b1a8d8a4bc34bcbf9ef4bccac678257b8c494@dist-git>
|
||||
From: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||
Date: Wed, 2 Feb 2022 17:28:17 +0100
|
||||
Subject: [PATCH] qemu: gpu: Get pid without binary validation
|
||||
|
||||
The binary validation in virPidFileReadPathIfAlive may fail with EACCES
|
||||
if the calling process does not have CAP_SYS_PTRACE capability.
|
||||
Therefore instead do only the check that the pidfile is locked by the
|
||||
correct process.
|
||||
|
||||
Fixes the same issue as with swtpm.
|
||||
|
||||
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit e3dfa52d260da8a41a0ec35767d08e37c825824a)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_vhost_user_gpu.c | 9 +++------
|
||||
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_vhost_user_gpu.c b/src/qemu/qemu_vhost_user_gpu.c
|
||||
index ef198a4820..f7d444e851 100644
|
||||
--- a/src/qemu/qemu_vhost_user_gpu.c
|
||||
+++ b/src/qemu/qemu_vhost_user_gpu.c
|
||||
@@ -54,7 +54,6 @@ qemuVhostUserGPUCreatePidFilename(const char *stateDir,
|
||||
|
||||
/*
|
||||
* qemuVhostUserGPUGetPid:
|
||||
- * @binpath: path of executable associated with the pidfile
|
||||
* @stateDir: the directory where vhost-user-gpu writes the pidfile into
|
||||
* @shortName: short name of the domain
|
||||
* @alias: video device alias
|
||||
@@ -65,8 +64,7 @@ qemuVhostUserGPUCreatePidFilename(const char *stateDir,
|
||||
* set to -1;
|
||||
*/
|
||||
static int
|
||||
-qemuVhostUserGPUGetPid(const char *binPath,
|
||||
- const char *stateDir,
|
||||
+qemuVhostUserGPUGetPid(const char *stateDir,
|
||||
const char *shortName,
|
||||
const char *alias,
|
||||
pid_t *pid)
|
||||
@@ -76,7 +74,7 @@ qemuVhostUserGPUGetPid(const char *binPath,
|
||||
if (!(pidfile = qemuVhostUserGPUCreatePidFilename(stateDir, shortName, alias)))
|
||||
return -1;
|
||||
|
||||
- if (virPidFileReadPathIfAlive(pidfile, pid, binPath) < 0)
|
||||
+ if (virPidFileReadPathIfLocked(pidfile, pid) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@@ -253,8 +251,7 @@ qemuExtVhostUserGPUSetupCgroup(virQEMUDriver *driver,
|
||||
if (!shortname)
|
||||
return -1;
|
||||
|
||||
- rc = qemuVhostUserGPUGetPid(video->driver->vhost_user_binary,
|
||||
- cfg->stateDir, shortname, video->info.alias, &pid);
|
||||
+ rc = qemuVhostUserGPUGetPid(cfg->stateDir, shortname, video->info.alias, &pid);
|
||||
if (rc < 0 || (rc == 0 && pid == (pid_t)-1)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Could not get process id of vhost-user-gpu"));
|
||||
--
|
||||
2.39.0
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 5d48c5d215071526383b8fc50d81ecde62e4111b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Fri, 19 Apr 2024 15:51:35 +0200
|
||||
Subject: [PATCH] qemu: migration: Don't use empty string for 'tls-hostname'
|
||||
NBD blockdev
|
||||
|
||||
While QEMU accepts and interprets an empty string in the tls-hostname
|
||||
field in migration parametes as if it's unset, the same does not apply
|
||||
for the 'tls-hostname' field when 'blockdev-add'-ing a NBD backend for
|
||||
non-shared storage migration.
|
||||
|
||||
When libvirt sets up migation with TLS in 'qemuMigrationParamsEnableTLS'
|
||||
the QEMU_MIGRATION_PARAM_TLS_HOSTNAME migration parameter will be set to
|
||||
empty string in case when the 'hostname' argument is passed as NULL.
|
||||
|
||||
Later on when setting up the NBD connections for non-shared storage
|
||||
migration 'qemuMigrationParamsGetTLSHostname', which fetches the value
|
||||
of the aforementioned TLS parameter.
|
||||
|
||||
This bug was mostly latent until recently as libvirt used
|
||||
MIGRATION_DEST_CONNECT_HOST mode in most cases which required the
|
||||
hostname to be passed, thus the parameter was set properly.
|
||||
|
||||
This changed with 8d693d79c40 for post-copy migration, where libvirt now
|
||||
instructs qemu to connect and thus passes NULL hostname to
|
||||
qemuMigrationParamsEnableTLS, which in turn causes libvirt to try to
|
||||
add NBD connection with empty string as tls-hostname resulting in:
|
||||
|
||||
error: internal error: unable to execute QEMU command 'blockdev-add': Certificate does not match the hostname
|
||||
|
||||
To address this modify 'qemuMigrationParamsGetTLSHostname' to undo the
|
||||
weird semantics the migration code uses to handle TLS hostname and make
|
||||
it return NULL if the hostname is an empty string.
|
||||
|
||||
Fixes: e8fa09d66bc
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-32880
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_migration_params.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
|
||||
index e955822f68f..48f8657f716 100644
|
||||
--- a/src/qemu/qemu_migration_params.c
|
||||
+++ b/src/qemu/qemu_migration_params.c
|
||||
@@ -1158,6 +1158,7 @@ qemuMigrationParamsEnableTLS(virQEMUDriver *driver,
|
||||
*tlsAlias) < 0)
|
||||
return -1;
|
||||
|
||||
+ /* QEMU interprets an empty string for hostname as if it is not populated */
|
||||
if (!migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].set &&
|
||||
qemuMigrationParamsSetString(migParams,
|
||||
QEMU_MIGRATION_PARAM_TLS_HOSTNAME,
|
||||
@@ -1659,13 +1660,23 @@ qemuMigrationCapsGet(virDomainObj *vm,
|
||||
* @migParams: Migration params object
|
||||
*
|
||||
* Fetches the value of the QEMU_MIGRATION_PARAM_TLS_HOSTNAME parameter which is
|
||||
- * passed from the user as VIR_MIGRATE_PARAM_TLS_DESTINATION
|
||||
+ * passed from the user as VIR_MIGRATE_PARAM_TLS_DESTINATION.
|
||||
+ *
|
||||
+ * In contrast with the migration parameter semantics, where an empty string
|
||||
+ * is considered as if the hostname was not provided, this function will return
|
||||
+ * NULL instead of an empty string as other parts of QEMU expect that the
|
||||
+ * hostname is not provided at all.
|
||||
*/
|
||||
const char *
|
||||
qemuMigrationParamsGetTLSHostname(qemuMigrationParams *migParams)
|
||||
{
|
||||
+ const char *hostname = migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].value.s;
|
||||
+
|
||||
if (!migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].set)
|
||||
return NULL;
|
||||
|
||||
- return migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].value.s;
|
||||
+ if (STREQ(hostname, ""))
|
||||
+ return NULL;
|
||||
+
|
||||
+ return hostname;
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
From 52036c598d2670b4d103c923be1fdd95c096be4e Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <52036c598d2670b4d103c923be1fdd95c096be4e.1707394627.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 15:52:25 +0100
|
||||
Subject: [PATCH] qemu: migration: Properly handle reservation of manually
|
||||
specified NBD port
|
||||
|
||||
Originally the migration code didn't register the NBD disk port with the
|
||||
port allocator when it was manually specified. Later when commit
|
||||
e74d627bb3bc2684cbe3 refactored the code and started registering it, the
|
||||
old logic which was clearing 'priv->nbdPort' in case when it was manually
|
||||
specified was not removed.
|
||||
|
||||
This caused following problems:
|
||||
- the port was not released after successful migration
|
||||
- the port was released even when it was not allocated on failures
|
||||
regarding the NBD server start
|
||||
- the port was not released on other failures of the migration after
|
||||
NBD server startup
|
||||
|
||||
To address this we remove the assumption that 'priv->nbdPort' is used
|
||||
only for auto-allocated port and fill it only once the port is
|
||||
allocated and make the caller of qemuMigrationDstStartNBDServer
|
||||
responsible for releasing it.
|
||||
|
||||
Fixes: e74d627bb3bc2684cbe3edc1e2f7cc745b4e1ff3
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-21543
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit 43f027b57c4d885fc076ffb8829d525a3c343c6f)
|
||||
---
|
||||
src/qemu/qemu_migration.c | 22 +++++++---------------
|
||||
1 file changed, 7 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||
index 25dc16a9e9..6f8b830969 100644
|
||||
--- a/src/qemu/qemu_migration.c
|
||||
+++ b/src/qemu/qemu_migration.c
|
||||
@@ -527,6 +527,8 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
|
||||
* arguments in 'migrate' monitor command.
|
||||
* Error is reported here.
|
||||
*
|
||||
+ * Caller is responsible for releasing 'priv->nbdPort' from the port allocator.
|
||||
+ *
|
||||
* Returns 0 on success, -1 otherwise.
|
||||
*/
|
||||
static int
|
||||
@@ -627,6 +629,9 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
|
||||
server.port = port;
|
||||
}
|
||||
+
|
||||
+ /* caller will release the port */
|
||||
+ priv->nbdPort = server.port;
|
||||
}
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_IN) < 0)
|
||||
@@ -643,14 +648,9 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
}
|
||||
|
||||
- if (server.transport == VIR_STORAGE_NET_HOST_TRANS_TCP)
|
||||
- priv->nbdPort = server.port;
|
||||
-
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
- if (ret < 0)
|
||||
- virPortAllocatorRelease(server.port);
|
||||
return ret;
|
||||
|
||||
exit_monitor:
|
||||
@@ -3261,11 +3261,7 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver,
|
||||
virDomainAuditStart(vm, "migrated", false);
|
||||
qemuProcessStop(driver, vm, VIR_DOMAIN_SHUTOFF_FAILED,
|
||||
VIR_ASYNC_JOB_MIGRATION_IN, stopFlags);
|
||||
- /* release if port is auto selected which is not the case if
|
||||
- * it is given in parameters
|
||||
- */
|
||||
- if (nbdPort == 0)
|
||||
- virPortAllocatorRelease(priv->nbdPort);
|
||||
+ virPortAllocatorRelease(priv->nbdPort);
|
||||
priv->nbdPort = 0;
|
||||
}
|
||||
goto cleanup;
|
||||
@@ -3425,11 +3421,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver,
|
||||
|
||||
if (autoPort)
|
||||
priv->migrationPort = port;
|
||||
- /* in this case port is not auto selected and we don't need to manage it
|
||||
- * anymore after cookie is baked
|
||||
- */
|
||||
- if (nbdPort != 0)
|
||||
- priv->nbdPort = 0;
|
||||
+
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
--
|
||||
2.43.0
|
@ -0,0 +1,44 @@
|
||||
From a4d8210ae9fd84740e01b96d28bfb6183f3f3270 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a4d8210ae9fd84740e01b96d28bfb6183f3f3270@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 14 Feb 2022 16:02:29 +0100
|
||||
Subject: [PATCH] qemu: monitor: Drop old monitor fields from 'struct
|
||||
_qemuMonitorMessage'
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The fields are no longer used since we've deleted support for HMP-only
|
||||
qemus. The HMP command pass-through works via a QMP command.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit c5eb99a9d9af8683789e99cc904671e343580058)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2170472
|
||||
---
|
||||
src/qemu/qemu_monitor.h | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h
|
||||
index d2037914be..a4a4edf5a6 100644
|
||||
--- a/src/qemu/qemu_monitor.h
|
||||
+++ b/src/qemu/qemu_monitor.h
|
||||
@@ -43,15 +43,10 @@ struct _qemuMonitorMessage {
|
||||
int txOffset;
|
||||
int txLength;
|
||||
|
||||
- /* Used by the text monitor reply / error */
|
||||
- char *rxBuffer;
|
||||
- int rxLength;
|
||||
/* Used by the JSON monitor to hold reply / error */
|
||||
void *rxObject;
|
||||
|
||||
- /* True if rxBuffer / rxObject are ready, or a
|
||||
- * fatal error occurred on the monitor channel
|
||||
- */
|
||||
+ /* True if rxObject is ready, or a fatal error occurred on the monitor channel */
|
||||
bool finished;
|
||||
};
|
||||
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,157 @@
|
||||
From c2ed5aeee7bf365877e0764699f032fb749630b0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c2ed5aeee7bf365877e0764699f032fb749630b0@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Mon, 14 Feb 2022 16:07:41 +0100
|
||||
Subject: [PATCH] qemu: monitor: Move declaration of struct _qemuMonitor to
|
||||
qemu_monitor_priv.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In order to mock the SCM_RIGHTS sendmsg to simulate sending
|
||||
filedescriptors to fake qemu in tests we need access to some fields of
|
||||
'struct _qemuMonitor'. Move its declaration to the private header file.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 7c35c483eaa78eb847e0865cbb210d5355f75d7a)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2170472
|
||||
---
|
||||
src/qemu/qemu_monitor.c | 50 ---------------------------------
|
||||
src/qemu/qemu_monitor_priv.h | 54 ++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 54 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
|
||||
index 23638d3fe8..bba92592c5 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -65,56 +65,6 @@ VIR_LOG_INIT("qemu.qemu_monitor");
|
||||
*/
|
||||
#define QEMU_MONITOR_MAX_RESPONSE (10 * 1024 * 1024)
|
||||
|
||||
-struct _qemuMonitor {
|
||||
- virObjectLockable parent;
|
||||
-
|
||||
- virCond notify;
|
||||
-
|
||||
- int fd;
|
||||
-
|
||||
- GMainContext *context;
|
||||
- GSocket *socket;
|
||||
- GSource *watch;
|
||||
-
|
||||
- virDomainObj *vm;
|
||||
- char *domainName;
|
||||
-
|
||||
- qemuMonitorCallbacks *cb;
|
||||
- void *callbackOpaque;
|
||||
-
|
||||
- /* If there's a command being processed this will be
|
||||
- * non-NULL */
|
||||
- qemuMonitorMessage *msg;
|
||||
-
|
||||
- /* Buffer incoming data ready for Text/QMP monitor
|
||||
- * code to process & find message boundaries */
|
||||
- size_t bufferOffset;
|
||||
- size_t bufferLength;
|
||||
- char *buffer;
|
||||
-
|
||||
- /* If anything went wrong, this will be fed back
|
||||
- * the next monitor msg */
|
||||
- virError lastError;
|
||||
-
|
||||
- /* Set to true when EOF is detected on the monitor */
|
||||
- bool goteof;
|
||||
-
|
||||
- int nextSerial;
|
||||
-
|
||||
- bool waitGreeting;
|
||||
-
|
||||
- /* If found, path to the virtio memballoon driver */
|
||||
- char *balloonpath;
|
||||
- bool ballooninit;
|
||||
-
|
||||
- /* Log file context of the qemu process to dig for usable info */
|
||||
- qemuMonitorReportDomainLogError logFunc;
|
||||
- void *logOpaque;
|
||||
- virFreeCallback logDestroy;
|
||||
-
|
||||
- /* true if qemu no longer wants 'props' sub-object of object-add */
|
||||
- bool objectAddNoWrap;
|
||||
-};
|
||||
|
||||
/**
|
||||
* QEMU_CHECK_MONITOR_FULL:
|
||||
diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h
|
||||
index 6115f830de..606aa79fbd 100644
|
||||
--- a/src/qemu/qemu_monitor_priv.h
|
||||
+++ b/src/qemu/qemu_monitor_priv.h
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "qemu_monitor.h"
|
||||
|
||||
+#include <gio/gio.h>
|
||||
+
|
||||
|
||||
struct _qemuMonitorMessage {
|
||||
int txFD;
|
||||
@@ -40,5 +42,57 @@ struct _qemuMonitorMessage {
|
||||
};
|
||||
|
||||
|
||||
+struct _qemuMonitor {
|
||||
+ virObjectLockable parent;
|
||||
+
|
||||
+ virCond notify;
|
||||
+
|
||||
+ int fd;
|
||||
+
|
||||
+ GMainContext *context;
|
||||
+ GSocket *socket;
|
||||
+ GSource *watch;
|
||||
+
|
||||
+ virDomainObj *vm;
|
||||
+ char *domainName;
|
||||
+
|
||||
+ qemuMonitorCallbacks *cb;
|
||||
+ void *callbackOpaque;
|
||||
+
|
||||
+ /* If there's a command being processed this will be
|
||||
+ * non-NULL */
|
||||
+ qemuMonitorMessage *msg;
|
||||
+
|
||||
+ /* Buffer incoming data ready for Text/QMP monitor
|
||||
+ * code to process & find message boundaries */
|
||||
+ size_t bufferOffset;
|
||||
+ size_t bufferLength;
|
||||
+ char *buffer;
|
||||
+
|
||||
+ /* If anything went wrong, this will be fed back
|
||||
+ * the next monitor msg */
|
||||
+ virError lastError;
|
||||
+
|
||||
+ /* Set to true when EOF is detected on the monitor */
|
||||
+ bool goteof;
|
||||
+
|
||||
+ int nextSerial;
|
||||
+
|
||||
+ bool waitGreeting;
|
||||
+
|
||||
+ /* If found, path to the virtio memballoon driver */
|
||||
+ char *balloonpath;
|
||||
+ bool ballooninit;
|
||||
+
|
||||
+ /* Log file context of the qemu process to dig for usable info */
|
||||
+ qemuMonitorReportDomainLogError logFunc;
|
||||
+ void *logOpaque;
|
||||
+ virFreeCallback logDestroy;
|
||||
+
|
||||
+ /* true if qemu no longer wants 'props' sub-object of object-add */
|
||||
+ bool objectAddNoWrap;
|
||||
+};
|
||||
+
|
||||
+
|
||||
void
|
||||
qemuMonitorResetCommandID(qemuMonitor *mon);
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,57 @@
|
||||
From b3ffc8876adf777c7baefb6e467d7552c0a03251 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b3ffc8876adf777c7baefb6e467d7552c0a03251@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 9 Nov 2022 10:53:49 +0100
|
||||
Subject: [PATCH] qemu: monitor: Store whether 'query-named-block-nodes'
|
||||
supports 'flat' parameter
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rather than having callers always pass this flag store it in the
|
||||
qemuMonitor object. Following patches will convert the code to use this
|
||||
internal flag.
|
||||
|
||||
In the future this will also simplify removal when all supported qemu
|
||||
versions will support the new mode.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit b0e4ad5263c73a926b8246028c76c552b07fca74)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2170472
|
||||
---
|
||||
src/qemu/qemu_monitor.c | 4 +++-
|
||||
src/qemu/qemu_monitor_priv.h | 2 ++
|
||||
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
|
||||
index bba92592c5..99667fdf2f 100644
|
||||
--- a/src/qemu/qemu_monitor.c
|
||||
+++ b/src/qemu/qemu_monitor.c
|
||||
@@ -610,8 +610,10 @@ qemuMonitorOpenInternal(virDomainObj *vm,
|
||||
mon->cb = cb;
|
||||
mon->callbackOpaque = opaque;
|
||||
|
||||
- if (priv)
|
||||
+ if (priv) {
|
||||
mon->objectAddNoWrap = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_JSON);
|
||||
+ mon->queryNamedBlockNodesFlat = virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT);
|
||||
+ }
|
||||
|
||||
if (virSetCloseExec(mon->fd) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
diff --git a/src/qemu/qemu_monitor_priv.h b/src/qemu/qemu_monitor_priv.h
|
||||
index 606aa79fbd..e32928805f 100644
|
||||
--- a/src/qemu/qemu_monitor_priv.h
|
||||
+++ b/src/qemu/qemu_monitor_priv.h
|
||||
@@ -91,6 +91,8 @@ struct _qemuMonitor {
|
||||
|
||||
/* true if qemu no longer wants 'props' sub-object of object-add */
|
||||
bool objectAddNoWrap;
|
||||
+ /* query-named-block-nodes supports the 'flat' option */
|
||||
+ bool queryNamedBlockNodesFlat;
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,53 @@
|
||||
From 31986239312c0e460800f5b9921f6593f1556015 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <31986239312c0e460800f5b9921f6593f1556015@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Wed, 9 Nov 2022 10:45:27 +0100
|
||||
Subject: [PATCH] qemu: qemuBlockGetNamedNodeData: Remove pointless error path
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
We don't need automatic freeing for 'blockNamedNodeData' and we can
|
||||
directly return it rather than checking it for NULL-ness first.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
||||
(cherry picked from commit 3fe74ebd9037d695df906ed137d22a8d8d77e169)
|
||||
|
||||
Conflicts:
|
||||
src/qemu/qemu_block.c
|
||||
|
||||
- qemuDomainObjEnter/ExitMonitor still needs 'driver'
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2170472
|
||||
---
|
||||
src/qemu/qemu_block.c | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
||||
index aa566d0097..c9229d1918 100644
|
||||
--- a/src/qemu/qemu_block.c
|
||||
+++ b/src/qemu/qemu_block.c
|
||||
@@ -3020,7 +3020,7 @@ qemuBlockGetNamedNodeData(virDomainObj *vm,
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
virQEMUDriver *driver = priv->driver;
|
||||
- g_autoptr(GHashTable) blockNamedNodeData = NULL;
|
||||
+ GHashTable *blockNamedNodeData = NULL;
|
||||
bool supports_flat = virQEMUCapsGet(priv->qemuCaps,
|
||||
QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT);
|
||||
|
||||
@@ -3031,10 +3031,7 @@ qemuBlockGetNamedNodeData(virDomainObj *vm,
|
||||
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
|
||||
- if (!blockNamedNodeData)
|
||||
- return NULL;
|
||||
-
|
||||
- return g_steal_pointer(&blockNamedNodeData);
|
||||
+ return blockNamedNodeData;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,65 @@
|
||||
From e9418cec1ba24b6cf78f85bbbef8586ed612692a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e9418cec1ba24b6cf78f85bbbef8586ed612692a@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Mon, 13 Mar 2023 13:56:47 +0100
|
||||
Subject: [PATCH] qemu: relax shared memory check for vhostuser daemons
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
For some vhostuser daemons, we validate that the guest memory is shared
|
||||
with the host.
|
||||
|
||||
With earlier versions of QEMU, it was only possible to mark memory
|
||||
as shared by defining an explicit NUMA topology. Later, QEMU exposed
|
||||
the name of the default memory backend (defaultRAMid) so we can mark
|
||||
that memory as shared.
|
||||
|
||||
Since libvirt commit:
|
||||
commit bff2ad5d6b1f25da02802273934d2a519159fec7
|
||||
qemu: Relax validation for mem->access if guest has no NUMA
|
||||
we already check for the case when user requests shared memory,
|
||||
but QEMU did not expose defaultRAMid.
|
||||
|
||||
Drop the duplicit check from vhostuser device validation, to make
|
||||
it pass on hotplug even after libvirtd restart.
|
||||
|
||||
This avoids the need to store the defaultRAMid, since we don't really
|
||||
need it for anything after the VM has been already started.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2078693
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2177701
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit d5c7b7870e45575f81fffcb611c2546d0e02e778)
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_validate.c | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
|
||||
index 7bc14293d6..4069f47c12 100644
|
||||
--- a/src/qemu/qemu_validate.c
|
||||
+++ b/src/qemu/qemu_validate.c
|
||||
@@ -1588,16 +1588,12 @@ qemuValidateDomainVirtioOptions(const virDomainVirtioOptions *virtio,
|
||||
static int
|
||||
qemuValidateDomainDefVhostUserRequireSharedMemory(const virDomainDef *def,
|
||||
const char *name,
|
||||
- virQEMUCaps *qemuCaps)
|
||||
+ virQEMUCaps *qemuCaps G_GNUC_UNUSED)
|
||||
{
|
||||
- const char *defaultRAMId = virQEMUCapsGetMachineDefaultRAMid(qemuCaps,
|
||||
- def->virtType,
|
||||
- def->os.machine);
|
||||
size_t numa_nodes = virDomainNumaGetNodeCount(def->numa);
|
||||
size_t i;
|
||||
|
||||
- if (numa_nodes == 0 &&
|
||||
- !(defaultRAMId && def->mem.access == VIR_DOMAIN_MEMORY_ACCESS_SHARED)) {
|
||||
+ if (numa_nodes == 0 && def->mem.access != VIR_DOMAIN_MEMORY_ACCESS_SHARED) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("'%s' requires shared memory"), name);
|
||||
return -1;
|
||||
--
|
||||
2.40.1
|
@ -0,0 +1,219 @@
|
||||
From e3487aab5319df05c5a06a83e4d3e4a87c1e51a9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e3487aab5319df05c5a06a83e4d3e4a87c1e51a9@dist-git>
|
||||
From: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||
Date: Wed, 2 Feb 2022 17:28:16 +0100
|
||||
Subject: [PATCH] qemu: tpm: Get swtpm pid without binary validation
|
||||
|
||||
Access to /proc/[pid]/exe may be restricted in certain environments (e.g.
|
||||
in containers) and any attempt to stat(2) or readlink(2) the file will
|
||||
result in 'permission denied' error if the calling process does not have
|
||||
CAP_SYS_PTRACE capability. According to proc(5) manpage:
|
||||
|
||||
Permission to dereference or read (readlink(2)) this symbolic link is
|
||||
governed by a ptrace access mode PTRACE_MODE_READ_FSCREDS check; see
|
||||
ptrace(2).
|
||||
|
||||
The binary validation in virPidFileReadPathIfAlive may fail with EACCES.
|
||||
Therefore instead do only the check that the pidfile is locked by the
|
||||
correct process. To ensure this is always the case the daemonization and
|
||||
pidfile handling of the swtpm command is now controlled by libvirt.
|
||||
|
||||
Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit a9c500d2b50c5c041a1bb6ae9724402cf1cec8fe)
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152188
|
||||
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_tpm.c | 94 ++++++++++++++++++++++++++-------------------
|
||||
1 file changed, 54 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
|
||||
index 7e7b01768e..9c5d1ffed4 100644
|
||||
--- a/src/qemu/qemu_tpm.c
|
||||
+++ b/src/qemu/qemu_tpm.c
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "qemu_tpm.h"
|
||||
#include "virtpm.h"
|
||||
#include "virsecret.h"
|
||||
+#include "virtime.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -258,13 +259,13 @@ qemuTPMEmulatorGetPid(const char *swtpmStateDir,
|
||||
const char *shortName,
|
||||
pid_t *pid)
|
||||
{
|
||||
- g_autofree char *swtpm = virTPMGetSwtpm();
|
||||
g_autofree char *pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir,
|
||||
shortName);
|
||||
+
|
||||
if (!pidfile)
|
||||
return -1;
|
||||
|
||||
- if (virPidFileReadPathIfAlive(pidfile, pid, swtpm) < 0)
|
||||
+ if (virPidFileReadPathIfLocked(pidfile, pid) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
@@ -660,9 +661,6 @@ qemuTPMEmulatorReconfigure(const char *storagepath,
|
||||
* @privileged: whether we are running in privileged mode
|
||||
* @swtpm_user: The uid for the swtpm to run as (drop privileges to from root)
|
||||
* @swtpm_group: The gid for the swtpm to run as
|
||||
- * @swtpmStateDir: the directory where swtpm writes the pid file and creates the
|
||||
- * Unix socket
|
||||
- * @shortName: the short name of the VM
|
||||
* @incomingMigration: whether we have an incoming migration
|
||||
*
|
||||
* Create the virCommand use for starting the emulator
|
||||
@@ -676,13 +674,10 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
|
||||
bool privileged,
|
||||
uid_t swtpm_user,
|
||||
gid_t swtpm_group,
|
||||
- const char *swtpmStateDir,
|
||||
- const char *shortName,
|
||||
bool incomingMigration)
|
||||
{
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
bool created = false;
|
||||
- g_autofree char *pidfile = NULL;
|
||||
g_autofree char *swtpm = virTPMGetSwtpm();
|
||||
int pwdfile_fd = -1;
|
||||
int migpwdfile_fd = -1;
|
||||
@@ -721,7 +716,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
|
||||
|
||||
virCommandClearCaps(cmd);
|
||||
|
||||
- virCommandAddArgList(cmd, "socket", "--daemon", "--ctrl", NULL);
|
||||
+ virCommandAddArgList(cmd, "socket", "--ctrl", NULL);
|
||||
virCommandAddArgFormat(cmd, "type=unixio,path=%s,mode=0600",
|
||||
tpm->data.emulator.source->data.nix.path);
|
||||
|
||||
@@ -748,12 +743,6 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!(pidfile = qemuTPMEmulatorCreatePidFilename(swtpmStateDir, shortName)))
|
||||
- goto error;
|
||||
-
|
||||
- virCommandAddArg(cmd, "--pid");
|
||||
- virCommandAddArgFormat(cmd, "file=%s", pidfile);
|
||||
-
|
||||
if (tpm->data.emulator.hassecretuuid) {
|
||||
if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_CMDARG_PWD_FD)) {
|
||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
|
||||
@@ -904,12 +893,14 @@ qemuExtTPMStartEmulator(virQEMUDriver *driver,
|
||||
bool incomingMigration)
|
||||
{
|
||||
g_autoptr(virCommand) cmd = NULL;
|
||||
- int exitstatus = 0;
|
||||
- g_autofree char *errbuf = NULL;
|
||||
+ VIR_AUTOCLOSE errfd = -1;
|
||||
g_autoptr(virQEMUDriverConfig) cfg = NULL;
|
||||
g_autofree char *shortName = virDomainDefGetShortName(vm->def);
|
||||
- int cmdret = 0, timeout, rc;
|
||||
- pid_t pid;
|
||||
+ g_autofree char *pidfile = NULL;
|
||||
+ virTimeBackOffVar timebackoff;
|
||||
+ const unsigned long long timeout = 1000; /* ms */
|
||||
+ int cmdret = 0;
|
||||
+ pid_t pid = -1;
|
||||
|
||||
if (!shortName)
|
||||
return -1;
|
||||
@@ -923,48 +914,71 @@ qemuExtTPMStartEmulator(virQEMUDriver *driver,
|
||||
driver->privileged,
|
||||
cfg->swtpm_user,
|
||||
cfg->swtpm_group,
|
||||
- cfg->swtpmStateDir, shortName,
|
||||
incomingMigration)))
|
||||
return -1;
|
||||
|
||||
if (qemuExtDeviceLogCommand(driver, vm, cmd, "TPM Emulator") < 0)
|
||||
return -1;
|
||||
|
||||
- virCommandSetErrorBuffer(cmd, &errbuf);
|
||||
+ if (!(pidfile = qemuTPMEmulatorCreatePidFilename(cfg->swtpmStateDir, shortName)))
|
||||
+ return -1;
|
||||
+
|
||||
+ virCommandDaemonize(cmd);
|
||||
+ virCommandSetPidFile(cmd, pidfile);
|
||||
+ virCommandSetErrorFD(cmd, &errfd);
|
||||
|
||||
if (qemuSecurityStartTPMEmulator(driver, vm, cmd,
|
||||
cfg->swtpm_user, cfg->swtpm_group,
|
||||
- &exitstatus, &cmdret) < 0)
|
||||
+ NULL, &cmdret) < 0)
|
||||
return -1;
|
||||
|
||||
- if (cmdret < 0 || exitstatus != 0) {
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- _("Could not start 'swtpm'. exitstatus: %d, "
|
||||
- "error: %s"), exitstatus, errbuf);
|
||||
- return -1;
|
||||
+ if (cmdret < 0) {
|
||||
+ /* virCommandRun() hidden in qemuSecurityStartTPMEmulator()
|
||||
+ * already reported error. */
|
||||
+ goto error;
|
||||
}
|
||||
|
||||
- /* check that the swtpm has written its pid into the file */
|
||||
- timeout = 1000; /* ms */
|
||||
- while (timeout > 0) {
|
||||
- rc = qemuTPMEmulatorGetPid(cfg->swtpmStateDir, shortName, &pid);
|
||||
- if (rc < 0) {
|
||||
- timeout -= 50;
|
||||
- g_usleep(50 * 1000);
|
||||
+ if (virPidFileReadPath(pidfile, &pid) < 0) {
|
||||
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
+ _("swtpm didn't show up"));
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (virTimeBackOffStart(&timebackoff, 1, timeout) < 0)
|
||||
+ goto error;
|
||||
+ while (virTimeBackOffWait(&timebackoff)) {
|
||||
+ char errbuf[1024] = { 0 };
|
||||
+
|
||||
+ if (virFileExists(tpm->data.emulator.source->data.nix.path))
|
||||
+ break;
|
||||
+
|
||||
+ if (virProcessKill(pid, 0) == 0)
|
||||
continue;
|
||||
+
|
||||
+ if (saferead(errfd, errbuf, sizeof(errbuf) - 1) < 0) {
|
||||
+ virReportSystemError(errno, "%s",
|
||||
+ _("swtpm died unexpectedly"));
|
||||
+ } else {
|
||||
+ virReportError(VIR_ERR_OPERATION_FAILED,
|
||||
+ _("swtpm died and reported: %s"), errbuf);
|
||||
}
|
||||
- if (rc == 0 && pid == (pid_t)-1)
|
||||
- goto error;
|
||||
- break;
|
||||
+ goto error;
|
||||
}
|
||||
- if (timeout <= 0)
|
||||
+
|
||||
+ if (!virFileExists(tpm->data.emulator.source->data.nix.path)) {
|
||||
+ virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s",
|
||||
+ _("swtpm socket did not show up"));
|
||||
goto error;
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
- _("swtpm failed to start"));
|
||||
+ virCommandAbort(cmd);
|
||||
+ if (pid >= 0)
|
||||
+ virProcessKillPainfully(pid, true);
|
||||
+ if (pidfile)
|
||||
+ unlink(pidfile);
|
||||
return -1;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.0
|
||||
|
37
SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch
Normal file
37
SOURCES/libvirt-qemu-virtiofs-format-thread-pool-size.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 44f83782ba882f9eb037a54fb75231c305d98712 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <44f83782ba882f9eb037a54fb75231c305d98712@dist-git>
|
||||
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
||||
Date: Fri, 10 Jun 2022 15:25:00 +0200
|
||||
Subject: [PATCH] qemu: virtiofs: format --thread-pool-size
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2079582
|
||||
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 2753eba20ce76d3d8785b23a6e940574ca12fe3c)
|
||||
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
||||
---
|
||||
src/qemu/qemu_virtiofs.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c
|
||||
index 1b853a5a59..1ee3781286 100644
|
||||
--- a/src/qemu/qemu_virtiofs.c
|
||||
+++ b/src/qemu/qemu_virtiofs.c
|
||||
@@ -163,6 +163,10 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg,
|
||||
virBufferAddLit(&opts, ",no_posix_lock");
|
||||
|
||||
virCommandAddArgBuffer(cmd, &opts);
|
||||
+
|
||||
+ if (fs->thread_pool_size >= 0)
|
||||
+ virCommandAddArgFormat(cmd, "--thread-pool-size=%i", fs->thread_pool_size);
|
||||
+
|
||||
if (cfg->virtiofsdDebug)
|
||||
virCommandAddArg(cmd, "-d");
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,57 @@
|
||||
From 1ad707f19e570b76c1f6517194d9cc86b084014d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <1ad707f19e570b76c1f6517194d9cc86b084014d@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Thu, 1 Dec 2022 17:02:42 +0100
|
||||
Subject: [PATCH] qemuAgentGetDisks: Don't use virJSONValueObjectGetStringArray
|
||||
for optional data
|
||||
|
||||
The 'dependencies' field in the return data may be missing in some
|
||||
cases. Historically 'virJSONValueObjectGetStringArray' didn't report
|
||||
error in such case, but later refactor (commit 043b50b948ef3c2 ) added
|
||||
an error in order to use it in other places too.
|
||||
|
||||
Unfortunately this results in the error log being spammed with an
|
||||
irrelevant error in case when qemuAgentGetDisks is invoked on a VM
|
||||
running windows.
|
||||
|
||||
Replace the use of virJSONValueObjectGetStringArray by fetching the
|
||||
array first and calling virJSONValueArrayToStringList only when we have
|
||||
an array.
|
||||
|
||||
Fixes: 043b50b948ef3c2a4adf5fa32a93ec2589851ac6
|
||||
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2149752
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 3b576601dfb924bb518870a01de5d1a421cbb467)
|
||||
---
|
||||
src/qemu/qemu_agent.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
|
||||
index f33cd47078..8a55044c9e 100644
|
||||
--- a/src/qemu/qemu_agent.c
|
||||
+++ b/src/qemu/qemu_agent.c
|
||||
@@ -2550,6 +2550,7 @@ int qemuAgentGetDisks(qemuAgent *agent,
|
||||
for (i = 0; i < ndata; i++) {
|
||||
virJSONValue *addr;
|
||||
virJSONValue *entry = virJSONValueArrayGet(data, i);
|
||||
+ virJSONValue *dependencies;
|
||||
qemuAgentDiskInfo *disk;
|
||||
|
||||
if (!entry) {
|
||||
@@ -2575,7 +2576,11 @@ int qemuAgentGetDisks(qemuAgent *agent,
|
||||
goto error;
|
||||
}
|
||||
|
||||
- disk->dependencies = virJSONValueObjectGetStringArray(entry, "dependencies");
|
||||
+ if ((dependencies = virJSONValueObjectGetArray(entry, "dependencies"))) {
|
||||
+ if (!(disk->dependencies = virJSONValueArrayToStringList(dependencies)))
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
disk->alias = g_strdup(virJSONValueObjectGetString(entry, "alias"));
|
||||
addr = virJSONValueObjectGetObject(entry, "address");
|
||||
if (addr) {
|
||||
--
|
||||
2.39.0
|
||||
|
@ -0,0 +1,41 @@
|
||||
From ab4488be3282dd5d0b9582e6a5d1dafbe7b90489 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ab4488be3282dd5d0b9582e6a5d1dafbe7b90489@dist-git>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 25 Jan 2022 17:49:00 +0100
|
||||
Subject: [PATCH] qemuDomainSetupDisk: Initialize 'targetPaths'
|
||||
|
||||
Compiler isn't able to see that 'virDevMapperGetTargets' in cases e.g.
|
||||
when the devmapper isn't available may not initialize the value in the
|
||||
pointer passed as the second argument.
|
||||
|
||||
The usage 'qemuDomainSetupDisk' lead to an accidental infinite loop as
|
||||
previous calls apparently doctored the stack to a point where
|
||||
'g_slist_concat' would end up in an infinite loop trying to find the end
|
||||
of the list.
|
||||
|
||||
Fixes: 6c49c2ee9fcb88de02cdc333f666a8e95d60a3b0
|
||||
Closes: https://gitlab.com/libvirt/libvirt/-/issues/268
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit ddb2384f0c78a91c40d95afdbc7fe325e95ef2bc)
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=2046172
|
||||
---
|
||||
src/qemu/qemu_namespace.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
|
||||
index 23b1160c5e..94453033f5 100644
|
||||
--- a/src/qemu/qemu_namespace.c
|
||||
+++ b/src/qemu/qemu_namespace.c
|
||||
@@ -251,7 +251,7 @@ qemuDomainSetupDisk(virStorageSource *src,
|
||||
if (!(tmpPath = virPCIDeviceAddressGetIOMMUGroupDev(&next->nvme->pciAddr)))
|
||||
return -1;
|
||||
} else {
|
||||
- GSList *targetPaths;
|
||||
+ GSList *targetPaths = NULL;
|
||||
|
||||
if (virStorageSourceIsEmpty(next) ||
|
||||
!virStorageSourceIsLocalStorage(next)) {
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,40 +0,0 @@
|
||||
From 2087ac009a019ceb206475363113bbe6c2821e2f Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <2087ac009a019ceb206475363113bbe6c2821e2f.1708614745.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Fri, 16 Feb 2024 16:40:20 +0100
|
||||
Subject: [PATCH] qemuMigrationDstPrepareStorage: Properly consider path for
|
||||
'vdpa' devices
|
||||
|
||||
Allow storage migration of VDPA devices by properly checking that they
|
||||
exist on the destionation. Pre-creation is not supported but if the
|
||||
device exists the migration should be able to succeed.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit 00c0a94ab5f135ea7d9f0a905ff53d13c82761db)
|
||||
https://issues.redhat.com/browse/RHEL-24825
|
||||
---
|
||||
src/qemu/qemu_migration.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||
index 3e0aae4e7c..5e27cd5dbe 100644
|
||||
--- a/src/qemu/qemu_migration.c
|
||||
+++ b/src/qemu/qemu_migration.c
|
||||
@@ -479,10 +479,13 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
|
||||
diskSrcPath = nvmePath;
|
||||
break;
|
||||
|
||||
+ case VIR_STORAGE_TYPE_VHOST_VDPA:
|
||||
+ diskSrcPath = disk->src->vdpadev;
|
||||
+ break;
|
||||
+
|
||||
case VIR_STORAGE_TYPE_NETWORK:
|
||||
case VIR_STORAGE_TYPE_VOLUME:
|
||||
case VIR_STORAGE_TYPE_VHOST_USER:
|
||||
- case VIR_STORAGE_TYPE_VHOST_VDPA:
|
||||
case VIR_STORAGE_TYPE_LAST:
|
||||
case VIR_STORAGE_TYPE_NONE:
|
||||
break;
|
||||
--
|
||||
2.43.2
|
@ -1,60 +0,0 @@
|
||||
From b73313c9679766c493afb91f0c691e437632e4fa Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <b73313c9679766c493afb91f0c691e437632e4fa.1708614745.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Thu, 8 Feb 2024 16:48:25 +0100
|
||||
Subject: [PATCH] qemuMigrationDstPrepareStorage: Use 'switch' statement to
|
||||
include all storage types
|
||||
|
||||
Decrease the likelyhood that addition of a new storage type will be
|
||||
forgotten.
|
||||
|
||||
This patch also unifies the type check to consult the 'actual' type of
|
||||
the storage in both cases as the NVMe check looked for the XML declared
|
||||
type while virStorageSourceIsLocalStorage() looks for the
|
||||
actual/translated type.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
||||
(cherry picked from commit e158b523b8522931200c415ef86562641a2a7c8c)
|
||||
https://issues.redhat.com/browse/RHEL-24825
|
||||
---
|
||||
src/qemu/qemu_migration.c | 22 +++++++++++++++++++---
|
||||
1 file changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||
index 01ab803842..3e0aae4e7c 100644
|
||||
--- a/src/qemu/qemu_migration.c
|
||||
+++ b/src/qemu/qemu_migration.c
|
||||
@@ -465,11 +465,27 @@ qemuMigrationDstPrepareStorage(virDomainObj *vm,
|
||||
if (!qemuMigrationAnyCopyDisk(disk, nmigrate_disks, migrate_disks))
|
||||
continue;
|
||||
|
||||
- if (disk->src->type == VIR_STORAGE_TYPE_NVME) {
|
||||
+ switch (virStorageSourceGetActualType(disk->src)) {
|
||||
+ case VIR_STORAGE_TYPE_FILE:
|
||||
+ case VIR_STORAGE_TYPE_BLOCK:
|
||||
+ case VIR_STORAGE_TYPE_DIR:
|
||||
+ diskSrcPath = virDomainDiskGetSource(disk);
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_STORAGE_TYPE_NVME:
|
||||
+ /* While NVMe disks are local, they are not accessible via src->path.
|
||||
+ * Therefore, we have to return false here. */
|
||||
virPCIDeviceAddressGetSysfsFile(&disk->src->nvme->pciAddr, &nvmePath);
|
||||
diskSrcPath = nvmePath;
|
||||
- } else if (virStorageSourceIsLocalStorage(disk->src)) {
|
||||
- diskSrcPath = virDomainDiskGetSource(disk);
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_STORAGE_TYPE_NETWORK:
|
||||
+ case VIR_STORAGE_TYPE_VOLUME:
|
||||
+ case VIR_STORAGE_TYPE_VHOST_USER:
|
||||
+ case VIR_STORAGE_TYPE_VHOST_VDPA:
|
||||
+ case VIR_STORAGE_TYPE_LAST:
|
||||
+ case VIR_STORAGE_TYPE_NONE:
|
||||
+ break;
|
||||
}
|
||||
|
||||
if (diskSrcPath) {
|
||||
--
|
||||
2.43.2
|
@ -1,84 +0,0 @@
|
||||
From d968a490b2fb8b4c7af2c835288e6f693ea1cc67 Mon Sep 17 00:00:00 2001
|
||||
Message-ID: <d968a490b2fb8b4c7af2c835288e6f693ea1cc67.1707394627.git.jdenemar@redhat.com>
|
||||
From: Peter Krempa <pkrempa@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 16:22:03 +0100
|
||||
Subject: [PATCH] qemuMigrationDstStartNBDServer: Refactor cleanup
|
||||
|
||||
There's nothing under the 'cleanup:' label thus the whole code can be
|
||||
simplified.
|
||||
|
||||
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
||||
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||||
(cherry picked from commit 36e11cca83c6617a81528969c27579a1ab891443)
|
||||
https://issues.redhat.com/browse/RHEL-21543
|
||||
---
|
||||
src/qemu/qemu_migration.c | 18 +++++++-----------
|
||||
1 file changed, 7 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
||||
index 6f8b830969..01ab803842 100644
|
||||
--- a/src/qemu/qemu_migration.c
|
||||
+++ b/src/qemu/qemu_migration.c
|
||||
@@ -541,7 +541,6 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
const char *nbdURI,
|
||||
const char *tls_alias)
|
||||
{
|
||||
- int ret = -1;
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
size_t i;
|
||||
virStorageNetHostDef server = {
|
||||
@@ -610,22 +609,22 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("Cannot migrate empty or read-only disk %1$s"),
|
||||
disk->dst);
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
if (!(diskAlias = qemuAliasDiskDriveFromDisk(disk)))
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
|
||||
if (!server_started &&
|
||||
server.transport == VIR_STORAGE_NET_HOST_TRANS_TCP) {
|
||||
if (server.port) {
|
||||
if (virPortAllocatorSetUsed(server.port) < 0)
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
} else {
|
||||
unsigned short port = 0;
|
||||
|
||||
if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0)
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
|
||||
server.port = port;
|
||||
}
|
||||
@@ -635,7 +634,7 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
if (qemuDomainObjEnterMonitorAsync(vm, VIR_ASYNC_JOB_MIGRATION_IN) < 0)
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
|
||||
if (!server_started) {
|
||||
if (qemuMonitorNBDServerStart(priv->mon, &server, tls_alias) < 0)
|
||||
@@ -648,14 +647,11 @@ qemuMigrationDstStartNBDServer(virQEMUDriver *driver,
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
}
|
||||
|
||||
- ret = 0;
|
||||
-
|
||||
- cleanup:
|
||||
- return ret;
|
||||
+ return 0;
|
||||
|
||||
exit_monitor:
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
- goto cleanup;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.43.0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user