@@ -244,6 +244,7 @@ def repr_method(self):
244
244
# Qemu supports 4 serial consoles, we remove 1 because of the PTY one defined
245
245
ALLOWED_QEMU_SERIAL_PORTS = QEMU_MAX_SERIAL_PORTS - 1
246
246
247
+ VGPU_RESOURCE_SEMAPHORE = 'vgpu_resources'
247
248
248
249
LIBVIRT_PERF_EVENT_PREFIX = 'VIR_PERF_PARAM_'
249
250
@@ -262,13 +263,6 @@ def repr_method(self):
262
263
# before the SIGKILL signal takes effect.
263
264
MIN_LIBVIRT_BETTER_SIGKILL_HANDLING = (4, 7, 0)
264
265
265
- VGPU_RESOURCE_SEMAPHORE = "vgpu_resources"
266
-
267
- # see https://libvirt.org/formatdomain.html#elementsVideo
268
- MIN_LIBVIRT_VIDEO_MODEL_VERSIONS = {
269
- fields.VideoModel.NONE: (4, 6, 0),
270
- }
271
-
272
266
# Persistent Memory (PMEM/NVDIMM) Device Support
273
267
MIN_LIBVIRT_PMEM_SUPPORT = (5, 0, 0)
274
268
MIN_QEMU_PMEM_SUPPORT = (3, 1, 0)
@@ -283,6 +277,13 @@ def repr_method(self):
283
277
MIN_LIBVIRT_VTPM = (5, 6, 0)
284
278
MIN_QEMU_VTPM = (2, 11, 0)
285
279
280
+ MIN_LIBVIRT_S390X_CPU_COMPARE = (5, 9, 0)
281
+
282
+ # see https://libvirt.org/formatdomain.html#elementsVideo
283
+ MIN_LIBVIRT_VIDEO_MODEL_VERSIONS = {
284
+ fields.VideoModel.NONE: (4, 6, 0),
285
+ }
286
+
286
287
287
288
class LibvirtDriver(driver.ComputeDriver):
288
289
def __init__(self, virtapi, read_only=False):
@@ -8842,12 +8843,13 @@ def _compare_cpu(self, guest_cpu, host_cpu_str, instance):
8842
8843
# s390x doesn't support cpu model in host info, so compare
8843
8844
# cpu info will raise an error anyway, thus have to avoid check
8844
8845
# see bug 1854126 for more info
8845
- min_libvirt_version = (5, 9, 0)
8846
- if (cpu.arch in (arch.S390X, arch.S390) and
8847
- not self._host.has_min_version(min_libvirt_version)):
8846
+ if (
8847
+ cpu.arch in (arch.S390X, arch.S390) and
8848
+ not self._host.has_min_version(MIN_LIBVIRT_S390X_CPU_COMPARE)
8849
+ ):
8848
8850
LOG.debug("on s390x platform, the min libvirt version "
8849
8851
"support cpu model compare is %s",
8850
- min_libvirt_version )
8852
+ MIN_LIBVIRT_S390X_CPU_COMPARE )
8851
8853
return
8852
8854
8853
8855
u = ("http://libvirt.org/html/libvirt-libvirt-host.html#"
0 commit comments