[libvirt] [PATCH] qemu: Changes in parsing qemu commandline memory section
by Kothapally Madhu Pavan
Existing qemuParseCommandLineMem() will parse "-m 4G" format string.
This patch allows it to parse "-m size=8126464k,slots=32,maxmem=33554432k"
format along with existing format.
Signed-off-by: Kothapally Madhu Pavan <kmp(a)linux.vnet.ibm.com>
---
src/qemu/qemu_parse_command.c | 89 +++++++++++++++++++++++++++++++++++++------
1 file changed, 77 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 37e1149..c30e8ed 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -1629,26 +1629,91 @@ static int
qemuParseCommandLineMem(virDomainDefPtr dom,
const char *val)
{
- unsigned long long mem;
+ unsigned long long mem = 0;
+ unsigned long long size = 0;
+ unsigned long long maxmem = 0;
+ unsigned int slots = 0;
char *end;
+ size_t i;
+ int nkws;
+ char **kws;
+ char **vals;
+ int n;
+ int ret = -1;
- if (virStrToLong_ull(val, &end, 10, &mem) < 0) {
+ if (qemuParseKeywords(val, &kws, &vals, &nkws, 1) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot parse memory level '%s'"), val);
- return -1;
+ _("cannot parse memory '%s'"), val);
+ goto cleanup;
}
- if (virScaleInteger(&mem, end, 1024*1024, ULLONG_MAX) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot scale memory: %s"),
- virGetLastErrorMessage());
- return -1;
+ for (i = 0; i < nkws; i++) {
+ if (vals[i] == NULL) {
+ if (i > 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot parse memory '%s'"), val);
+ goto cleanup;
+ }
+ if (virStrToLong_ull(kws[i], &end, 10, &mem) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot parse memory level '%s'"), kws[i]);
+ goto cleanup;
+ }
+ if (virScaleInteger(&mem, end, 1024*1024, ULLONG_MAX) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot scale memory: %s"),
+ virGetLastErrorMessage());
+ goto cleanup;
+ }
+
+ size = mem;
+
+ } else {
+ if (STREQ(kws[i], "size") || STREQ(kws[i], "maxmem")) {
+ if (virStrToLong_ull(vals[i], &end, 10, &mem) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot parse memory level '%s'"), vals[i]);
+ goto cleanup;
+ }
+ if (virScaleInteger(&mem, end, 1024*1024, ULLONG_MAX) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot scale memory: %s"),
+ virGetLastErrorMessage());
+ goto cleanup;
+ }
+
+ STREQ(kws[i], "size") ? (size = mem) : (maxmem = mem);
+
+ }
+ if (STREQ(kws[i], "slots")) {
+ if (virStrToLong_i(vals[i], &end, 10, &n) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot parse slots value '%s'"), vals[i]);
+ goto cleanup;
+ }
+
+ slots = n;
+
+ }
+ }
}
- virDomainDefSetMemoryTotal(dom, mem / 1024);
- dom->mem.cur_balloon = mem / 1024;
+ virDomainDefSetMemoryTotal(dom, size / 1024);
+ dom->mem.cur_balloon = size / 1024;
+ dom->mem.memory_slots = slots;
+ dom->mem.max_memory = maxmem;
- return 0;
+ ret = 0;
+
+ cleanup:
+ for (i = 0; i < nkws; i++) {
+ VIR_FREE(kws[i]);
+ VIR_FREE(vals[i]);
+ }
+ VIR_FREE(kws);
+ VIR_FREE(vals);
+
+ return ret;
}
--
1.8.3.1
7 years, 2 months
[libvirt] [PATCH] apparmor: add dnsmasq ptrace rule to libvirtd profile
by Jim Fehlig
Commit b482925c added ptrace rule for the apparmor profiles,
but one was missed in the libvirtd profile for dnsmasq. It was
overlooked since the test machine did not have an active libvirt
network requiring dnsmasq that was also set to autostart. With
one active and set to autostart, the following denial is observed
in audit.log when restarting libvirtd
type=AVC msg=audit(1507320136.306:298): apparmor="DENIED" \
operation="ptrace" profile="/usr/sbin/libvirtd" pid=5472 \
comm="libvirtd" requested_mask="trace" denied_mask="trace" \
peer="/usr/sbin/dnsmasq"
With an active network, I suspect a libvirtd restart causes access
to /proc/<dnsmasq-pid>/*, hence the resulting denial. As a nasty
side affect of the denial, libvirtd thinks it needs to spawn a
dnsmasq process even though one is already running for the network.
E.g. after two libvirtd restarts
dnsmasq 1683 0.0 0.0 51188 2612 ? S 12:03 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
root 1684 0.0 0.0 51160 576 ? S 12:03 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
dnsmasq 4706 0.0 0.0 51188 2572 ? S 13:54 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
root 4707 0.0 0.0 51160 572 ? S 13:54 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
dnsmasq 4791 0.0 0.0 51188 2580 ? S 13:56 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
root 4792 0.0 0.0 51160 572 ? S 13:56 0:00 \
/usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \
--leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper
A simple fix is to add a ptrace rule for dnsmasq.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
examples/apparmor/usr.sbin.libvirtd | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
index fa4ebb355..819068ffc 100644
--- a/examples/apparmor/usr.sbin.libvirtd
+++ b/examples/apparmor/usr.sbin.libvirtd
@@ -39,6 +39,7 @@
ptrace (trace) peer=unconfined,
ptrace (trace) peer=/usr/sbin/libvirtd,
+ ptrace (trace) peer=/usr/sbin/dnsmasq,
ptrace (trace) peer=libvirt-*,
# Very lenient profile for libvirtd since we want to first focus on confining
--
2.14.1
7 years, 2 months
[libvirt] [PATCH] build: exclude more files from all the syntax checks
by Pino Toscano
The majority of the syntax check is taylored for C sources, so some of
the checks already cause false positives for non-C sources (and thus
there are exclusion regexps in place).
Instead, just exclude more non-C files from all the checks:
- pot files: they are templates for po files (already excluded), and
they are automatically generated from sources
- pl files: Perl sources, which have own APIs, style, etc; they are
helper scripts, not "real" sources
- spec/spec.in files: RPM packaging files
- js/woff/html.in files: files for web pages
- diff/patch files: patches
- stp files: SystemTap scripts
- syms files: linker symbols files
- conf files: generic configuration files
- data/cpuinfo files: procinfo/cpuinfo files
Python files (.py) are left allowed, since there is at least one syntax
check specifically for them.
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
cfg.mk | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 0f4065b98..44a19594e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -91,7 +91,7 @@ endif
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = \
- (^(docs/(news(-[0-9]*)?\.html\.in|.*\.patch))|\.(po|fig|gif|ico|png))$$
+ \.(po|fig|gif|ico|png|pot|pl|spec|spec\.in|js|woff|diff|patch|html\.in|stp|syms|conf|data|cpuinfo)$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
@@ -1129,12 +1129,12 @@ exclude_file_name_regexp--sc_flags_usage = \
^(cfg\.mk|docs/|src/util/virnetdevtap\.c$$|tests/((vir(cgroup|pci|test|usb)|nss|qemuxml2argv)mock|virfilewrapper)\.c$$)
exclude_file_name_regexp--sc_libvirt_unmarked_diagnostics = \
- ^(src/rpc/gendispatch\.pl$$|tests/)
+ ^tests/
-exclude_file_name_regexp--sc_po_check = ^(docs/|src/rpc/gendispatch\.pl$$)
+exclude_file_name_regexp--sc_po_check = ^(docs/)
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
- ^(cfg\.mk|include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c|docs/internals/oomtesting\.html\.in)$$
+ ^(cfg\.mk|include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virerror\.c)$$
exclude_file_name_regexp--sc_prohibit_PATH_MAX = \
^cfg\.mk$$
@@ -1143,16 +1143,16 @@ exclude_file_name_regexp--sc_prohibit_access_xok = \
^(cfg\.mk|src/util/virutil\.c)$$
exclude_file_name_regexp--sc_prohibit_asprintf = \
- ^(cfg\.mk|bootstrap.conf$$|examples/|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
+ ^(cfg\.mk|examples/|src/util/virstring\.[ch]$$|tests/vircgroupmock\.c$$)
exclude_file_name_regexp--sc_prohibit_strdup = \
^(docs/|examples/|src/util/virstring\.c|tests/vir(netserverclient|cgroup)mock.c|tests/commandhelper\.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
- (\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c|tests/commandhelper\.c)$$)
+ (\.py$$|^docs/|^(src/util/virfile\.c|src/libvirt-stream\.c|tests/vir.+mock\.c|tests/commandhelper\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
- (^tests/(qemuhelp|virhostcpu|virpcitest)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)
+ (^tests/(qemuhelp|virhostcpu|virpcitest)data/)
_src2=src/(util/vircommand|libvirt|lxc/lxc_controller|locking/lock_daemon|logging/log_daemon)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
@@ -1163,17 +1163,14 @@ exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/virutil\.c$$
exclude_file_name_regexp--sc_prohibit_internal_functions = \
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
-exclude_file_name_regexp--sc_prohibit_newline_at_end_of_diagnostic = \
- ^src/rpc/gendispatch\.pl$$
-
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
- ^((po|tests)/|docs/.*(py|js|html\.in)|run.in$$|tools/wireshark/util/genxdrstub\.pl$$)
+ ^(tests/|docs/.*py|run.in$$)
exclude_file_name_regexp--sc_prohibit_select = \
^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_raw_allocation = \
- ^(docs/hacking\.html\.in|src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$
+ ^(src/util/viralloc\.[ch]|examples/.*|tests/(securityselinuxhelper|(vircgroup|nss)mock|commandhelper)\.c|tools/wireshark/src/packet-libvirt\.c)$$
exclude_file_name_regexp--sc_prohibit_readlink = \
^src/(util/virutil|lxc/lxc_container)\.c$$
@@ -1181,7 +1178,7 @@ exclude_file_name_regexp--sc_prohibit_readlink = \
exclude_file_name_regexp--sc_prohibit_setuid = ^src/util/virutil\.c$$
exclude_file_name_regexp--sc_prohibit_sprintf = \
- ^(cfg\.mk|docs/hacking\.html\.in|.*\.stp|.*\.pl)$$
+ ^cfg\.mk$$
exclude_file_name_regexp--sc_prohibit_strncpy = ^src/util/virstring\.c$$
@@ -1200,10 +1197,10 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$)
exclude_file_name_regexp--sc_trailing_blank = \
- /qemuhelpdata/|/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo$$
+ /qemuhelpdata/
exclude_file_name_regexp--sc_unmarked_diagnostics = \
- ^(docs/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
+ ^(docs/apibuild.py|tests/virt-aa-helper-test)$$
exclude_file_name_regexp--sc_size_of_brackets = cfg.mk
@@ -1243,7 +1240,7 @@ exclude_file_name_regexp--sc_prohibit_devname = \
^(tools/virsh.pod|cfg.mk|docs/.*)$$
exclude_file_name_regexp--sc_prohibit_virXXXFree = \
- ^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|src/libvirt_public.syms|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$)
+ ^(docs/|tests/|examples/|tools/|cfg.mk|src/test/test_driver.c|include/libvirt/libvirt-(domain|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).h|src/libvirt-(domain|qemu|network|nodedev|storage|stream|secret|nwfilter|interface|domain-snapshot).c$$)
exclude_file_name_regexp--sc_prohibit_sysconf_pagesize = \
^(cfg\.mk|src/util/virutil\.c)$$
--
2.13.6
7 years, 2 months
[libvirt] [PATCH v1] build: isolate core libvirt libs deps from xen runtime
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
Generating libvirt packages per make rpm, "with-libxl=1" and "with-xen=1",
adds strict runtime dependencies per libxenlight for xen-libs package from
core libvirt-libs package. This is not necessary and unfortunate since
those dependencies set demand to "xen-libs" package even when there's no
need for libvirt xen or libxl driver components.
This patch is to have two separate xenconfig lib tool libraries: one for
core libvirt (without XL), and a another that contains xl for libxl driver
(libvirt_driver_libxl_impl.la) which when loading the driver, loads the
remaining symbols (xen{Format,Parse}XL. For the user/sysadmin, this means
the xen dependencies are moved into libxl driver, instead of core libvirt.
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
Signed-off-by: Wim ten Have <wim.ten.have(a)oracle.com>
---
src/Makefile.am | 23 +++++++++++++----------
src/libvirt_xenxlconfig.syms | 12 ------------
2 files changed, 13 insertions(+), 22 deletions(-)
delete mode 100644 src/libvirt_xenxlconfig.syms
diff --git a/src/Makefile.am b/src/Makefile.am
index 173fba1e6..b74856ba7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1197,7 +1197,8 @@ XENCONFIG_SOURCES = \
xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h \
xenconfig/xen_xm.c xenconfig/xen_xm.h
if WITH_LIBXL
-XENCONFIG_SOURCES += \
+XENCONFIG_LIBXL_SOURCES = \
+ $(XENCONFIG_SOURCES) \
xenconfig/xen_xl.c xenconfig/xen_xl.h
endif WITH_LIBXL
@@ -1258,10 +1259,17 @@ endif WITH_VMX
if WITH_XENCONFIG
noinst_LTLIBRARIES += libvirt_xenconfig.la
libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la
-libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS)
libvirt_xenconfig_la_CFLAGS = \
- -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES)
+
+if WITH_LIBXL
+noinst_LTLIBRARIES += libvirt_xenconfig_libxl.la
+libvirt_xenconfig_libxl_la_LIBADD = $(LIBXL_LIBS)
+libvirt_xenconfig_libxl_la_CFLAGS = \
+ -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+libvirt_xenconfig_libxl_la_SOURCES = $(XENCONFIG_LIBXL_SOURCES)
+endif WITH_LIBXL
endif WITH_XENCONFIG
@@ -1417,7 +1425,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = \
$(AM_CFLAGS)
libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \
- libvirt_xenconfig.la \
+ libvirt_xenconfig_libxl.la \
libvirt_secret.la
libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES)
@@ -2045,6 +2053,7 @@ EXTRA_DIST += \
$(VBOX_DRIVER_EXTRA_DIST) \
$(VMWARE_DRIVER_SOURCES) \
$(XENCONFIG_SOURCES) \
+ $(XENCONFIG_LIBXL_SOURCES) \
$(ACCESS_DRIVER_POLKIT_POLICY)
check-local: check-augeas
@@ -2228,12 +2237,6 @@ else ! WITH_XENCONFIG
SYM_FILES += $(srcdir)/libvirt_xenconfig.syms
endif ! WITH_XENCONFIG
-if WITH_LIBXL
-USED_SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms
-else ! WITH_LIBXL
-SYM_FILES += $(srcdir)/libvirt_xenxlconfig.syms
-endif ! WITH_LIBXL
-
if WITH_SASL
USED_SYM_FILES += $(srcdir)/libvirt_sasl.syms
else ! WITH_SASL
diff --git a/src/libvirt_xenxlconfig.syms b/src/libvirt_xenxlconfig.syms
deleted file mode 100644
index dbe43aac7..000000000
--- a/src/libvirt_xenxlconfig.syms
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# These symbols are dependent upon --with-libxl via WITH_LIBXL.
-#
-
-#xenconfig/xen_xl.h
-xenFormatXL;
-xenParseXL;
-
-# Let emacs know we want case-insensitive sorting
-# Local Variables:
-# sort-fold-case: t
-# End:
--
2.13.6
7 years, 2 months
[libvirt] [PATCH REPOST 0/6] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #2)
by John Ferlan
Since the original series (19 patches):
https://www.redhat.com/archives/libvir-list/2017-September/msg00594.html
didn't garner any attention, I'm going with smaller patch piles to make
forward progress.
This series is the first half of the storage backend changes to use
the virStoragePoolObjGetDef accessor.
The next/last series will be the next half, plus the change to move
virStoragePoolObj and virStorageVolDefList into virstoragepoolobj.c.
After that adjustments to virstoragepoolobj similar to other drivers
and perhaps even generating a virStorageVolObjPtr - e.g. a hash table
of volume defs rather than a linked list of defs.
John Ferlan (6):
storage: Use virStoragePoolObjGetDef accessor for storage_util
storage: Use virStoragePoolObjGetDef accessor for Disk backend
storage: Use virStoragePoolObjGetDef accessor for Logical backend
storage: Use virStoragePoolObjGetDef accessor for Sheepdog backend
storage: Use virStoragePoolObjGetDef accessor for FS backend
storage: Use virStoragePoolObjGetDef accessor for Gluster backend
src/storage/storage_backend_disk.c | 98 ++++++++++++++++------------
src/storage/storage_backend_fs.c | 90 +++++++++++++------------
src/storage/storage_backend_gluster.c | 20 +++---
src/storage/storage_backend_logical.c | 63 ++++++++++--------
src/storage/storage_backend_sheepdog.c | 23 ++++---
src/storage/storage_util.c | 116 ++++++++++++++++++---------------
6 files changed, 230 insertions(+), 180 deletions(-)
--
2.13.6
7 years, 2 months
[libvirt] [PATCH 0/2] format vgamem_mb on QEMU command line for cirrus video
by Pavel Hrdina
Pavel Hrdina (2):
qemu: caps: add QEMU_CAPS_CIRRUS_VGAMEM capability
qemu: format vgamem_mb on QEMU command line for cirrus video
src/qemu/qemu_capabilities.c | 8 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 3 +
.../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 58 ++++++++++----
.../qemucapabilitiesdata/caps_1.3.1.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_1.4.2.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 62 +++++++++++----
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 44 ++++++-----
.../caps_2.10.0.x86_64.replies | 91 ++++++++++++++++------
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 67 ++++++++++++----
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 69 +++++++++++-----
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.replies | 44 ++++++-----
.../caps_2.6.0-gicv3.aarch64.replies | 44 ++++++-----
.../caps_2.6.0.ppc64le.replies | 44 ++++++-----
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 69 +++++++++++-----
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 40 ++++++----
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 74 +++++++++++++-----
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 44 ++++++-----
.../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 74 +++++++++++++-----
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 +
.../caps_2.9.0.ppc64le.replies | 44 ++++++-----
.../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 44 ++++++-----
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 91 ++++++++++++++++------
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 +
.../qemuxml2argv-video-cirrus-vgamem.args | 22 ++++++
.../qemuxml2argv-video-cirrus-vgamem.xml | 22 ++++++
tests/qemuxml2argvtest.c | 4 +
41 files changed, 999 insertions(+), 387 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-video-cirrus-vgamem.xml
--
2.13.6
7 years, 2 months
[libvirt] [PATCH REPOST 0/6] Privatize _virStoragePoolObj and _virStorageVolDefList (Batch #1)
by John Ferlan
Since the previous series (19 patches):
https://www.redhat.com/archives/libvir-list/2017-September/msg00594.html
didn't garner any attention, let me try with smaller patch piles with the
hope that forward progress will be made.
The only "new" one in this series from the other is patch2 - something
that Coverity let me know about in an error scenario.
Essentially the bulk of these patches remove direct obj->def referencing
in favor of a virStoragePoolObjGetDef call.
John Ferlan (6):
conf: Fix prototype/definition for virStoragePoolObj get functions
tests: Fix possible NULL deref
storage: Use virStoragePoolObjGetDef accessor for driver
test: Rename @vol to @volDef in testOpenVolumesForPool
test: Create local virStoragePoolObjPtr VolLookup APIs
test: Use virStoragePoolObjGetDef accessor
src/conf/virstorageobj.c | 4 +-
src/conf/virstorageobj.h | 4 +-
src/storage/storage_driver.c | 411 +++++++++++++++++++++++------------------
src/test/test_driver.c | 203 +++++++++++---------
tests/storagevolxml2argvtest.c | 3 +-
5 files changed, 352 insertions(+), 273 deletions(-)
--
2.13.6
7 years, 2 months
[libvirt] [RFC PATCH] build: isolate core libvirt libs deps from xen runtime
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
Generating libvirt packages per make rpm, "with_libxl=1" and "with_xen=1",
adds strict runtime dependencies per libxenlight for xen-libs package from
core libvirt-libs package. This is not necessary and unfortunate since
those dependencies set demand to "xen-libs" package even when there's no
need for libvirt xen or libxl driver components.
This patch is to have two separate xenconfig lib tool libraries: one for
core libvirt (without XL), and a another that contains xl for libxl driver
(libvirt_driver_libxl_impl.la) which when loading the driver, loads the
remaining symbols (xen{Format,Parse}XL. For the user/sysadmin, this means
the xen dependencies are moved into libxl driver, instead of core libvirt.
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
Signed-off-by: Wim ten Have <wim.ten.have(a)oracle.com>
---
src/Makefile.am | 17 +++++++++++++----
src/libvirt_xenxlconfig.syms | 2 --
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 173fba1e6..80fa2feba 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1197,7 +1197,8 @@ XENCONFIG_SOURCES = \
xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h \
xenconfig/xen_xm.c xenconfig/xen_xm.h
if WITH_LIBXL
-XENCONFIG_SOURCES += \
+XENCONFIG_LIBXL_SOURCES = \
+ $(XENCONFIG_SOURCES) \
xenconfig/xen_xl.c xenconfig/xen_xl.h
endif WITH_LIBXL
@@ -1258,10 +1259,17 @@ endif WITH_VMX
if WITH_XENCONFIG
noinst_LTLIBRARIES += libvirt_xenconfig.la
libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la
-libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS)
libvirt_xenconfig_la_CFLAGS = \
- -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+ -I$(srcdir)/conf $(AM_CFLAGS)
libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES)
+
+if WITH_LIBXL
+noinst_LTLIBRARIES += libvirt_xenconfig_libxl.la
+libvirt_xenconfig_libxl_la_LIBADD = $(LIBXL_LIBS)
+libvirt_xenconfig_libxl_la_CFLAGS = \
+ -I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+libvirt_xenconfig_libxl_la_SOURCES = $(XENCONFIG_LIBXL_SOURCES)
+endif WITH_LIBXL
endif WITH_XENCONFIG
@@ -1417,7 +1425,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = \
$(AM_CFLAGS)
libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \
- libvirt_xenconfig.la \
+ libvirt_xenconfig_libxl.la \
libvirt_secret.la
libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES)
@@ -2045,6 +2053,7 @@ EXTRA_DIST += \
$(VBOX_DRIVER_EXTRA_DIST) \
$(VMWARE_DRIVER_SOURCES) \
$(XENCONFIG_SOURCES) \
+ $(XENCONFIG_LIBXL_SOURCES) \
$(ACCESS_DRIVER_POLKIT_POLICY)
check-local: check-augeas
diff --git a/src/libvirt_xenxlconfig.syms b/src/libvirt_xenxlconfig.syms
index dbe43aac7..50407002d 100644
--- a/src/libvirt_xenxlconfig.syms
+++ b/src/libvirt_xenxlconfig.syms
@@ -3,8 +3,6 @@
#
#xenconfig/xen_xl.h
-xenFormatXL;
-xenParseXL;
# Let emacs know we want case-insensitive sorting
# Local Variables:
--
2.13.6
7 years, 2 months
[libvirt] [PATCH v4 0/7] Work around the kernel mdev uevent race in nodedev
by Erik Skultety
v3 here: https://www.redhat.com/archives/libvir-list/2017-August/msg00703.html
since v3:
- some minor cosmetic changes related to comments from the original patches 1-2
- everything else (provided it didn't cause merge conflicts) is unchanged
Erik Skultety (7):
nodedev: Introduce udevEventCheckMonitorFD helper function
nodedev: udev: Lock the driver in udevEventCheckMonitorFd
udev: Split udevEventHandleCallback in two functions
udev: Convert udevEventHandleThread to an actual thread routine
nodedev: Disable/re-enable polling on the udev fd
util: Introduce virFileWaitForExists
nodedev: Work around the uevent race by hooking up
virFileWaitForAccess
src/libvirt_private.syms | 1 +
src/node_device/node_device_udev.c | 194 +++++++++++++++++++++++++++++++++----
src/util/virfile.c | 31 ++++++
src/util/virfile.h | 2 +
4 files changed, 209 insertions(+), 19 deletions(-)
--
2.13.5
7 years, 2 months
[libvirt] [PATCH] news: Document watchdog hot-(un)plug change
by Michal Privoznik
In 361c8dc17 and 662140fa68ae0 I've implemented hot-(un)plug of
watchdog devices. Document this change.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/news.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 4e8d7c940..3a01bd491 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -35,6 +35,11 @@
<libvirt>
<release version="v3.9.0" date="unreleased">
<section title="New features">
+ <change>
+ <summary>
+ qemu: Added support for hot-(un)plug of watchdog devices
+ </summary>
+ </change>
</section>
<section title="Improvements">
</section>
--
2.13.6
7 years, 2 months