[libvirt] [libvirt PATCH v2 0/4] Share cgroup code that is duplicated between QEMU and LXC
by Fabiano Fidêncio
virLXCCgroupSetupBlkioTune() and qemuSetupBlkioCgroup() and
virLXCCgroupSetupCpuTune() and qemuSetupCpuCgroup() are the most similar
functions between QEMU and LXC code.
Let's move their common code to virCgroup.
Mind that the first two patches are basically preparing the ground for
the changes introduced in the last two patches.
changes since v1:
- Michal Privoznik pointed out (as did the `make syntax-check` :-)) that
we do want to keep src/util independently of the parsing code (thus,
including "conf/domain_conf.h" in vircgroup.h is not the way to go).
This has been solved now by partially following Michal's suggestion
and splitting the structs and functions that would be use in the
common code to new different files.
Fabiano Fidêncio (4):
domain_conf: split out virBlkioDevice and virDomainBlkiotune
definitions
domain_conf: split out virDomainMemtune and virDomainHugePage
definitions
vircgroup: Add virCgroupSetupBlkioTune()
vircgroup: Add virCgroupSetupMemTune()
src/Makefile.am | 1 +
src/conf/domain_conf.c | 22 ++++--------
src/conf/domain_conf.h | 70 +++----------------------------------
src/libvirt_private.syms | 2 ++
src/lxc/lxc_cgroup.c | 69 ++-----------------------------------
src/qemu/qemu_cgroup.c | 61 ++-------------------------------
src/qemu/qemu_command.c | 4 +--
src/util/Makefile.inc.am | 2 ++
src/util/virblkio.c | 37 ++++++++++++++++++++
src/util/virblkio.h | 52 ++++++++++++++++++++++++++++
src/util/vircgroup.c | 74 ++++++++++++++++++++++++++++++++++++++++
src/util/vircgroup.h | 7 ++++
src/util/virmem.h | 66 +++++++++++++++++++++++++++++++++++
13 files changed, 259 insertions(+), 208 deletions(-)
create mode 100644 src/util/virblkio.c
create mode 100644 src/util/virblkio.h
create mode 100644 src/util/virmem.h
--
2.17.1
6 years, 7 months
[libvirt] [PATCH 0/4] cfg.mk: Introduce syntax-check rule for incorrect indentation or empty line in function body
by Shi Lei
This series introduce syntax-check rule for below:
1. For incorrect indentation of the first line in function body
int foo(int a0, ...)
{
[NOT 4 spaces]int first-line;
... ...
}
2. For empty first line of function body
int foo(int a0, ...)
{
[empty line]
int second-line;
... ...
}
And it *ignores* the conditions as below:
1. For macros just as #if/#ifdef
int foo(int a0, ...)
{
#if ANYTHING
int second-line;
... ...
}
2. For comments
int foo(int a0, ...)
{
/* comments */
int second-line;
... ...
}
3. For empty function body
int foo(void)
{
}
^ This function has NO content
4. For labels
{
readmore:
int second-line;
... ...
goto readmore;
... ...
}
Shi Lei (4):
cfg.mk: Introduce syntax-check rule for incorrect indentation or empty
line in function body
src: fix incorrect indentation or empty first line in function body
tests: fix incorrect indentation or empty first line in function body
tools: fix incorrect indentation or empty first line in function body
cfg.mk | 11 +++
src/bhyve/bhyve_command.c | 3 -
src/bhyve/bhyve_conf.c | 6 +-
src/bhyve/bhyve_driver.c | 33 ++++---
src/bhyve/bhyve_monitor.c | 1 -
src/bhyve/bhyve_process.c | 1 -
src/conf/cpu_conf.c | 1 -
src/conf/domain_capabilities.c | 1 -
src/conf/domain_conf.c | 12 +--
src/conf/network_conf.c | 2 -
src/cpu/cpu_s390.c | 82 ++++++++---------
src/cpu/cpu_x86.c | 1 -
src/esx/esx_vi_types.c | 2 +-
src/locking/lock_driver_nop.c | 1 -
src/network/bridge_driver.c | 1 -
src/network/bridge_driver_linux.c | 1 -
src/nwfilter/nwfilter_learnipaddr.c | 1 -
src/phyp/phyp_driver.c | 1 -
src/qemu/qemu_alias.c | 1 -
src/qemu/qemu_domain_address.c | 1 -
src/qemu/qemu_driver.c | 1 -
src/qemu/qemu_monitor.c | 1 -
src/qemu/qemu_monitor_json.c | 1 -
src/qemu/qemu_process.c | 1 -
src/storage/storage_backend_sheepdog.c | 3 -
src/storage/storage_driver.c | 1 -
src/storage/storage_util.c | 1 -
src/test/test_driver.c | 2 -
src/util/vircommand.c | 6 +-
src/util/virdbuspriv.h | 18 ++--
src/util/virdnsmasq.c | 1 -
src/util/virfile.c | 1 -
src/util/virnetdev.c | 55 ++++++------
src/util/virnetdevmacvlan.c | 11 ++-
src/util/virnetdevvportprofile.c | 2 +-
src/util/virstoragefile.c | 1 -
src/util/virutil.c | 3 +-
src/vbox/vbox_storage.c | 1 -
src/vz/vz_driver.c | 1 -
src/vz/vz_sdk.c | 1 -
src/xenapi/xenapi_driver.c | 2 -
src/xenconfig/xen_common.c | 9 +-
tests/qemuxml2argvmock.c | 2 +-
tests/sexpr2xmltest.c | 30 +++----
tests/virnetdevmock.c | 1 -
tests/virnettlshelpers.c | 18 ++--
tests/virshtest.c | 118 ++++++++++++-------------
tests/vshtabletest.c | 3 -
tests/xml2sexprtest.c | 24 ++---
tools/virsh-volume.c | 1 -
tools/virt-admin.c | 1 -
51 files changed, 218 insertions(+), 266 deletions(-)
--
2.17.1
6 years, 7 months
[libvirt] [PATCHv2 0/5] Introduce VIR_AUTOCLOSE macro for closing fd automatically
by Shi Lei
v1 here:
https://www.redhat.com/archives/libvir-list/2018-September/msg00319.html
Diff from v1:
- Change VIR_AUTOCLOSE macro (comments from Michal)
- Remove others except for patches in util (comments from Erik)
- Change sc_require_attribute_cleanup_initialization for this macro
Shi Lei (5):
util: file: introduce VIR_AUTOCLOSE macro to close fd of the file
automatically
cfg.mk: Change syntax-check rule for VIR_AUTOCLOSE variable
initialization
util: file: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE
util: netdevbridge: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE
util: netdev: use VIR_AUTOCLOSE instead of VIR_FORCE_CLOSE
cfg.mk | 2 +-
src/util/virfile.c | 21 ++--
src/util/virfile.h | 18 ++-
src/util/virnetdev.c | 251 +++++++++++++------------------------
src/util/virnetdevbridge.c | 120 ++++++------------
5 files changed, 146 insertions(+), 266 deletions(-)
--
2.17.1
6 years, 7 months
[libvirt] [PATCH 0/3] qemu: Drop some cruft
by Andrea Bolognani
No longer needed since we bumped our minimum QEMU version
to 1.5.0.
Andrea Bolognani (3):
qemu: Drop QEMU_CAPS_VNC_WEBSOCKET
qemu: Drop QEMU_CAPS_CHARDEV_SPICEPORT
qemu: Drop redundant version checks
src/qemu/qemu_capabilities.c | 27 +++++--------------
src/qemu/qemu_capabilities.h | 4 +--
src/qemu/qemu_command.c | 14 +---------
.../caps_1.5.3.x86_64.xml | 2 --
.../caps_1.6.0.x86_64.xml | 2 --
.../caps_1.7.0.x86_64.xml | 2 --
.../caps_2.1.1.x86_64.xml | 2 --
.../caps_2.10.0.aarch64.xml | 2 --
.../caps_2.10.0.ppc64.xml | 2 --
.../caps_2.10.0.s390x.xml | 2 --
.../caps_2.10.0.x86_64.xml | 2 --
.../caps_2.11.0.s390x.xml | 2 --
.../caps_2.11.0.x86_64.xml | 2 --
.../caps_2.12.0.aarch64.xml | 2 --
.../caps_2.12.0.ppc64.xml | 2 --
.../caps_2.12.0.s390x.xml | 2 --
.../caps_2.12.0.x86_64.xml | 2 --
.../caps_2.4.0.x86_64.xml | 2 --
.../caps_2.5.0.x86_64.xml | 2 --
.../caps_2.6.0.aarch64.xml | 2 --
.../qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 2 --
.../caps_2.6.0.x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_2.7.0.s390x.xml | 2 --
.../caps_2.7.0.x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 --
.../caps_2.8.0.x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 2 --
.../qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 --
.../caps_2.9.0.x86_64.xml | 2 --
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 2 --
.../caps_3.0.0.riscv32.xml | 2 --
.../caps_3.0.0.riscv64.xml | 2 --
.../caps_3.0.0.x86_64.xml | 2 --
tests/qemuxml2argvtest.c | 6 ++---
34 files changed, 12 insertions(+), 99 deletions(-)
--
2.17.1
6 years, 7 months
[libvirt] [PATCH 0/2] Remove some unnecessary warnings
by Martin Kletzander
cd .
./blurb
Martin Kletzander (2):
Add functions for checking if user or group exists
qemu: Report less errors on driver startup
src/libvirt_private.syms | 2 ++
src/qemu/qemu_conf.c | 6 ++++--
src/util/virutil.c | 40 ++++++++++++++++++++++++++++++++--------
src/util/virutil.h | 4 ++++
4 files changed, 42 insertions(+), 10 deletions(-)
--
2.18.0
6 years, 7 months
[libvirt] [PATCH v7 0/2] deprecate incorrect CPUs topolog
by Igor Mammedov
Changelog since v5:
* add(v6) and then remove(v7) Notes section to/from deprication doc
(Eduardo Habkost <ehabkost(a)redhat.com>)
* fix up wording and math formating in deprication doc
(Eduardo Habkost <ehabkost(a)redhat.com>)
* drop !socket check as it always evaluates to true at that point
(Eduardo Habkost <ehabkost(a)redhat.com>)
Changelog since v4:
* extend deprication doc, adding that maxcpus should be multiple of
present on CLI [sockets/cores/threads] options
(Eduardo Habkost <ehabkost(a)redhat.com>)
series bundles together 2 related patches posted separately earlier:
vl.c deprecate incorrect CPUs topology
vl:c: make sure that sockets are calculated correctly in '-smp X' case
Goal is to depricate invalid topologies so we could make sure that topology
configuration is correct by forbidding invalid input once deprecation
period ends.
---
CC: libvir-list(a)redhat.com
CC: ehabkost(a)redhat.com
Igor Mammedov (2):
vl.c deprecate incorrect CPUs topology
vl:c: make sure that sockets are calculated correctly in '-smp X' case
qemu-deprecated.texi | 13 +++++++++++++
vl.c | 12 +++++++++++-
2 files changed, 24 insertions(+), 1 deletion(-)
--
2.7.4
6 years, 7 months
[libvirt] [PATCH v5 0/2] deprecate incorrect CPUs topology
by Igor Mammedov
Changelog since v4:
* extend deprication doc, adding that maxcpus should be multiple of
present on CLI [sockets/cores/threads] options
(Eduardo Habkost <ehabkost(a)redhat.com>)
series bundles together 2 related patches posted separately earlier:
vl.c deprecate incorrect CPUs topology
vl:c: make sure that sockets are calculated correctly in '-smp X' case
Goal is to depricate invalid topologies so we could make sure that topology
configuration is correct by forbidding invalid input once deprecation
period ends.
---
CC: libvir-list(a)redhat.com
CC: drjones(a)redhat.com
CC: ehabkost(a)redhat.com
Igor Mammedov (2):
vl.c deprecate incorrect CPUs topology
vl:c: make sure that sockets are calculated correctly in '-smp X' case
qemu-deprecated.texi | 19 +++++++++++++++++++
vl.c | 12 +++++++++++-
2 files changed, 30 insertions(+), 1 deletion(-)
--
2.7.4
6 years, 7 months
[libvirt] [PATCHv2 0/7] qemuxml2argvtest cleanups
by Ján Tomko
Patch 1 and patch 3 were not acked in v1.
The changes to the ACKed ones are minimal.
Complete diff to v2:
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 867e0d569f..0e43320b96 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -460,20 +460,20 @@ testCompareXMLToStartupXML(const void *data)
}
-# define TEST_EXCLUSIVE_FLAGS(FLAG1, FLAG2) \
- if ((testFlags & FLAG1) && (testFlags & FLAG2)) { \
- VIR_TEST_DEBUG("Flags %s and %s are mutually exclusive\n", \
- #FLAG1, #FLAG2); \
- return -1; \
- }
-
-
static int
-testCheckExclusiveFlags(int testFlags ATTRIBUTE_UNUSED)
+testCheckExclusiveFlags(int flags)
{
- TEST_EXCLUSIVE_FLAGS(FLAG_STEAL_VM, FLAG_EXPECT_FAILURE);
- TEST_EXCLUSIVE_FLAGS(FLAG_STEAL_VM, FLAG_EXPECT_PARSE_ERROR);
- TEST_EXCLUSIVE_FLAGS(FLAG_REAL_CAPS, FLAG_SKIP_LEGACY_CPUS);
+ virCheckFlags(FLAG_EXPECT_FAILURE |
+ FLAG_EXPECT_PARSE_ERROR |
+ FLAG_FIPS |
+ FLAG_STEAL_VM |
+ FLAG_REAL_CAPS |
+ FLAG_SKIP_LEGACY_CPUS |
+ 0, -1);
+
+ VIR_EXCLUSIVE_FLAGS_RET(FLAG_STEAL_VM, FLAG_EXPECT_FAILURE, -1);
+ VIR_EXCLUSIVE_FLAGS_RET(FLAG_STEAL_VM, FLAG_EXPECT_PARSE_ERROR, -1);
+ VIR_EXCLUSIVE_FLAGS_RET(FLAG_REAL_CAPS, FLAG_SKIP_LEGACY_CPUS, -1);
return 0;
}
Ján Tomko (7):
tests: add a function for checking exclusive flags
tests: introduce macro for qemu XML->startup XML
tests: only run startup XML tests if requested
tests: report errors in QEMU XML->startup XML tests
tests: do not mangle real qemu caps in xml2argvtest
tests: turn skipLegacyCPUs into a flag
qemu: remove unnecessary virQEMUCapsFreeHostCPUModel
src/qemu/qemu_capabilities.c | 25 ++-------------
src/qemu/qemu_capspriv.h | 5 ---
tests/qemuxml2argvtest.c | 74 ++++++++++++++++++++++++++++----------------
3 files changed, 49 insertions(+), 55 deletions(-)
--
2.16.4
6 years, 7 months
[libvirt] [jenkins-ci PATCH v2 0/2] Enable libosinfo tests that require network connectivity
by Fabiano Fidêncio
Let's enable both media and tree uris tests in order to early catch URL
changes that need to be fixed in osinfo-db.
Fabiano Fidêncio (2):
guests: Enable {media,tree}uris tests for libosinfo
projects: Enable {media,tree}uri tests for libosinfo
guests/playbooks/build/projects/libosinfo.yml | 4 ++++
projects/libosinfo.yaml | 3 +++
2 files changed, 7 insertions(+)
--
2.17.1
6 years, 7 months