[PATCH 0/6] migration removals & deprecations
by Fabiano Rosas
Hi everyone,
Here's some cleaning up of deprecated code. It removes the old block
migration and compression code. Both have suitable replacements in the
form of the blockdev-mirror driver and multifd compression,
respectively.
There's also a deprecation for fd: + file to cope with the fact that
the new MigrationAddress API defines transports instead of protocols
(loose terms) like the old string API did. So we cannot map 1:1 from
fd: to any transport because fd: allows *both* file migration and
socket migration.
CI run: https://gitlab.com/farosas/qemu/-/pipelines/1267859704
Fabiano Rosas (6):
migration: Remove 'skipped' field from MigrationStats
migration: Remove 'inc' option from migrate command
migration: Remove 'blk/-b' option from migrate commands
migration: Remove block migration
migration: Remove non-multifd compression
migration: Deprecate fd: for file migration
.gitlab-ci.d/buildtest.yml | 2 +-
MAINTAINERS | 1 -
docs/about/deprecated.rst | 51 +-
docs/about/removed-features.rst | 104 ++-
docs/devel/migration/main.rst | 2 +-
hw/core/machine.c | 1 -
include/migration/misc.h | 6 -
meson.build | 2 -
meson_options.txt | 2 -
migration/block.c | 1019 ------------------------------
migration/block.h | 52 --
migration/colo.c | 1 -
migration/meson.build | 4 -
migration/migration-hmp-cmds.c | 97 +--
migration/migration.c | 70 +-
migration/migration.h | 7 -
migration/options.c | 229 -------
migration/ram-compress.c | 564 -----------------
migration/ram.c | 166 +----
migration/savevm.c | 5 -
qapi/migration.json | 205 +-----
scripts/meson-buildoptions.sh | 4 -
tests/qemu-iotests/183 | 147 -----
tests/qemu-iotests/183.out | 66 --
tests/qemu-iotests/common.filter | 7 -
tests/qtest/migration-test.c | 139 ----
26 files changed, 130 insertions(+), 2823 deletions(-)
delete mode 100644 migration/block.c
delete mode 100644 migration/block.h
delete mode 100644 migration/ram-compress.c
delete mode 100755 tests/qemu-iotests/183
delete mode 100644 tests/qemu-iotests/183.out
--
2.35.3
6 months, 1 week
[PATCH] vmx: Check serialX.vspc before serialX.fileName
by Martin Kletzander
When using vSPC (Virtual Serial Port Concentrator) in vSphere the actual
address for it is saved in serialX.vspc in which case the
serialX.fileName is most probably something we can't get any useful
information from and we also fail during the parsing rendering any
dumpxml and similar tries unsuccessful.
Instead of parsing the vspc URL with something along the lines of
`virURIParse(vspc ? vspc : fileName)`, which could lead to us reporting
information that is very prune to misuse (the vSPC seemingly has a
protocol on top of the telnet connection; redefining the domain would
change the behaviour; the URL might have a fragment we are not saving;
etc.) or adding more XML knobs to indicate vSPC usage (which we would
not be able to configure; we'd have to properly error out everywhere;
etc.) let's just report dummy serial port that leads to nowhere.
Resolves: https://issues.redhat.com/browse/RHEL-32182
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/vmx/vmx.c | 12 +++
tests/vmx2xmldata/esx-in-the-wild-13.vmx | 97 ++++++++++++++++++++++++
tests/vmx2xmldata/esx-in-the-wild-13.xml | 55 ++++++++++++++
tests/vmx2xmltest.c | 1 +
4 files changed, 165 insertions(+)
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-13.vmx
create mode 100644 tests/vmx2xmldata/esx-in-the-wild-13.xml
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 5da67aae60d9..32074f62e14c 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2975,6 +2975,9 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
char fileName_name[48] = "";
g_autofree char *fileName = NULL;
+ char vspc_name[48] = "";
+ g_autofree char *vspc = NULL;
+
char network_endPoint_name[48] = "";
g_autofree char *network_endPoint = NULL;
@@ -2997,6 +3000,7 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
VMX_BUILD_NAME(startConnected);
VMX_BUILD_NAME(fileType);
VMX_BUILD_NAME(fileName);
+ VMX_BUILD_NAME(vspc);
VMX_BUILD_NAME_EXTRA(network_endPoint, "network.endPoint");
/* vmx:present */
@@ -3026,6 +3030,10 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
if (virVMXGetConfigString(conf, fileName_name, &fileName, true) < 0)
goto cleanup;
+ /* vmx:fileName -> def:data.file.path */
+ if (virVMXGetConfigString(conf, vspc_name, &vspc, true) < 0)
+ goto cleanup;
+
/* vmx:network.endPoint -> def:data.tcp.listen */
if (virVMXGetConfigString(conf, network_endPoint_name, &network_endPoint,
true) < 0) {
@@ -3057,6 +3065,10 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf, int port,
(*def)->target.port = port;
(*def)->source->type = VIR_DOMAIN_CHR_TYPE_PIPE;
(*def)->source->data.file.path = g_steal_pointer(&fileName);
+ } else if (STRCASEEQ(fileType, "network") && vspc) {
+ (*def)->target.port = port;
+ (*def)->source->type = VIR_DOMAIN_CHR_TYPE_FILE;
+ (*def)->source->data.file.path = g_strdup("/dev/null");
} else if (STRCASEEQ(fileType, "network")) {
(*def)->target.port = port;
(*def)->source->type = VIR_DOMAIN_CHR_TYPE_TCP;
diff --git a/tests/vmx2xmldata/esx-in-the-wild-13.vmx b/tests/vmx2xmldata/esx-in-the-wild-13.vmx
new file mode 100644
index 000000000000..1016acab28d8
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-13.vmx
@@ -0,0 +1,97 @@
+.encoding = "UTF-8"
+config.version = "8"
+virtualHW.version = "19"
+vmci0.present = "TRUE"
+floppy0.present = "FALSE"
+memSize = "1024"
+tools.upgrade.policy = "manual"
+sched.cpu.units = "mhz"
+vm.createDate = "1704946351823519"
+scsi0.virtualDev = "lsilogic"
+scsi0.present = "TRUE"
+scsi0:0.deviceType = "scsi-hardDisk"
+scsi0:0.fileName = "Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)_2.vmdk"
+sched.scsi0:0.shares = "normal"
+sched.scsi0:0.throughputCap = "off"
+scsi0:0.present = "TRUE"
+ethernet0.virtualDev = "vmxnet3"
+ethernet0.opaqueNetwork.id = "25c9a00e-dc60-4918-89b7-41c951988366"
+ethernet0.opaqueNetwork.type = "nsx.LogicalSwitch"
+ethernet0.shares = "normal"
+ethernet0.addressType = "static"
+ethernet0.address = "fa:16:3e:bb:2c:4a"
+ethernet0.externalId = "4b57523e-35af-4f8d-b050-1a7410e1a307"
+ethernet0.uptCompatibility = "TRUE"
+ethernet0.present = "TRUE"
+ethernet0.networkName = "Test"
+serial0.fileType = "network"
+serial0.fileName = "ZmVybmV0IGdBQUFBQUJrdFotaW8yclpkRXR6N3dBcDdyYkFMaWFUMVd4RENJSHgtUXpkTlMyTzRRejI3V192QVlOVUY3ZU1SOTNHZXJrN1dGb2stS0EybmpwWFQ4NjJNNlgwc2ZDdmNlOE50eFNhcU1XdlNBTmdhazQ1T1J3LUI5OEZsSDdwMDBZa2R6bWt4Y1Ax"
+serial0.vspc = "telnets://10.28.100.26:18979#thumbprint=18:F5:79:E5:73:A5:22:83:C0:57:B9:B4:FA:CE:60:19:F1:12:F5:7B"
+serial0.yieldOnMsrRead = "TRUE"
+serial0.present = "TRUE"
+displayName = "Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)"
+annotation = "name:Test-Mig-VM-1|0Auserid:962314ba515c48388a0e95c0961709ff|0Ausername:admin|0Aprojectid:b06b5f77b6bb442f85b1c67cff980ef9|0Aprojectname:MIS|0Aflavor:name:mig-test-flavor|0Aflavor:memory_mb:1024|0Aflavor:vcpus:1|0Aflavor:ephemeral_gb:0|0Aflavor:root_gb:10|0Aflavor:swap:0|0Aimageid:8b90d6fa-20ab-4adf-8015-aad3dddb246c|0Apackage:20.6.2|0A"
+guestOS = "other-64"
+toolScripts.afterPowerOn = "TRUE"
+toolScripts.afterResume = "TRUE"
+toolScripts.beforeSuspend = "TRUE"
+toolScripts.beforePowerOff = "TRUE"
+tools.syncTime = "FALSE"
+uuid.bios = "42 1e b4 58 54 48 fc 12-20 74 83 d5 e4 19 e1 38"
+vc.uuid = "01 ce 57 d0 4e 20 41 a5-8b 6c bc bf 49 a0 32 ec"
+sched.cpu.latencySensitivity = "normal"
+tools.guest.desktop.autolock = "FALSE"
+nvram = "Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec).nvram"
+svga.present = "TRUE"
+pciBridge0.present = "TRUE"
+pciBridge4.present = "TRUE"
+pciBridge4.virtualDev = "pcieRootPort"
+pciBridge4.functions = "8"
+pciBridge5.present = "TRUE"
+pciBridge5.virtualDev = "pcieRootPort"
+pciBridge5.functions = "8"
+pciBridge6.present = "TRUE"
+pciBridge6.virtualDev = "pcieRootPort"
+pciBridge6.functions = "8"
+pciBridge7.present = "TRUE"
+pciBridge7.virtualDev = "pcieRootPort"
+pciBridge7.functions = "8"
+hpet0.present = "TRUE"
+vio.imageId = "8b90d6fa-20ab-4adf-8015-aad3dddb246c"
+nvp.vm-uuid = "01ce57d0-4e20-41a5-8b6c-bcbf49a032ec"
+nvp.iface-id.0 = "4b57523e-35af-4f8d-b050-1a7410e1a307"
+smbios.assetTag = "OpenTelekomCloud"
+root-disk-uuid = "6000C294-db10-e2c6-963f-e4371d3605e8"
+numa.autosize.cookie = "10012"
+numa.autosize.vcpu.maxPerVirtualNode = "1"
+pciBridge0.pciSlotNumber = "17"
+pciBridge4.pciSlotNumber = "21"
+pciBridge5.pciSlotNumber = "22"
+pciBridge6.pciSlotNumber = "23"
+pciBridge7.pciSlotNumber = "24"
+scsi0.pciSlotNumber = "16"
+ethernet0.pciSlotNumber = "160"
+vmotion.checkpointFBSize = "4194304"
+vmotion.checkpointSVGAPrimarySize = "4194304"
+vmotion.svga.mobMaxSize = "4194304"
+vmotion.svga.graphicsMemoryKB = "4096"
+monitor.phys_bits_used = "45"
+softPowerOff = "FALSE"
+ctkEnabled = "TRUE"
+scsi0:0.ctkEnabled = "TRUE"
+svga.guestBackedPrimaryAware = "TRUE"
+viv.moid = "bd916f5e-a90b-46db-98e8-ce974fef34f4:vm-29145:1NineJhqocLZEZ6JOxn/hLdjlihTelLVQGc8mmAj3nA="
+migrate.hostLog = "Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)-7cedc035.hlog"
+sched.cpu.min = "0"
+sched.cpu.shares = "normal"
+sched.mem.min = "0"
+sched.mem.minSize = "0"
+sched.mem.shares = "normal"
+migrate.encryptionMode = "opportunistic"
+ftcpt.ftEncryptionMode = "ftEncryptionOpportunistic"
+sched.swap.derivedName = "/vmfs/volumes/642eff9a-0df93507-cca5-5c6f69c57c70/Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)/Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)-69fcc9f7.vswp"
+uuid.location = "56 4d c2 6b 03 eb b2 44-eb 36 8a 83 de 3f bd b6"
+scsi0:0.redo = ""
+vmci0.id = "-468065992"
+cleanShutdown = "TRUE"
+vmxstats.filename = "Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec).scoreboard"
diff --git a/tests/vmx2xmldata/esx-in-the-wild-13.xml b/tests/vmx2xmldata/esx-in-the-wild-13.xml
new file mode 100644
index 000000000000..689282747779
--- /dev/null
+++ b/tests/vmx2xmldata/esx-in-the-wild-13.xml
@@ -0,0 +1,55 @@
+<domain type='vmware'>
+ <name>Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)</name>
+ <uuid>421eb458-5448-fc12-2074-83d5e419e138</uuid>
+ <description>name:Test-Mig-VM-1
+userid:962314ba515c48388a0e95c0961709ff
+username:admin
+projectid:b06b5f77b6bb442f85b1c67cff980ef9
+projectname:MIS
+flavor:name:mig-test-flavor
+flavor:memory_mb:1024
+flavor:vcpus:1
+flavor:ephemeral_gb:0
+flavor:root_gb:10
+flavor:swap:0
+imageid:8b90d6fa-20ab-4adf-8015-aad3dddb246c
+package:20.6.2
+</description>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <cputune>
+ <shares>1000</shares>
+ </cputune>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='[datastore] directory/Test-Mig-VM-1 (01ce57d0-4e20-41a5-8b6c-bcbf49a032ec)_2.vmdk'/>
+ <target dev='sda' bus='scsi'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='scsi' index='0' model='lsilogic'/>
+ <interface type='bridge'>
+ <mac address='fa:16:3e:bb:2c:4a' type='static'/>
+ <source bridge='Test'/>
+ <model type='vmxnet3'/>
+ </interface>
+ <serial type='file'>
+ <source path='/dev/null'/>
+ <target port='0'/>
+ </serial>
+ <console type='file'>
+ <source path='/dev/null'/>
+ <target type='serial' port='0'/>
+ </console>
+ <video>
+ <model type='vmvga' vram='4096' primary='yes'/>
+ </video>
+ </devices>
+</domain>
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index 785eee6d3002..0fb5f13f72ce 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -263,6 +263,7 @@ mymain(void)
DO_TEST("esx-in-the-wild-10");
DO_TEST("esx-in-the-wild-11");
DO_TEST("esx-in-the-wild-12");
+ DO_TEST("esx-in-the-wild-13");
DO_TEST("gsx-in-the-wild-1");
DO_TEST("gsx-in-the-wild-2");
--
2.44.0
6 months, 1 week
[PATCH] fix detach disk device failed with device not found
by long.yunjian@zte.com.cn
From: Long YunJian <long.yunjian(a)zte.com.cn>
We detach windows disk with libvirt-python api dom.detachDeviceFlags(xmlstr,3),
but files in windows disk is opened and busy, and libvirt return success.
We found disk not detached actually. so, we close files those opened in windows,
and want to detach again. However, we failed with device not found but disk is
exist actually.
first time detach disk:
a. get vmdef from domain->newDef here:
qemuDomainDetachDeviceLiveAndConfig
virDomainObjCopyPersistentDef
virDomainObjGetPersistentDef
domain->newDef
b. delete disk config here:
qemuDomainDetachDeviceLiveAndConfig
qemuDomainDetachDeviceConfig
virDomainDiskRemoveByName
virDomainDiskRemove
c. update from vmdef to newDef
qemuDomainDetachDeviceLiveAndConfig
virDomainObjAssignDef
domain->newDef = vmdef
second time detach disk:
get vmdef from domain->newDef here:
qemuDomainDetachDeviceLiveAndConfig
virDomainObjCopyPersistentDef
virDomainObjGetPersistentDef
domain->newDef
and then, report device not found here for disk config deleted at the first time:
qemuDomainDetachDeviceLiveAndConfig
qemuDomainDetachDeviceConfig
virDomainDiskRemoveByName
to fix this problem, let detach disk again, we add disk to config if timeout,
and let it deleted in processDeviceDeletedEvent if guestos detach disk successfinnaly.
Signed-off-by: Long YunJian <long.yunjian(a)zte.com.cn>
---
src/qemu/qemu_driver.c | 35 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_hotplug.c | 12 +++++++++++-
tests/qemuhotplugtest.c | 2 +-
3 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d01f788aea..0ab661251c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3598,6 +3598,9 @@ processDeviceDeletedEvent(virQEMUDriver *driver,
const char *devAlias)
{
virDomainDeviceDef dev;
+ virDomainDiskDef *det_disk = NULL;
+ g_autofree char *disk_dst_name = NULL;
+ bool devicedisk = false;
VIR_DEBUG("Removing device %s from domain %p %s",
devAlias, vm, vm->def->name);
@@ -3616,8 +3619,19 @@ processDeviceDeletedEvent(virQEMUDriver *driver,
if (virDomainDefFindDevice(vm->def, devAlias, &dev, true) < 0)
goto endjob;
+ if (dev.type & VIR_DOMAIN_DEVICE_DISK) {
+ devicedisk = true;
+ disk_dst_name = g_strdup(dev.data.disk->dst);
+ }
+
if (qemuDomainRemoveDevice(driver, vm, &dev) < 0)
goto endjob;
+
+ if (devicedisk && disk_dst_name) {
+ if ((det_disk = virDomainDiskRemoveByName(vm->newDef, disk_dst_name))) {
+ virDomainDiskDefFree(det_disk);
+ }
+ }
}
qemuDomainSaveStatus(vm);
@@ -7491,6 +7505,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriver *driver,
g_autoptr(virDomainDeviceDef) dev_live = NULL;
unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE;
g_autoptr(virDomainDef) vmdef = NULL;
+ bool timeout = false;
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -7530,6 +7545,10 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriver *driver,
if ((rc = qemuDomainDetachDeviceLive(vm, dev_live, driver, false)) < 0)
return -1;
+ if (rc == 2) {
+ timeout = true;
+ rc = 0;
+ }
if (rc == 0 && qemuDomainUpdateDeviceList(vm, VIR_ASYNC_JOB_NONE) < 0)
return -1;
@@ -7542,6 +7561,22 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriver *driver,
if (virDomainDefSave(vmdef, driver->xmlopt, cfg->configDir) < 0)
return -1;
+ /* if timeout, add device to vmdef, and delete at processDeviceDeletedEvent */
+ if (timeout && (dev_config->type & VIR_DOMAIN_DEVICE_DISK)) {
+ g_autoptr(virDomainDeviceDef) devConf = NULL;
+ unsigned int attach_parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
+ VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
+
+ if (!(devConf = virDomainDeviceDefParse(xml, vmdef,
+ driver->xmlopt, priv->qemuCaps,
+ attach_parse_flags)))
+ return -1;
+ if (qemuDomainAttachDeviceConfig(vmdef, devConf, priv->qemuCaps,
+ attach_parse_flags,
+ driver->xmlopt) < 0)
+ return -1;
+ }
+
virDomainObjAssignDef(vm, &vmdef, false, NULL);
/* Event sending if persistent config has changed */
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 774962b0df..98b47bfa9c 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -6090,6 +6090,13 @@ qemuDomainDetachDeviceLease(virQEMUDriver *driver,
}
+/* Returns:
+ * -1 Unplug of the device failed
+ *
+ * 0 Unplug of the device success
+ *
+ * 2 removal of the device did not finish in qemuDomainRemoveDeviceWaitTime
+ */
int
qemuDomainDetachDeviceLive(virDomainObj *vm,
virDomainDeviceDef *match,
@@ -6297,7 +6304,10 @@ qemuDomainDetachDeviceLive(virDomainObj *vm,
if (async) {
ret = 0;
} else {
- if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1)
+ ret = qemuDomainWaitForDeviceRemoval(vm);
+ if (ret == 0)
+ ret = 2;
+ if (ret == 1)
ret = qemuDomainRemoveDevice(driver, vm, &detach);
}
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 961a7a3c64..6c1c6112d9 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -238,7 +238,7 @@ testQemuHotplug(const void *data)
case DETACH:
ret = qemuDomainDetachDeviceLive(vm, dev, &driver, false);
- if (ret == 0 || fail)
+ if (ret == 2 || ret == 0 || fail)
ret = testQemuHotplugCheckResult(vm, domain_xml,
domain_filename, fail);
break;
--
2.31.1
6 months, 1 week
Entering freeze for libvirt-10.3.0
by Jiri Denemark
I have just tagged v10.3.0-rc1 in the repository and pushed signed
tarballs to https://download.libvirt.org/
Please give the release candidate some testing and in case you find a
serious issue which should have a fix in the upcoming release, feel
free to reply to this thread to make sure the issue is more visible.
If you have not done so yet, please update NEWS.rst to document any
significant change you made since the last release.
Thanks,
Jirka
6 months, 1 week
[PATCH v1 00/20] node_dev_udev: use workerpool and improve nodedev events
by Marc Hartmayer
When an udev event occurs for a mediated device (mdev) the mdev config data
requires an update via mdevctl as the udev event does not contain all config
data. This update needs to occur immediately and to be finished before the
libvirt nodedev event is issued to keep the API usage reliable.
Changelog:
RFCv1->v1:
+ removed some of my own s-o-b's that were accidentally inserted in the RFC
+ added r-b's from Boris and Jonathon
+ worked in comments from Boris and Jonathon, but I did not inline
"nodeDeviceDefResetMdevActiveConfig" as I'm not sure whether this improves
the readability
+ reworked patch "[RFC PATCH v1 11/15] node_device_udev: Use
`stateShutdownPrepare` and `stateShutdownWait`"
+ reworked patch "node_device_udev: Use a worker pool for processing events and
emitting nodedev event"
+ added patches:
- node_device_udev: Move responsibility to release `(init|udev)Thread` to `udevEventDataDispose`
- node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and mdevCtlMonitor
- node_device_udev: nodeStateShutdownPrepare: Disconnect the signals explicitly
- node_device_udev: Pass the driver state as parameter in prepartion for the next commit
- node_device_udev: Add support for `g_autoptr` to `udevEventData
- node_device_udev: Pass the `udevEventData` via parameter and use refcounting
Boris Fiuczynski (3):
nodedev: fix mdev add udev event data handling
nodedev: immediate update of active config on udev add
nodedev: reset active config data on udev remove event
Marc Hartmayer (17):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Don't take `mdevctlLock` for `mdevctl list` and add
comments about locking
node_device_udev: Take lock if `driver->privateData` is modified
node_device_udev: Add prefix `udev` for udev related data
node_device_udev: Inline `udevRemoveOneDevice`
node_device_udev: Move responsibility to release `(init|udev)Thread`
to `udevEventDataDispose`
node_device_udev: Fix leak of mdevctlLock, udevThreadCond, and
mdevCtlMonitors
node_device_udev: Introduce and use `stateShutdownPrepare` and
`stateShutdownWait`
node_device_udev: nodeStateShutdownPrepare: Disconnect the signals
explicitly
node_device_udev: Pass the driver state as parameter in preparation
for the next commit
node_device_udev: Use a worker pool for processing events and emitting
nodedev event
node_device_udev: Call `nodeDeviceUpdateMediatedDevices` directly
node_device_udev: Make the code easier to read
node_device_udev: Add support for `g_autoptr` to `udevEventData`
node_device_udev: Pass the `udevEventData` via parameter and use
refcounting
src/node_device/node_device_driver.h | 5 +-
src/util/virmdev.h | 4 +
src/conf/node_device_conf.c | 10 +-
src/node_device/node_device_driver.c | 19 +-
src/node_device/node_device_udev.c | 510 ++++++++++++++++++---------
src/test/test_driver.c | 3 +-
src/util/virmdev.c | 20 ++
src/libvirt_private.syms | 2 +
8 files changed, 384 insertions(+), 189 deletions(-)
base-commit: c38720b337f74337ec94c0fe2e97a7c2c57188ae
--
2.34.1
6 months, 1 week
[PATCH 0/2] ci : drop CentOS 8 Stream
by Daniel P. Berrangé
CentOS 8 Stream goes EOL at the end of May, and unlike most other
distros, it will actively break the ability to install and update
it, as package repos are all archived. We thus have to stop using
it in CI, but fortunately Alma Linux 8 continues to give us enough
ongoing coverage.
The exception is the integration tests. To keep those working would
require the custom runner to be reinstalled with Alma Linux, which
I don't have access to do.
Daniel P. Berrangé (2):
ci: refresh with latest lcitool manifest
ci: drop CentOS 8 Stream and refresh
ci/buildenv/alpine-319.sh | 2 +-
ci/buildenv/alpine-edge.sh | 2 +-
ci/buildenv/centos-stream-8.sh | 104 -------------
ci/buildenv/centos-stream-9.sh | 1 +
ci/cirrus/build.yml | 2 +-
ci/containers/alpine-319.Dockerfile | 2 +-
ci/containers/alpine-edge.Dockerfile | 2 +-
ci/containers/centos-stream-8.Dockerfile | 107 -------------
ci/containers/centos-stream-9.Dockerfile | 1 +
ci/gitlab/build-templates.yml | 184 ++++++++++-------------
ci/gitlab/builds.yml | 15 --
ci/gitlab/containers.yml | 7 -
ci/integration.yml | 24 ---
ci/manifest.yml | 8 -
14 files changed, 90 insertions(+), 371 deletions(-)
delete mode 100644 ci/buildenv/centos-stream-8.sh
delete mode 100644 ci/containers/centos-stream-8.Dockerfile
--
2.43.0
6 months, 1 week
[PATCH 0/2] cmdComplete: Fix two memleaks
by Peter Krempa
Putting my recently-reviewed series through CI revealed that there were
two pre-existing memleaks in the completion code caught by the test
additions.
Peter Krempa (2):
vsh: cmdComplete: Don't leak buffer for completion
vshReadlineInit: Initialize only once
tools/vsh.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--
2.44.0
6 months, 1 week
[PATCH 00/13] vsh: Fix handling of commands and help - part 3 (commandline parser overhaul)
by Peter Krempa
This series refactors the commandline parser in order to use easier to
understand/maintain logic.
Peter Krempa (13):
meson: tests: Add 'virsh' as dependency of 'virshtest'
tools: Rename vshCommandOptStringReq to vshCommandOptString
vsh: Fix 'stdin' closing in 'cmdComplete'
vsh: Add a VSH_OT_STRING argument for 'virsh echo'
virshtest: Add test cases for command completion helper
vsh: Rework logic for picking which argument is to be completed
virsh: Introduce new 'VSH_OT_ARGV' accessors
vsh: Remove unused infrastructure for command completion
vsh: Unexport command lookup helpers 'vshCmddefSearch',
'vshCmdGrpSearch', 'vshCmdGrpHelp'
vsh: Refactor parsed option and command assignment
vshCmddefCheckInternals: Remove check for "too many options"
vsh: Move option assignment debugging from vshCommandParse to
vshCmdOptAssign
vsh: Refactor logic in vshCommandParse
tests/meson.build | 4 +-
tests/virshtest.c | 37 +
.../completion-arg-full-argv-next.out | 2 +
.../completion-arg-full-argv.out | 2 +
.../completion-arg-full-bool-next.out | 7 +
.../completion-arg-full-bool.out | 2 +
.../completion-arg-full-string-next.out | 7 +
.../completion-arg-full-string.out | 2 +
.../virshtestdata/completion-arg-partial.out | 4 +
.../completion-arg-positional-empty.out | 3 +
...completion-arg-positional-partial-next.out | 2 +
.../completion-arg-positional-partial.out | 2 +
tests/virshtestdata/completion-args.out | 7 +
.../completion-argv-multiple-next.out | 25 +
...mpletion-argv-multiple-positional-next.out | 25 +
.../completion-argv-multiple-positional.out | 2 +
.../completion-argv-multiple.out | 2 +
.../completion-command-complete.out | 2 +
tests/virshtestdata/completion-command.out | 2 +
tests/virshtestdata/completion.in | 16 +
tests/virshtestdata/completion.out | 71 ++
tools/virsh-backup.c | 4 +-
tools/virsh-checkpoint.c | 18 +-
tools/virsh-completer-domain.c | 2 +-
tools/virsh-completer-host.c | 8 +-
tools/virsh-domain-event.c | 2 +-
tools/virsh-domain-monitor.c | 18 +-
tools/virsh-domain.c | 351 +++---
tools/virsh-host.c | 40 +-
tools/virsh-interface.c | 6 +-
tools/virsh-network.c | 35 +-
tools/virsh-nodedev.c | 30 +-
tools/virsh-nwfilter.c | 8 +-
tools/virsh-pool.c | 64 +-
tools/virsh-secret.c | 10 +-
tools/virsh-snapshot.c | 23 +-
tools/virsh-util.c | 2 +-
tools/virsh-volume.c | 29 +-
tools/virsh.c | 6 +-
tools/virt-admin.c | 26 +-
tools/vsh.c | 1012 +++++++++--------
tools/vsh.h | 27 +-
42 files changed, 1103 insertions(+), 844 deletions(-)
create mode 100644 tests/virshtestdata/completion-arg-full-argv-next.out
create mode 100644 tests/virshtestdata/completion-arg-full-argv.out
create mode 100644 tests/virshtestdata/completion-arg-full-bool-next.out
create mode 100644 tests/virshtestdata/completion-arg-full-bool.out
create mode 100644 tests/virshtestdata/completion-arg-full-string-next.out
create mode 100644 tests/virshtestdata/completion-arg-full-string.out
create mode 100644 tests/virshtestdata/completion-arg-partial.out
create mode 100644 tests/virshtestdata/completion-arg-positional-empty.out
create mode 100644 tests/virshtestdata/completion-arg-positional-partial-next.out
create mode 100644 tests/virshtestdata/completion-arg-positional-partial.out
create mode 100644 tests/virshtestdata/completion-args.out
create mode 100644 tests/virshtestdata/completion-argv-multiple-next.out
create mode 100644 tests/virshtestdata/completion-argv-multiple-positional-next.out
create mode 100644 tests/virshtestdata/completion-argv-multiple-positional.out
create mode 100644 tests/virshtestdata/completion-argv-multiple.out
create mode 100644 tests/virshtestdata/completion-command-complete.out
create mode 100644 tests/virshtestdata/completion-command.out
create mode 100644 tests/virshtestdata/completion.in
create mode 100644 tests/virshtestdata/completion.out
--
2.44.0
6 months, 1 week
[PATCH] virnetdevbandwidth.c: Put a limit to "quantum"
by Michal Privoznik
The "quantum" attribute of HTB is documented as:
Number of bytes to serve from this class before the scheduler
moves to the next class.
Since v1.3.2-rc1~225 we compute what we think is the appropriate
value and pass it on the TC command line. But kernel and
subsequently TC use uint32_t to store this value. If we compute
value outside of this type then TC fails and prints usage which
we then interpret as an error message. Needlessly long error
message. While there's not much we can do about the latter, we
can put a cap on the value and stop tickling this behavior of TC.
Fixes: 065054daa71f645fc83aff0271f194d326208616
Resolves: https://issues.redhat.com/browse/RHEL-34112
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virnetdevbandwidth.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/util/virnetdevbandwidth.c b/src/util/virnetdevbandwidth.c
index ec41666f67..7f5714a33f 100644
--- a/src/util/virnetdevbandwidth.c
+++ b/src/util/virnetdevbandwidth.c
@@ -46,6 +46,7 @@ virNetDevBandwidthCmdAddOptimalQuantum(virCommand *cmd,
const virNetDevBandwidthRate *rate)
{
const unsigned long long mtu = 1500;
+ const unsigned long long r2q_limit = (1ULL << 32) -1;
unsigned long long r2q;
/* When two or more classes compete for unused bandwidth they are each
@@ -60,6 +61,11 @@ virNetDevBandwidthCmdAddOptimalQuantum(virCommand *cmd,
if (!r2q)
r2q = 1;
+ /* But there's an internal limit in TC (well, kernel's implementation of
+ * HTB) for quantum: it has to fit into u32. Put a cap there. */
+ if (r2q > r2q_limit)
+ r2q = r2q_limit;
+
virCommandAddArg(cmd, "quantum");
virCommandAddArgFormat(cmd, "%llu", r2q);
}
--
2.43.2
6 months, 1 week
[PULL 0/5] Housekeeping patches for 2024-04-24
by Philippe Mathieu-Daudé
The following changes since commit 1a6f53953df65f31e922f8a1763dac9f10adc81b:
Open 9.1 development tree (2024-04-23 17:33:36 -0700)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/housekeeping-20240424
for you to fetch changes up to 2d9cbbea64e67d90c3c22d7e2d5ab530d830eb33:
block/gluster: Remove deprecated RDMA protocol handling (2024-04-24 16:03:38 +0200)
----------------------------------------------------------------
Removal of deprecated code
- Remove the Nios II target and hardware
- Remove pvrdma device and rdmacm-mux helper
- Remove GlusterFS RDMA protocol handling
- Update Sriram Yagnaraman mail address
----------------------------------------------------------------
Philippe Mathieu-Daudé (4):
target/nios2: Remove the deprecated Nios II target
hw/timer: Remove the ALTERA_TIMER model
hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper
block/gluster: Remove deprecated RDMA protocol handling
Sriram Yagnaraman (1):
MAINTAINERS: Update Sriram Yagnaraman mail address
MAINTAINERS | 25 +-
docs/about/deprecated.rst | 20 -
docs/about/emulation.rst | 7 -
docs/about/removed-features.rst | 21 +
docs/pvrdma.txt | 345 --
docs/system/device-url-syntax.rst.inc | 4 +-
docs/system/loongarch/virt.rst | 2 +-
docs/system/qemu-block-drivers.rst.inc | 1 -
docs/system/replay.rst | 2 +-
docs/user/main.rst | 4 -
configure | 2 -
configs/devices/nios2-softmmu/default.mak | 6 -
configs/targets/nios2-linux-user.mak | 1 -
configs/targets/nios2-softmmu.mak | 2 -
meson.build | 38 -
qapi/machine.json | 19 +-
qapi/qapi-schema.json | 1 -
qapi/rdma.json | 38 -
contrib/rdmacm-mux/rdmacm-mux.h | 61 -
hw/nios2/boot.h | 10 -
hw/rdma/rdma_backend.h | 129 -
hw/rdma/rdma_backend_defs.h | 76 -
hw/rdma/rdma_rm.h | 97 -
hw/rdma/rdma_rm_defs.h | 146 -
hw/rdma/rdma_utils.h | 63 -
hw/rdma/trace.h | 1 -
hw/rdma/vmw/pvrdma.h | 144 -
hw/rdma/vmw/pvrdma_dev_ring.h | 46 -
hw/rdma/vmw/pvrdma_qp_ops.h | 28 -
hw/rdma/vmw/trace.h | 1 -
include/disas/dis-asm.h | 5 -
include/exec/poison.h | 2 -
include/exec/user/abitypes.h | 3 +-
include/hw/intc/nios2_vic.h | 66 -
include/hw/rdma/rdma.h | 37 -
include/monitor/hmp.h | 1 -
.../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 685 ----
.../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 348 --
.../standard-headers/rdma/vmw_pvrdma-abi.h | 310 --
include/sysemu/arch_init.h | 1 -
linux-user/nios2/sockbits.h | 1 -
linux-user/nios2/syscall_nr.h | 333 --
linux-user/nios2/target_cpu.h | 49 -
linux-user/nios2/target_elf.h | 14 -
linux-user/nios2/target_errno_defs.h | 7 -
linux-user/nios2/target_fcntl.h | 11 -
linux-user/nios2/target_mman.h | 11 -
linux-user/nios2/target_prctl.h | 1 -
linux-user/nios2/target_proc.h | 1 -
linux-user/nios2/target_resource.h | 1 -
linux-user/nios2/target_signal.h | 9 -
linux-user/nios2/target_structs.h | 1 -
linux-user/nios2/target_syscall.h | 37 -
linux-user/nios2/termbits.h | 1 -
linux-user/syscall_defs.h | 4 +-
target/nios2/cpu-param.h | 20 -
target/nios2/cpu-qom.h | 18 -
target/nios2/cpu.h | 301 --
target/nios2/helper.h | 32 -
target/nios2/mmu.h | 52 -
tests/tcg/nios2/semicall.h | 28 -
block/gluster.c | 39 -
contrib/rdmacm-mux/main.c | 831 ----
disas/nios2.c | 3514 -----------------
hw/core/machine-qmp-cmds.c | 32 -
hw/intc/nios2_vic.c | 313 --
hw/nios2/10m50_devboard.c | 181 -
hw/nios2/boot.c | 234 --
hw/nios2/generic_nommu.c | 101 -
hw/rdma/rdma.c | 30 -
hw/rdma/rdma_backend.c | 1401 -------
hw/rdma/rdma_rm.c | 812 ----
hw/rdma/rdma_utils.c | 126 -
hw/rdma/vmw/pvrdma_cmd.c | 815 ----
hw/rdma/vmw/pvrdma_dev_ring.c | 141 -
hw/rdma/vmw/pvrdma_main.c | 735 ----
hw/rdma/vmw/pvrdma_qp_ops.c | 298 --
hw/timer/altera_timer.c | 244 --
linux-user/elfload.c | 99 -
linux-user/nios2/cpu_loop.c | 157 -
linux-user/nios2/signal.c | 210 -
monitor/qmp-cmds.c | 1 -
target/nios2/cpu.c | 410 --
target/nios2/helper.c | 371 --
target/nios2/mmu.c | 216 -
target/nios2/monitor.c | 35 -
target/nios2/nios2-semi.c | 230 --
target/nios2/op_helper.c | 119 -
target/nios2/translate.c | 1107 ------
tests/qtest/machine-none-test.c | 1 -
fpu/softfloat-specialize.c.inc | 2 +-
.gitlab-ci.d/buildtest.yml | 4 +-
.gitlab-ci.d/crossbuild-template.yml | 2 +-
.gitlab-ci.d/crossbuilds.yml | 2 +-
.mailmap | 1 +
Kconfig.host | 3 -
contrib/rdmacm-mux/meson.build | 7 -
disas/meson.build | 1 -
hmp-commands-info.hx | 13 -
hw/Kconfig | 2 -
hw/intc/Kconfig | 3 -
hw/intc/meson.build | 1 -
hw/meson.build | 2 -
hw/nios2/Kconfig | 13 -
hw/nios2/meson.build | 6 -
hw/rdma/Kconfig | 3 -
hw/rdma/meson.build | 12 -
hw/rdma/trace-events | 31 -
hw/rdma/vmw/trace-events | 17 -
hw/timer/Kconfig | 4 -
hw/timer/meson.build | 1 -
meson_options.txt | 2 -
qapi/meson.build | 1 -
qemu-options.hx | 11 +-
.../ci/org.centos/stream/8/x86_64/configure | 1 -
scripts/coverity-scan/COMPONENTS.md | 3 -
scripts/gensyscalls.sh | 1 -
scripts/meson-buildoptions.sh | 3 -
scripts/probe-gdb-support.py | 1 -
scripts/update-linux-headers.sh | 27 -
target/Kconfig | 1 -
target/meson.build | 1 -
target/nios2/Kconfig | 3 -
target/nios2/meson.build | 17 -
target/nios2/trace-events | 10 -
tests/avocado/boot_linux_console.py | 8 -
tests/avocado/replay_kernel.py | 11 -
tests/docker/Makefile.include | 5 -
.../debian-nios2-cross.d/build-toolchain.sh | 87 -
tests/tcg/nios2/10m50-ghrd.ld | 70 -
tests/tcg/nios2/Makefile.softmmu-target | 32 -
tests/tcg/nios2/Makefile.target | 11 -
tests/tcg/nios2/boot.S | 218 -
tests/tcg/nios2/intr.S | 31 -
tests/tcg/nios2/test-shadow-1.S | 40 -
135 files changed, 40 insertions(+), 17218 deletions(-)
delete mode 100644 docs/pvrdma.txt
delete mode 100644 configs/devices/nios2-softmmu/default.mak
delete mode 100644 configs/targets/nios2-linux-user.mak
delete mode 100644 configs/targets/nios2-softmmu.mak
delete mode 100644 qapi/rdma.json
delete mode 100644 contrib/rdmacm-mux/rdmacm-mux.h
delete mode 100644 hw/nios2/boot.h
delete mode 100644 hw/rdma/rdma_backend.h
delete mode 100644 hw/rdma/rdma_backend_defs.h
delete mode 100644 hw/rdma/rdma_rm.h
delete mode 100644 hw/rdma/rdma_rm_defs.h
delete mode 100644 hw/rdma/rdma_utils.h
delete mode 100644 hw/rdma/trace.h
delete mode 100644 hw/rdma/vmw/pvrdma.h
delete mode 100644 hw/rdma/vmw/pvrdma_dev_ring.h
delete mode 100644 hw/rdma/vmw/pvrdma_qp_ops.h
delete mode 100644 hw/rdma/vmw/trace.h
delete mode 100644 include/hw/intc/nios2_vic.h
delete mode 100644 include/hw/rdma/rdma.h
delete mode 100644 include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h
delete mode 100644 include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h
delete mode 100644 include/standard-headers/rdma/vmw_pvrdma-abi.h
delete mode 100644 linux-user/nios2/sockbits.h
delete mode 100644 linux-user/nios2/syscall_nr.h
delete mode 100644 linux-user/nios2/target_cpu.h
delete mode 100644 linux-user/nios2/target_elf.h
delete mode 100644 linux-user/nios2/target_errno_defs.h
delete mode 100644 linux-user/nios2/target_fcntl.h
delete mode 100644 linux-user/nios2/target_mman.h
delete mode 100644 linux-user/nios2/target_prctl.h
delete mode 100644 linux-user/nios2/target_proc.h
delete mode 100644 linux-user/nios2/target_resource.h
delete mode 100644 linux-user/nios2/target_signal.h
delete mode 100644 linux-user/nios2/target_structs.h
delete mode 100644 linux-user/nios2/target_syscall.h
delete mode 100644 linux-user/nios2/termbits.h
delete mode 100644 target/nios2/cpu-param.h
delete mode 100644 target/nios2/cpu-qom.h
delete mode 100644 target/nios2/cpu.h
delete mode 100644 target/nios2/helper.h
delete mode 100644 target/nios2/mmu.h
delete mode 100644 tests/tcg/nios2/semicall.h
delete mode 100644 contrib/rdmacm-mux/main.c
delete mode 100644 disas/nios2.c
delete mode 100644 hw/intc/nios2_vic.c
delete mode 100644 hw/nios2/10m50_devboard.c
delete mode 100644 hw/nios2/boot.c
delete mode 100644 hw/nios2/generic_nommu.c
delete mode 100644 hw/rdma/rdma.c
delete mode 100644 hw/rdma/rdma_backend.c
delete mode 100644 hw/rdma/rdma_rm.c
delete mode 100644 hw/rdma/rdma_utils.c
delete mode 100644 hw/rdma/vmw/pvrdma_cmd.c
delete mode 100644 hw/rdma/vmw/pvrdma_dev_ring.c
delete mode 100644 hw/rdma/vmw/pvrdma_main.c
delete mode 100644 hw/rdma/vmw/pvrdma_qp_ops.c
delete mode 100644 hw/timer/altera_timer.c
delete mode 100644 linux-user/nios2/cpu_loop.c
delete mode 100644 linux-user/nios2/signal.c
delete mode 100644 target/nios2/cpu.c
delete mode 100644 target/nios2/helper.c
delete mode 100644 target/nios2/mmu.c
delete mode 100644 target/nios2/monitor.c
delete mode 100644 target/nios2/nios2-semi.c
delete mode 100644 target/nios2/op_helper.c
delete mode 100644 target/nios2/translate.c
delete mode 100644 contrib/rdmacm-mux/meson.build
delete mode 100644 hw/nios2/Kconfig
delete mode 100644 hw/nios2/meson.build
delete mode 100644 hw/rdma/Kconfig
delete mode 100644 hw/rdma/meson.build
delete mode 100644 hw/rdma/trace-events
delete mode 100644 hw/rdma/vmw/trace-events
delete mode 100644 target/nios2/Kconfig
delete mode 100644 target/nios2/meson.build
delete mode 100644 target/nios2/trace-events
delete mode 100755 tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
delete mode 100644 tests/tcg/nios2/10m50-ghrd.ld
delete mode 100644 tests/tcg/nios2/Makefile.softmmu-target
delete mode 100644 tests/tcg/nios2/Makefile.target
delete mode 100644 tests/tcg/nios2/boot.S
delete mode 100644 tests/tcg/nios2/intr.S
delete mode 100644 tests/tcg/nios2/test-shadow-1.S
--
2.41.0
6 months, 1 week