[libvirt] [PATCH] cputune: allow interleaved xml
by Eric Blake
* docs/schemas/domaincommon.rng (cputune): Add interleave.
* tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml: Swap
up order, copying canonical form...
* tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml:
...here.
* tests/qemuxml2xmltest.c (mymain): Mark the difference.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
View with 'git diff -w' for something easier to see.
docs/schemas/domaincommon.rng | 106 ++++++++++----------
.../qemuxml2argv-cputune-iothreads.xml | 15 ++--
.../qemuxml2xmlout-cputune-iothreads.xml | 38 +++++++
tests/qemuxml2xmltest.c | 2 +-
4 files changed, 101 insertions(+), 60 deletions(-)
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 9d3775d..dd55a99 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -768,58 +768,60 @@
<!-- All the cpu related tunables would go in the cputune -->
<define name="cputune">
<element name="cputune">
- <optional>
- <element name="shares">
- <ref name="cpushares"/>
- </element>
- </optional>
- <optional>
- <element name="period">
- <ref name="cpuperiod"/>
- </element>
- </optional>
- <optional>
- <element name="quota">
- <ref name="cpuquota"/>
- </element>
- </optional>
- <optional>
- <element name="emulator_period">
- <ref name="cpuperiod"/>
- </element>
- </optional>
- <optional>
- <element name="emulator_quota">
- <ref name="cpuquota"/>
- </element>
- </optional>
- <zeroOrMore>
- <element name="vcpupin">
- <attribute name="vcpu">
- <ref name="vcpuid"/>
- </attribute>
- <attribute name="cpuset">
- <ref name="cpuset"/>
- </attribute>
- </element>
- </zeroOrMore>
- <optional>
- <element name="emulatorpin">
- <attribute name="cpuset">
- <ref name="cpuset"/>
- </attribute>
- </element>
- </optional>
- <zeroOrMore>
- <element name="iothreadpin">
- <attribute name="iothread">
- <ref name="unsignedInt"/>
- </attribute>
- <attribute name="cpuset">
- <ref name="cpuset"/>
- </attribute>
- </element>
- </zeroOrMore>
+ <interleave>
+ <optional>
+ <element name="shares">
+ <ref name="cpushares"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="period">
+ <ref name="cpuperiod"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="quota">
+ <ref name="cpuquota"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="emulator_period">
+ <ref name="cpuperiod"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="emulator_quota">
+ <ref name="cpuquota"/>
+ </element>
+ </optional>
+ <zeroOrMore>
+ <element name="vcpupin">
+ <attribute name="vcpu">
+ <ref name="vcpuid"/>
+ </attribute>
+ <attribute name="cpuset">
+ <ref name="cpuset"/>
+ </attribute>
+ </element>
+ </zeroOrMore>
+ <optional>
+ <element name="emulatorpin">
+ <attribute name="cpuset">
+ <ref name="cpuset"/>
+ </attribute>
+ </element>
+ </optional>
+ <zeroOrMore>
+ <element name="iothreadpin">
+ <attribute name="iothread">
+ <ref name="unsignedInt"/>
+ </attribute>
+ <attribute name="cpuset">
+ <ref name="cpuset"/>
+ </attribute>
+ </element>
+ </zeroOrMore>
+ </interleave>
</element>
</define>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
index 435d0ae..c8cc025 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
@@ -6,14 +6,15 @@
<vcpu placement='static'>2</vcpu>
<iothreads>2</iothreads>
<cputune>
- <shares>2048</shares>
- <period>1000000</period>
- <quota>-1</quota>
- <vcpupin vcpu='0' cpuset='0'/>
- <vcpupin vcpu='1' cpuset='1'/>
- <emulatorpin cpuset='1'/>
- <iothreadpin iothread='1' cpuset='2'/>
+ <!-- intentionally in odd order -->
<iothreadpin iothread='2' cpuset='3'/>
+ <iothreadpin iothread='1' cpuset='2'/>
+ <emulatorpin cpuset='1'/>
+ <vcpupin vcpu='1' cpuset='1'/>
+ <vcpupin vcpu='0' cpuset='0'/>
+ <quota>-1</quota>
+ <period>1000000</period>
+ <shares>2048</shares>
</cputune>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml
new file mode 100644
index 0000000..3684483
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml
@@ -0,0 +1,38 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <iothreads>2</iothreads>
+ <cputune>
+ <shares>2048</shares>
+ <period>1000000</period>
+ <quota>-1</quota>
+ <vcpupin vcpu='1' cpuset='1'/>
+ <vcpupin vcpu='0' cpuset='0'/>
+ <emulatorpin cpuset='1'/>
+ <iothreadpin iothread='2' cpuset='3'/>
+ <iothreadpin iothread='1' cpuset='2'/>
+ </cputune>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index d269fb3..1959291 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -302,7 +302,7 @@ mymain(void)
DO_TEST("smp");
DO_TEST("iothreads");
- DO_TEST("cputune-iothreads");
+ DO_TEST_DIFFERENT("cputune-iothreads");
DO_TEST("iothreads-disk");
DO_TEST("lease");
DO_TEST("event_idx");
--
1.7.1
10 years, 1 month
[libvirt] [PATCH 0/7] Add more options for IOThreads
by John Ferlan
The following patches will add more support for IOThreads not completed
from the initial patches. These changes support the remaining elements of
bz https://bugzilla.redhat.com/show_bug.cgi?id=1101574 (working through
unsetting the private bits - as there's nothing in there that should
necessarily be private).
Changes:
1. Add "--iothread" option to virsh attach-disk to allow using a specific
iothread when attaching a disk
2. Add the ability to set CPU affinity for an IOThread. This involves
multiple steps (patches 2-6) of adding the infrastructure to support
setting scheduler affinity for the IOThread including cgroup setup.
For the most part it's a "copy" of the vCPU pinning code, but without
the external interfaces - those will come at a later time after RHEL7.1.
3. Add to <cpuset/> a new element <iothreadpin iothread='#" cpuset="string"/>
NOTE: I can combine any/all of patches 2-6 - I just kept them separate
so it wasn't a larger single patch.
Although future changes will support API's and virsh commands to modify
the iothreadpin, this set of changes at least is backportable to RHEL7.1
since there are no external API changes.
John Ferlan (7):
virsh: Add iothread to 'attach-disk'
qemu: Issue query-iothreads and to get list of active IOThreads
vircgroup: Introduce virCgroupNewIOThread
qemu_domain: Add niothreadpids and iothreadpids
qemu_cgroup: Introduce cgroup functions for IOThreads
qemu: Allow pinning specific IOThreads to a CPU
domain_conf: Add iothreadpin to cputune
docs/formatdomain.html.in | 18 +++
docs/schemas/domaincommon.rng | 10 ++
src/conf/domain_conf.c | 124 +++++++++++++++++++--
src/conf/domain_conf.h | 2 +
src/libvirt_private.syms | 1 +
src/qemu/qemu_cgroup.c | 104 +++++++++++++++++
src/qemu/qemu_cgroup.h | 5 +
src/qemu/qemu_domain.c | 36 ++++++
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 8 ++
src/qemu/qemu_monitor.c | 41 +++++++
src/qemu/qemu_monitor.h | 12 ++
src/qemu/qemu_monitor_json.c | 91 +++++++++++++++
src/qemu/qemu_monitor_json.h | 4 +
src/qemu/qemu_process.c | 96 ++++++++++++++++
src/util/vircgroup.c | 43 +++++++
src/util/vircgroup.h | 6 +
tests/qemumonitorjsontest.c | 71 ++++++++++++
.../qemuxml2argv-cputune-iothreads.xml | 38 +++++++
tests/qemuxml2xmltest.c | 1 +
tools/virsh-domain.c | 13 ++-
tools/virsh.pod | 5 +-
22 files changed, 717 insertions(+), 15 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml
--
1.9.3
10 years, 1 month
[libvirt] [PATCH] libxl: support hvm direct kernel boot
by Chunyan Liu
Xen libxl can support Xen HVM direct kernel boot now. To support
Xen HVM direct kernel boot in libvirt, it still needs some changes
to libvirt code: accept HVM direct kernel boot related configuration
in xml, parse those info into virDomainDefPtr, and fill in related
parts of libxl_domain_build_info, so that libxl can handle. This
patch is just to do this.
Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
src/libxl/libxl_conf.c | 18 ++++++++++++++++
src/xenconfig/xen_common.c | 51 +++++++++++++++++++++++++++++++++-------------
2 files changed, 55 insertions(+), 14 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index acba69c..a5bda64 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -704,6 +704,15 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
if (VIR_STRDUP(b_info->u.hvm.boot, bootorder) < 0)
goto error;
+#ifdef LIBXL_HAVE_BUILDINFO_KERNEL
+ if (VIR_STRDUP(b_info->cmdline, def->os.cmdline) < 0)
+ goto error;
+ if (VIR_STRDUP(b_info->kernel, def->os.kernel) < 0)
+ goto error;
+ if (VIR_STRDUP(b_info->ramdisk, def->os.initrd) < 0)
+ goto error;
+#endif
+
if (def->nserials) {
if (def->nserials > 1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
@@ -748,6 +757,14 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
virStringSplit(def->os.bootloaderArgs, " \t\n", 0)))
goto error;
}
+#ifdef LIBXL_HAVE_BUILDINFO_KERNEL
+ if (VIR_STRDUP(b_info->cmdline, def->os.cmdline) < 0)
+ goto error;
+ if (VIR_STRDUP(b_info->kernel, def->os.kernel) < 0)
+ goto error;
+ if (VIR_STRDUP(b_info->ramdisk, def->os.initrd) < 0)
+ goto error;
+#else
if (VIR_STRDUP(b_info->u.pv.cmdline, def->os.cmdline) < 0)
goto error;
if (def->os.kernel) {
@@ -758,6 +775,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
}
if (VIR_STRDUP(b_info->u.pv.ramdisk, def->os.initrd) < 0)
goto error;
+#endif
}
return 0;
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c
index 32954f3..290ba3d 100644
--- a/src/xenconfig/xen_common.c
+++ b/src/xenconfig/xen_common.c
@@ -1053,6 +1053,26 @@ xenParseGeneralMeta(virConfPtr conf, virDomainDefPtr def, virCapsPtr caps)
return 0;
}
+static int xenParseCmdline(virConfPtr conf, virDomainDefPtr def)
+{
+ const char *extra, *root;
+
+ if (xenConfigGetString(conf, "extra", &extra, NULL) < 0)
+ return -1;
+
+ if (xenConfigGetString(conf, "root", &root, NULL) < 0)
+ return -1;
+
+ if (root) {
+ if (virAsprintf(&def->os.cmdline, "root=%s %s", root, extra) < 0)
+ return -1;
+ } else {
+ if (VIR_STRDUP(def->os.cmdline, extra) < 0)
+ return -1;
+ }
+
+ return 0;
+}
static int
xenParseOS(virConfPtr conf, virDomainDefPtr def)
@@ -1065,9 +1085,25 @@ xenParseOS(virConfPtr conf, virDomainDefPtr def)
if (STREQ(def->os.type, "hvm")) {
const char *boot;
+#ifdef LIBXL_HAVE_BUILDINFO_KERNEL
+ if (xenConfigCopyStringOpt(conf, "kernel", &def->os.kernel) < 0)
+ return -1;
+
+ if (strstr(def->os.kernel, "hvmloader")) {
+ /* 'kernel' set to 'hvmloader' will be ignored in libxl */
+ virFree(def->os.kernel);
+ }
+
+ if (xenConfigCopyStringOpt(conf, "ramdisk", &def->os.initrd) < 0)
+ return -1;
+
+ if (xenParseCmdline(conf, def) < 0)
+ return -1;
+#else
if (VIR_ALLOC(def->os.loader) < 0 ||
xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
return -1;
+#endif
if (xenConfigGetString(conf, "boot", &boot, "c") < 0)
return -1;
@@ -1091,8 +1127,6 @@ xenParseOS(virConfPtr conf, virDomainDefPtr def)
def->os.nBootDevs++;
}
} else {
- const char *extra, *root;
-
if (xenConfigCopyStringOpt(conf, "bootloader", &def->os.bootloader) < 0)
return -1;
if (xenConfigCopyStringOpt(conf, "bootargs", &def->os.bootloaderArgs) < 0)
@@ -1104,19 +1138,8 @@ xenParseOS(virConfPtr conf, virDomainDefPtr def)
if (xenConfigCopyStringOpt(conf, "ramdisk", &def->os.initrd) < 0)
return -1;
- if (xenConfigGetString(conf, "extra", &extra, NULL) < 0)
+ if (xenParseCmdline(conf, def) < 0)
return -1;
-
- if (xenConfigGetString(conf, "root", &root, NULL) < 0)
- return -1;
-
- if (root) {
- if (virAsprintf(&def->os.cmdline, "root=%s %s", root, extra) < 0)
- return -1;
- } else {
- if (VIR_STRDUP(def->os.cmdline, extra) < 0)
- return -1;
- }
}
return 0;
--
1.8.4.5
10 years, 1 month
[libvirt] [PATCH] vircgroup: Fix broken builds without cgroups
by John Ferlan
I missed adding virCgroupNewIOThread to the !VIR_CGROUP_SUPPORTED
Pushing as build breaker
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/util/vircgroup.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 13c7b7d..1dbe6f9 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3983,6 +3983,18 @@ virCgroupNewEmulator(virCgroupPtr domain ATTRIBUTE_UNUSED,
int
+virCgroupNewIOThread(virCgroupPtr domain ATTRIBUTE_UNUSED,
+ int iothreadid ATTRIBUTE_UNUSED,
+ bool create ATTRIBUTE_UNUSED,
+ virCgroupPtr *group ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENXIO, "%s",
+ _("Control groups not supported on this platform"));
+ return -1;
+}
+
+
+int
virCgroupNewDetect(pid_t pid ATTRIBUTE_UNUSED,
int controllers ATTRIBUTE_UNUSED,
virCgroupPtr *group ATTRIBUTE_UNUSED)
--
1.9.3
10 years, 1 month
[libvirt] [PATCH] network: detect conflicting route even if it is the final entry
by Laine Stump
This is a folloup to commit 5f719596, which checks for a route
conflicting with the standard libvirt default network subnet
(192.168.122.0/24). It turns out that the output of "ip route show"
doesn't have a trailing newline, so there would be no match if the
route we were looking for was the final line of output. This can be
solved by adding ${nl} to the end of the output (just as we were
already doing at the beginning of the output).
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index c2e2be4..bec3a50 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1737,7 +1737,7 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
sub=${orig_sub}
nl='
'
- routes="${nl}$(ip route show | cut -d' ' -f1)"
+ routes="${nl}$(ip route show | cut -d' ' -f1)${nl}"
case ${routes} in
*"${nl}192.168.${orig_sub}.0/24${nl}"*)
# there was a match, so we need to look for an unused subnet
--
1.9.3
10 years, 1 month
[libvirt] [PATCH 0/8] Last pile of Coverity changes
by John Ferlan
After this pile of changes I am back down to zero issues.
Patch 1 - is a repeat offender - this is the 3rd try, but I think
I have a better solution here. Details are in the commit message.
Patch 2-3 - are repeats from the last series as patches 6 and 9.
For the virtime.c code - I just removed the offending math and
deadcode leaving the entrails in the commit message and code.
For the virstoragefile.c code - I agree with eblake's logic and
just removed the entire check as dead.
Patch 4 - seems to be a real issue. Initially I thought it wasn't,
but after finding the original commit it seems it was a copypaste
type error. I initially thought perhaps if hard_limit was set as
the unlimited value that the design was don't change soft_limit and
swap_hard_limit
Patch 5 - false positive
Patch 6 - false positive mostly, but just add the proper checks like
other code
Patch 7 - the BAD_SIZEOF was being triggered on the math to the PROBE
macro. By generating local variables - the issue went away
Patch 8 - initially I wasn't so sure on this - that !!sock_path is just
one of those constructs I find "odd" to read in code. Anyway, as it turns
out this is a false positive as there is no way sock_path could be null
here - so I just added the sa_assert() and that satisfies Coverity
John Ferlan (8):
remote_driver: Resolve Coverity RESOURCE_LEAK
virtime: Resolve Coverity DEADCODE
virstoragefile: Resolve Coverity DEADCODE
domain_conf: Resolve Coverity COPY_PASTE_ERROR
virsh: Resolve Coverity DEADCODE
Resolve Coverity CHECKED_RETURN
qemu: Resolve Coverity BAD_SIZEOF
daemon: Resolve Coverity FORWARD_NULL
daemon/libvirtd.c | 1 +
src/conf/domain_conf.c | 4 ++--
src/qemu/qemu_monitor.c | 18 +++++++----------
src/remote/remote_driver.c | 49 ++++++++++++++++++++++++++--------------------
src/util/virstoragefile.c | 2 --
src/util/virtime.c | 14 ++++---------
tests/objecteventtest.c | 3 ++-
tools/virsh-domain.c | 1 +
tools/virt-login-shell.c | 2 +-
9 files changed, 46 insertions(+), 48 deletions(-)
--
1.9.3
10 years, 1 month
[libvirt] [PATCH v3 0/4] Introduce new cputune event
by Pavel Hrdina
This patch series introduce new cputune event to inform
management applications about every change of cputune values
for running domains.
There is missing documentation for all events so the documentation
for this event will be part of the patches to document all events.
Changes from v2:
- removed virSnprintf helper
- fix typo and PM -> PowerManagement in the first patch
- fixed memory leak
- updated virConnectDomainEventCputuneCallback docs
- virConnectDomainEventCputuneCallback now consumes params
- updated call sequence in virConnectDomainEventCputuneCallback
Pavel Hrdina (4):
domain_conf: separate structures from virDomainDef
event: introduce new event for cputune
add an example how to use cputune event
cputune_event: queue the event for cputune updates
daemon/remote.c | 45 +++++++++++++++++
examples/object-events/event-test.c | 52 +++++++++++++++++++-
include/libvirt/libvirt.h.in | 22 +++++++++
src/conf/domain_conf.h | 98 ++++++++++++++++++++++---------------
src/conf/domain_event.c | 93 +++++++++++++++++++++++++++++++++++
src/conf/domain_event.h | 9 ++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_cgroup.c | 18 ++++++-
src/qemu/qemu_driver.c | 74 ++++++++++++++++++++++++++++
src/remote/remote_driver.c | 42 ++++++++++++++++
src/remote/remote_protocol.x | 14 +++++-
src/remote_protocol-structs | 9 ++++
tools/virsh-domain.c | 33 +++++++++++++
13 files changed, 469 insertions(+), 42 deletions(-)
--
1.8.5.5
10 years, 1 month
[libvirt] [PATCH] configure: Require setns in glibc
by Michal Privoznik
Instead of writing our own wrapper over setns function, require
it in glibc (when compiling with LXC). Our implementation uses
private macros from kernel header files which should not be done.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
This is an alternative approach as requested by Martin.
configure.ac | 11 ++++++++++-
src/util/virprocess.c | 33 ---------------------------------
2 files changed, 10 insertions(+), 34 deletions(-)
diff --git a/configure.ac b/configure.ac
index b4fb99a..0366b78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,9 +274,18 @@ dnl Availability of various common functions (non-fatal if missing),
dnl and various less common threadsafe functions
AC_CHECK_FUNCS_ONCE([cfmakeraw fallocate geteuid getgid getgrnam_r \
getmntent_r getpwuid_r getuid kill mmap newlocale posix_fallocate \
- posix_memalign prlimit regexec sched_getaffinity setgroups setns \
+ posix_memalign prlimit regexec sched_getaffinity setgroups \
setrlimit symlink sysctlbyname getifaddrs])
+AC_CHECK_FUNC([setns])
+if test "$ac_cv_func_setns" = "no" ; then
+ if "$with_lxc" = "check" ; then
+ with_lxc=no
+ elif "$with_lxc" = "yes" ; then
+ AC_MSG_ERROR([setns function is required for LXC])
+ fi
+fi
+
dnl Availability of pthread functions. Because of $LIB_PTHREAD, we
dnl cannot use AC_CHECK_FUNCS_ONCE. LIB_PTHREAD and LIBMULTITHREAD
dnl were set during gl_INIT by gnulib.
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index 3dae1bd..7c5f770 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -61,39 +61,6 @@
VIR_LOG_INIT("util.process");
-/*
- * Workaround older glibc. While kernel may support the setns
- * syscall, the glibc wrapper might not exist. If that's the
- * case, use our own.
- */
-#ifndef __NR_setns
-# if defined(__x86_64__)
-# define __NR_setns 308
-# elif defined(__i386__)
-# define __NR_setns 346
-# else
-# error "__NR_setns is not defined"
-# endif
-#endif
-
-#ifndef HAVE_SETNS
-# ifndef WIN32
-# include <sys/syscall.h>
-
-static inline int setns(int fd, int nstype)
-{
- return syscall(__NR_setns, fd, nstype);
-}
-# else
-static inline int setns(int fd ATTRIBUTE_UNUSED, int nstype ATTRIBUTE_UNUSED)
-{
- virReportSystemError(ENOSYS, "%s",
- _("Namespaces are not supported on windows."));
- return -1;
-}
-# endif /* WIN32 */
-#endif /* HAVE_SETNS */
-
/**
* virProcessTranslateStatus:
* @status: child exit status to translate
--
1.8.5.5
10 years, 1 month
[libvirt] [PATCH v2 0/3] add support for mapping hugepages as shared
by Martin Kletzander
Changes to v1:
- 1/3 is now not connected to the rest of the patches any more
- whitespaces
- memShared='on/off' -> memAccess='private/shared'
Martin Kletzander (3):
schemas: finish virTristate{Bool,Switch} transition
docs, conf, schema: add support for shared memory mapping
qemu: add support for shared memory mapping
docs/formatdomain.html.in | 7 +-
docs/schemas/basictypes.rng | 19 ++-
docs/schemas/capability.rng | 10 +-
docs/schemas/domaincaps.rng | 5 +-
docs/schemas/domaincommon.rng | 163 +++++----------------
docs/schemas/interface.rng | 19 +--
docs/schemas/network.rng | 29 +---
docs/schemas/nwfilter.rng | 5 +-
docs/schemas/secret.rng | 10 +-
src/conf/cpu_conf.c | 30 +++-
src/conf/cpu_conf.h | 17 ++-
src/qemu/qemu_command.c | 27 ++++
.../qemuxml2argv-cpu-numa-memshared.xml | 28 ++++
.../qemuxml2argv-hugepages-shared.args | 16 ++
.../qemuxml2argv-hugepages-shared.xml | 45 ++++++
tests/qemuxml2argvtest.c | 5 +
tests/qemuxml2xmltest.c | 2 +
17 files changed, 240 insertions(+), 197 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
--
2.1.0
10 years, 1 month
[libvirt] [PATCH 0/3] add support for hugepages mapping as shared
by Martin Kletzander
- BLURB
Martin Kletzander (3):
schemas: finish virTristate{Bool,Switch} transition
docs, conf, schema: add support for shared memory mapping
qemu: add support for shared memory mapping
docs/formatdomain.html.in | 7 +-
docs/schemas/basictypes.rng | 19 ++-
docs/schemas/capability.rng | 10 +-
docs/schemas/domaincaps.rng | 5 +-
docs/schemas/domaincommon.rng | 160 +++++----------------
docs/schemas/interface.rng | 19 +--
docs/schemas/network.rng | 29 +---
docs/schemas/nwfilter.rng | 5 +-
docs/schemas/secret.rng | 10 +-
src/conf/cpu_conf.c | 25 +++-
src/conf/cpu_conf.h | 7 +-
src/qemu/qemu_command.c | 19 +++
.../qemuxml2argv-cpu-numa-memshared.xml | 28 ++++
.../qemuxml2argv-hugepages-shared.args | 16 +++
.../qemuxml2argv-hugepages-shared.xml | 45 ++++++
tests/qemuxml2argvtest.c | 5 +
tests/qemuxml2xmltest.c | 2 +
17 files changed, 214 insertions(+), 197 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-numa-memshared.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hugepages-shared.xml
--
2.1.0
10 years, 1 month