[libvirt] [PATCH 0/3] qemu: Fix handling of block job data in event handlers (blockdev-add saga fixes)
by Peter Krempa
Some of the refactors which allowed carrying more data with blockjobs
created a race condition when a too-quick job would actually delete the
data. This is a problem for legacy block jobs only.
Peter Krempa (3):
qemu: process: Don't use qemuBlockJobStartupFinalize in
qemuProcessHandleBlockJob
qemu: driver: Don't use qemuBlockJobStartupFinalize in
processBlockJobEvent
qemu: driver: Add debug message when we conjure block job data object
src/qemu/qemu_driver.c | 4 ++--
src/qemu/qemu_process.c | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
--
2.21.0
5 years, 5 months
[libvirt] [RFC PATCH 0/6] Split domain_conf.h
by Ján Tomko
Currently, domain_conf.{c,h} is a giant pile of functions somewhat
related to the domain definition. Try to change that by splitting out
the type declarations, XML parsing and XML formatting from the header
file.
Ján Tomko (6):
conf: move virNetworkPortDefPtr declaration to virconftypes.h
virsh: clean up includes
conf: introduce virdomaintypes.h
conf: introduce domain_parse.h
conf: introduce domain_format.h
maint: include virdomaintypes.h instead of domain_conf.h
src/access/viraccessdriver.h | 2 +-
src/access/viraccessmanager.h | 2 +-
src/conf/Makefile.inc.am | 3 +
src/conf/domain_conf.h | 3023 +--------------------
src/conf/domain_format.h | 89 +
src/conf/domain_parse.h | 321 +++
src/conf/virchrdev.h | 2 +-
src/conf/virconftypes.h | 3 +
src/conf/virdomaintypes.h | 2692 ++++++++++++++++++
src/conf/virnetworkportdef.h | 4 +-
src/esx/esx_private.h | 2 +-
src/interface/interface_backend_udev.c | 2 +-
src/libxl/libxl_capabilities.c | 2 +-
src/libxl/libxl_domain.h | 2 +-
src/locking/domain_lock.h | 2 +-
src/locking/lock_driver.h | 2 +-
src/locking/sanlock_helper.c | 2 +-
src/lxc/lxc_cgroup.h | 2 +-
src/lxc/lxc_conf.h | 2 +-
src/lxc/lxc_hostdev.h | 2 +-
src/lxc/lxc_monitor.h | 2 +-
src/lxc/lxc_native.c | 2 +-
src/lxc/lxc_native.h | 2 +-
src/network/bridge_driver.h | 2 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 2 +-
src/nwfilter/nwfilter_driver.c | 2 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 2 +-
src/nwfilter/nwfilter_gentech_driver.c | 2 +-
src/nwfilter/nwfilter_learnipaddr.c | 2 +-
src/qemu/qemu_alias.h | 2 +-
src/qemu/qemu_blockjob.c | 2 +-
src/qemu/qemu_capabilities.c | 2 +-
src/qemu/qemu_cgroup.h | 2 +-
src/qemu/qemu_command.c | 2 +-
src/qemu/qemu_command.h | 2 +-
src/qemu/qemu_conf.h | 2 +-
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_domain_address.h | 2 +-
src/qemu/qemu_driver.c | 2 +-
src/qemu/qemu_firmware.h | 2 +-
src/qemu/qemu_hostdev.h | 2 +-
src/qemu/qemu_hotplug.h | 2 +-
src/qemu/qemu_interface.h | 2 +-
src/qemu/qemu_monitor.h | 2 +-
src/qemu/qemu_processpriv.h | 2 +-
src/qemu/qemu_security.h | 2 +-
src/qemu/qemu_tpm.c | 2 +-
src/remote/remote_daemon_dispatch.c | 2 +-
src/security/security_manager.h | 2 +-
src/security/virt-aa-helper.c | 2 +-
src/storage/storage_driver.h | 2 +-
src/test/test_driver.c | 2 +-
src/vbox/vbox_driver.c | 2 +-
src/vbox/vbox_network.c | 2 +-
src/vbox/vbox_storage.c | 2 +-
src/vbox/vbox_tmpl.c | 2 +-
src/vz/vz_utils.h | 2 +-
src/xenapi/xenapi_driver.c | 2 +-
src/xenapi/xenapi_utils.c | 2 +-
src/xenapi/xenapi_utils.h | 2 +-
src/xenconfig/xen_common.h | 2 +-
src/xenconfig/xen_xl.c | 2 +-
src/xenconfig/xen_xl.h | 2 +-
src/xenconfig/xen_xm.h | 2 +-
tests/domainconftest.c | 2 +-
tests/qemumemlocktest.c | 2 +-
tests/qemumonitortestutils.h | 2 +-
tests/qemusecuritytest.c | 2 +-
tests/testutilslxc.c | 2 +-
tests/testutilsqemu.h | 2 +-
tests/testutilsxen.c | 2 +-
tools/virsh-domain.c | 2 +-
tools/virsh.c | 3 -
tools/vsh.c | 3 -
74 files changed, 3177 insertions(+), 3094 deletions(-)
create mode 100644 src/conf/domain_format.h
create mode 100644 src/conf/domain_parse.h
create mode 100644 src/conf/virdomaintypes.h
--
2.19.2
5 years, 5 months
[libvirt] [PATCH v1 0/3] misc virhostdevs cleanups
by Daniel Henrique Barboza
These are cleanups that I made together with an attempt to
enable parcial PCI Multifunction assignment with managed=true.
That work will be scrapped after discussions with Laine in
[1], but these cleanups kind of make sense on their own, so
here they are.
[1] https://www.redhat.com/archives/libvir-list/2019-July/msg01175.html
Daniel Henrique Barboza (3):
virhostdev: introduce virHostdevResetAllPCIDevices
virhostdev: introduce virHostdevReattachAllPCIDevices
virhostdev: remove virHostdevReattachPCIDevice
src/util/virhostdev.c | 151 +++++++++++++++++-------------------------
src/util/virpci.c | 29 +++++++-
2 files changed, 86 insertions(+), 94 deletions(-)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] news: mention new bochs display device
by Jonathon Jongsma
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
docs/news.xml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 07d4575a65..1134309ec2 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -54,6 +54,15 @@
<libvirt>
<release version="v5.6.0" date="unreleased">
<section title="New features">
+ <change>
+ <summary>
+ qemu: Introduce a new video model of type 'bochs'
+ </summary>
+ <description>
+ Introduce a new video model type that supports the
+ <code>bochs-display</code> device that was added in qemu version 3.0.
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8
by Erik Skultety
virPCIGetSysfsFile is conditionally compiled only on Linux platforms.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Pushed under the build breaker rule.
src/util/virpci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 75e8daadd5..ae3a0fa886 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -3099,6 +3099,14 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link ATTRIBUTE_UNUSED,
}
+int
+virPCIGetSysfsFile(char *virPCIDeviceName ATTRIBUTE_UNUSED,
+ char **pci_sysfs_device_link ATTRIBUTE_UNUSED)
+{
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
+ return -1;
+}
+
int
virPCIDeviceAddressGetSysfsFile(virPCIDeviceAddressPtr dev ATTRIBUTE_UNUSED,
char **pci_sysfs_device_link ATTRIBUTE_UNUSED)
--
2.20.1
5 years, 5 months
[libvirt] [PATCH 00/14] Split and enhancement of virsh completer
by Michal Privoznik
Having all completers inside one file is not good. Let's split it the
same way we have other files split (e.g. src/libvirt-*.c) and then add
one completer to demonstrate where new completers should be added.
Michal Prívozník (14):
tools: s/Nodedev/NodeDevice/
tools: Expose virshCommaStringListComplete()
tools: Separate domain related completers into a file
tools: Separate storage pool related completers into a file
tools: Separate storage volume related completers into a file
tools: Separate interface related completers into a file
tools: Separate network related completers into a file
tools: Separate nodedev related completers into a file
tools: Separate nwfilter related completers into a file
tools: Separate secret related completers into a file
tools: Separate snapshot related completers into a file
tools: Separate host related completers into a file
virsh-completer: Drop needless #include
virsh: Introduce virshPoolTypeCompleter
tools/Makefile.am | 10 +
tools/virsh-completer-domain.c | 314 ++++++++++
tools/virsh-completer-domain.h | 55 ++
tools/virsh-completer-host.c | 148 +++++
tools/virsh-completer-host.h | 31 +
tools/virsh-completer-interface.c | 67 ++
tools/virsh-completer-interface.h | 27 +
tools/virsh-completer-network.c | 145 +++++
tools/virsh-completer-network.h | 35 ++
tools/virsh-completer-nodedev.c | 117 ++++
tools/virsh-completer-nodedev.h | 35 ++
tools/virsh-completer-nwfilter.c | 105 ++++
tools/virsh-completer-nwfilter.h | 31 +
tools/virsh-completer-pool.c | 120 ++++
tools/virsh-completer-pool.h | 35 ++
tools/virsh-completer-secret.c | 91 +++
tools/virsh-completer-secret.h | 31 +
tools/virsh-completer-snapshot.c | 73 +++
tools/virsh-completer-snapshot.h | 27 +
tools/virsh-completer-volume.c | 73 +++
tools/virsh-completer-volume.h | 28 +
tools/virsh-completer.c | 977 +-----------------------------
tools/virsh-completer.h | 114 +---
tools/virsh-nodedev.c | 16 +-
tools/virsh-nodedev.h | 6 +-
tools/virsh-pool.c | 1 +
26 files changed, 1624 insertions(+), 1088 deletions(-)
create mode 100644 tools/virsh-completer-domain.c
create mode 100644 tools/virsh-completer-domain.h
create mode 100644 tools/virsh-completer-host.c
create mode 100644 tools/virsh-completer-host.h
create mode 100644 tools/virsh-completer-interface.c
create mode 100644 tools/virsh-completer-interface.h
create mode 100644 tools/virsh-completer-network.c
create mode 100644 tools/virsh-completer-network.h
create mode 100644 tools/virsh-completer-nodedev.c
create mode 100644 tools/virsh-completer-nodedev.h
create mode 100644 tools/virsh-completer-nwfilter.c
create mode 100644 tools/virsh-completer-nwfilter.h
create mode 100644 tools/virsh-completer-pool.c
create mode 100644 tools/virsh-completer-pool.h
create mode 100644 tools/virsh-completer-secret.c
create mode 100644 tools/virsh-completer-secret.h
create mode 100644 tools/virsh-completer-snapshot.c
create mode 100644 tools/virsh-completer-snapshot.h
create mode 100644 tools/virsh-completer-volume.c
create mode 100644 tools/virsh-completer-volume.h
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] virpci: Drop duplicate function
by Michal Privoznik
We have two functions: virPCIDeviceAddressIsEqual() defined only
on Linux and virPCIDeviceAddressEqual() defined everywhere. And
both of them do the same. Drop the former in favour of the
latter.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virpci.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index ae3a0fa886..6dc0a2711c 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2590,19 +2590,6 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr)
#ifdef __linux__
-/*
- * returns true if equal
- */
-static bool
-virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1,
- virPCIDeviceAddressPtr bdf2)
-{
- return ((bdf1->domain == bdf2->domain) &&
- (bdf1->bus == bdf2->bus) &&
- (bdf1->slot == bdf2->slot) &&
- (bdf1->function == bdf2->function));
-}
-
virPCIDeviceAddressPtr
virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
{
@@ -2787,7 +2774,7 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
}
for (i = 0; i < num_virt_fns; i++) {
- if (virPCIDeviceAddressIsEqual(vf_bdf, virt_fns[i])) {
+ if (virPCIDeviceAddressEqual(vf_bdf, virt_fns[i])) {
*vf_index = i;
ret = 0;
break;
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] qemu: blockjob: Adjust ATTRIBUTE_NONNULL statements for qemuBlockJobDiskNew
by Peter Krempa
Commit 5ff46aaa7f added a new parameter but neglected to fix the NONNULL
declarations.
Reported-by: Julio Faracco <jcfaracco(a)gmail.com>
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_blockjob.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Pushed under the trivial rule.
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index d07ab75c8b..b0d17963fd 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -106,7 +106,7 @@ qemuBlockJobDiskNew(virDomainObjPtr vm,
virDomainDiskDefPtr disk,
qemuBlockJobType type,
const char *jobname)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
qemuBlockJobDataPtr
qemuBlockJobDiskGetJob(virDomainDiskDefPtr disk)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH 00/25] qemu: Properly track blockjobs (blockdev-add saga)
by Peter Krempa
This series requires few patches I've posted, namely:
https://www.redhat.com/archives/libvir-list/2019-July/msg00669.html
https://www.redhat.com/archives/libvir-list/2019-June/msg01133.html
which were not yet pushed upstream.
For convenience you can fetch the patches including deps by:
git fetch https://github.com/pipo/libvirt.git job-tracking-send
Further patches will build on top of this to add metadata for individual
jobs for supporting blockdev and will be posted later as they require
some cleanups.
Peter Krempa (25):
qemu: domain: Repurpose and export helper for saving domain status XML
qemu: domain: Add helper for saving config XML
qemu: blockjob: Use VIR_AUTOUNREF in qemuBlockJobDataNew
qemu: blockjob: Separate and unify block job (un)registration
qemu: domain: Add global table of blockjobs
qemu: blockjob: Register new and running blockjobs in the global table
qemu: blockjob: Add string convertors for blockjob type and state
enums
qemu: blockjob: Export functions for allocating and registering job
data
qemu: blockjob: Add flag for invalid block job data
qemu: domain: Store blockjob data in the status XML
qemu: blockjob: Save status XML when modifying job state
qemu: driver: Remove unnecessary saving of status XML
tests: qemustatusxml2xml: Add test case for block job tracking
qemu: blockjob: Add 'concluded' state for a block job
qemu: process: Don't trigger BLOCK_JOB* events with -blockdev
qemu: blockjob: Add helper to convert monitor job status to internal
state
qemu: Add handler for job state change event
qemu: blockjob: Add modern block job event handler
qemu: process: Refresh -blockdev based blockjobs on reconnect to qemu
conf: export virDomainDiskBackingStoreParse
conf: export virDomainDiskBackingStoreFormat
qemu: blockjob: Track orphaned backing chains in blockjob status XML
qemu: Detect managed persistent reservations in block job orphan
chains
qemu: blockjob: Unplug inherited storage chains when concluding
blockjob
qemu: hotplug: Transfer ownership of backing chain to block job on
disk unplug
src/conf/domain_conf.c | 4 +-
src/conf/domain_conf.h | 13 +
src/libvirt_private.syms | 2 +
src/qemu/qemu_blockjob.c | 465 ++++++++++++++++--
src/qemu/qemu_blockjob.h | 40 +-
src/qemu/qemu_domain.c | 327 +++++++++++-
src/qemu/qemu_domain.h | 9 +
src/qemu/qemu_driver.c | 64 +--
src/qemu/qemu_hotplug.c | 19 +-
src/qemu/qemu_migration.c | 6 +-
src/qemu/qemu_process.c | 89 +++-
.../blockjob-blockdev-in.xml | 403 +++++++++++++++
.../blockjob-blockdev-out.xml | 1 +
tests/qemuxml2xmltest.c | 2 +
14 files changed, 1349 insertions(+), 95 deletions(-)
create mode 100644 tests/qemustatusxml2xmldata/blockjob-blockdev-in.xml
create mode 120000 tests/qemustatusxml2xmldata/blockjob-blockdev-out.xml
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] remote: increase daemon shutdown timer to 2 minutes
by Daniel P. Berrangé
Shutting down the daemon after 30 seconds of being idle is a little bit
too aggressive. Especially when using 'virsh' in single-shot mode, as
opposed to interactive shell mode, it would not be unusual to have
more than 30 seconds between commands. This will lead to the daemon
shutting down and starting up between a series of commands.
Increasing the shutdown timer to 2 minutes will make it less likely that
the daemon will shutdown while the user is in the middle of a series of
commands.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/remote/libvirtd.service.in | 2 +-
src/rpc/virnetsocket.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 2e51429e7a..3ddf0e229b 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -25,7 +25,7 @@ EnvironmentFile=-/etc/sysconfig/libvirtd
# VMs can be performed. We don't want it to stick around if
# unused though, so we set a timeout. The socket activation
# then ensures it gets started again if anything needs it
-ExecStart=@sbindir@/libvirtd --timeout 30 $LIBVIRTD_ARGS
+ExecStart=@sbindir@/libvirtd --timeout 120 $LIBVIRTD_ARGS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 34a9947eb3..3282bc0817 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -137,7 +137,7 @@ static int virNetSocketForkDaemon(const char *binary)
{
int ret;
virCommandPtr cmd = virCommandNewArgList(binary,
- "--timeout=30",
+ "--timeout=120",
NULL);
virCommandAddEnvPassCommon(cmd);
--
2.21.0
5 years, 5 months