[libvirt] [PATCH 0/2] Allow saving QEMU libvirt state to a pipe
by Chen Hanxiao
This series introduce flag VIR_DOMAIN_SAVE_PIPE
to enable command 'save' to write to PIPE.
Base upon patches from Roy Keene <rkeene(a)knightpoint.com>
with some fixes.
Change from original patch:
1) Check whether the specified path is a PIPE.
2) Rebase on upstream.
3) Add doc for virsh command
Chen Hanxiao (2):
qemu: Allow saving QEMU libvirt state to a pipe
virsh: introduce flage --pipe for save command
include/libvirt/libvirt-domain.h | 1 +
src/qemu/qemu_driver.c | 71 ++++++++++++++++++++++++++++++----------
tools/virsh-domain.c | 6 ++++
tools/virsh.pod | 6 +++-
4 files changed, 65 insertions(+), 19 deletions(-)
--
2.7.4
7 years, 11 months
[libvirt] [PATCH v4 0/9] Implementation of QEMU vhost-scsi
by Eric Farman
This patch series provides a libvirt implementation of the vhost-scsi
interface in QEMU. As near as I can see, this was discussed upstream in
July 2014[1], and ended in a desire to replace a vhost-scsi controller
in favor of a hostdev element instead[2].
Host setup via targetcli (SCSI LUN(s) are already defined to host):
# targetcli
targetcli shell version 2.1.fb35
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> backstores/block create name=disk1 write_back=false \
dev=/dev/disk/by-id/dm-name-36005076306ffc7630000000000002211
Created block storage object disk1 using
/dev/disk/by-id/dm-name-36005076306ffc7630000000000002211.
/> vhost/ create
Created target naa.5001405df3e54061.
Created TPG 1.
/> vhost/naa.5001405df3e54061/tpg1/luns create /backstores/block/disk1
Created LUN 0.
/> exit
Host Filesystem Example:
# ls /sys/kernel/config/target/vhost/
discovery_auth naa.5001405df3e54061 version
# ls /sys/kernel/config/target/vhost/naa.5001405df3e54061/tpgt_1/lun/
lun_0
QEMU Example (snippet):
-device vhost-scsi-ccw,wwpn=naa.5001405df3e54061,devno=fe.0.1000
Libvirt Example (snippet):
<hostdev mode='subsystem' type='scsi_host'>
<source protocol='vhost' wwpn='naa.5001405df3e54061'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x1000'/>
</hostdev>
Guest Viewpoint:
# lsscsi
[1:0:1:0] disk LIO-ORG disk0 4.0 /dev/sda
# dmesg | grep 1:
[ 6.065735] scsi host1: Virtio SCSI HBA
[ 6.093892] scsi 1:0:1:0: Direct-Access LIO-ORG disk0 4.0 PQ: 0 ANSI: 5
[ 6.313615] sd 1:0:1:0: Attached scsi generic sg0 type 0
[ 6.314981] sd 1:0:1:0: [sda] 29360128 512-byte logical blocks: (15.0 GB/14.0 GiB)
[ 6.317290] sd 1:0:1:0: [sda] Write Protect is off
[ 6.317566] sd 1:0:1:0: [sda] Mode Sense: 43 00 10 08
[ 6.317853] sd 1:0:1:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 6.352722] sd 1:0:1:0: [sda] Attached SCSI disk
Changelog:
v4:
- Rebase
- Rebased to current master (21 November)
- s/virDomainPCIAddressEnsureAddr/qemuDomainEnsurePCIAddress/
(per commit abb7a4bd)
- Renaming (apologies if this list is off slightly from the code)
- Per comments in v3.2, some renaming has been performed:
-- virDomainHostdevSubsysHostProtocol => virDomainHostdevSubsysSCSIHostProtocol
-- VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_HOST => VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST
-- VIR_DOMAIN_HOSTDEV_SUBSYS_HOST_PROTOCOL_TYPE_ => VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_
-- virDomainHostdevSubsysHost => virDomainHostdevSubsysSCSIVHost
-- virDomainHostdevSubsysHost host; => virDomainHostdevSubsysSCSIVHost scsi_host;
-- src/util/virhost.[ch] => src/util/virscsivhost.[ch]
-- virHost... => virSCSIVHost...
-- activeHostHostdevs => activeSCSIVHostHostdevs
-- qemuBuildHostHostdevDevStr => qemuBuildSCSIVHostHostdevDevStr
-- qemuSetupHostHostDeviceCgroup => qemuSetupHostSCSIVHostDeviceCgroup
- Comments
- Checked for a guest address tag that is of type PCI or CCW
(it is optional, and should be calculated automatically)
- Removed the array of "used by" information in hostdev utilities,
since devices will not be shared
- Fixed the existing tests to properly check for an address
- Added a set of CCW tests in addition to the existing PCI ones
- Removed protocol check in PrimeVirtioDeviceAddresses
- Things *NOT* done (later?) from v2 feedback
- Investigation/tie-in with virsh nodedev-list stuff
- Implementation of 'num_queues', 'max_sectors', and 'cmd_per_lun'
(Need to research these in the virtio space, before figuring out
how to apply to vhost-scsi)
- Dropping the "naa." prefix of wwn
- Split the "tests" patch into earlier patches
- Other
v3.2: https://www.redhat.com/archives/libvir-list/2016-November/msg00454.html
v3.1: https://www.redhat.com/archives/libvir-list/2016-October/msg01324.html
v3: https://www.redhat.com/archives/libvir-list/2016-October/msg01201.html
v2.1: https://www.redhat.com/archives/libvir-list/2016-September/msg00148.html
v2: https://www.redhat.com/archives/libvir-list/2016-August/msg01028.html
v1: https://www.redhat.com/archives/libvir-list/2016-July/msg01004.html
[1] http://www.redhat.com/archives/libvir-list/2014-July/msg01235.html
[2] http://www.redhat.com/archives/libvir-list/2014-July/msg01390.html
Eric Farman (9):
qemu: Introduce vhost-scsi capability
Introduce framework for a hostdev SCSI_host subsystem type
util: Management routines for scsi_host devices
qemu: Add vhost-scsi string for -device parameter
qemu: Allow hotplug of vhost-scsi device
conf: Wire up the vhost-scsi connection from/to XML
security: Include vhost-scsi in security labels
tests: Introduce basic vhost-scsi tests
docs: Add vhost-scsi
docs/formatdomain.html.in | 24 ++
docs/schemas/domaincommon.rng | 23 ++
po/POTFILES.in | 1 +
src/Makefile.am | 1 +
src/conf/domain_audit.c | 7 +
src/conf/domain_conf.c | 101 +++++++-
src/conf/domain_conf.h | 18 ++
src/libvirt_private.syms | 18 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_cgroup.c | 39 +++
src/qemu/qemu_command.c | 80 ++++++
src/qemu/qemu_command.h | 5 +
src/qemu/qemu_domain_address.c | 14 +-
src/qemu/qemu_hostdev.c | 41 +++
src/qemu/qemu_hostdev.h | 8 +
src/qemu/qemu_hotplug.c | 166 ++++++++++++
src/security/security_apparmor.c | 22 ++
src/security/security_dac.c | 50 ++++
src/security/security_selinux.c | 47 ++++
src/util/virhostdev.c | 163 ++++++++++++
src/util/virhostdev.h | 16 ++
src/util/virscsivhost.c | 288 +++++++++++++++++++++
src/util/virscsivhost.h | 65 +++++
tests/domaincapsschemadata/full.xml | 1 +
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.xml | 1 +
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 +
.../qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args | 23 ++
.../qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.xml | 34 +++
.../qemuxml2argv-hostdev-scsi-vhost-scsi-pci.args | 24 ++
.../qemuxml2argv-hostdev-scsi-vhost-scsi-pci.xml | 42 +++
tests/qemuxml2argvmock.c | 9 +
tests/qemuxml2argvtest.c | 6 +
.../qemuxml2xmlout-hostdev-scsi-vhost-scsi-ccw.xml | 1 +
.../qemuxml2xmlout-hostdev-scsi-vhost-scsi-pci.xml | 1 +
tests/qemuxml2xmltest.c | 6 +
45 files changed, 1355 insertions(+), 3 deletions(-)
create mode 100644 src/util/virscsivhost.c
create mode 100644 src/util/virscsivhost.h
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-ccw.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-pci.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-scsi-vhost-scsi-pci.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-vhost-scsi-ccw.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-hostdev-scsi-vhost-scsi-pci.xml
--
1.9.1
7 years, 11 months
[libvirt] [PATCH] news: Add description for perf.branch_instructions
by John Ferlan
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushed as trivial
docs/news.html.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/news.html.in b/docs/news.html.in
index 958bdd2..faea685 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -28,6 +28,12 @@
</ul>
</li>
<li><strong>Improvements</strong>
+ <ul>
+ <li>perf: Add perf.branch_instructions<br/>
+ Add support to get the count of branch instructions executed
+ by applications running on the platform
+ </li>
+ </ul>
</li>
<li><strong>Bug fixes</strong>
</li>
--
2.7.4
7 years, 11 months
[libvirt] [PATCH] qemu: Don't try to find compression program for "raw" memory images
by Peter Krempa
There's nothing to compress if the requested snapshot memory format is
set to 'raw' explicitly. After commit 9e14689ea libvirt would try to
run /sbin/raw to process them emory stream if the qemu.conf option
snapshot_image_format is set.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1402726
---
src/qemu/qemu_driver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6b177e9..4ef1860 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3300,6 +3300,9 @@ qemuGetCompressionProgram(const char *imageFormat,
if ((ret = qemuSaveCompressionTypeFromString(imageFormat)) < 0)
goto error;
+ if (ret == QEMU_SAVE_FORMAT_RAW)
+ return QEMU_SAVE_FORMAT_RAW;
+
if (!(*compresspath = virFindFileInPath(imageFormat)))
goto error;
--
2.10.2
7 years, 11 months
[libvirt] [PATCH 0/2] Couple of recently found Coverity issues
by John Ferlan
Nuisance for some, but both have negative repurcussions although one is
"just" a test.
John Ferlan (2):
tests: Fix virmacmaptest when allocation fails
nss: Need to check error condition on virJSONValueArraySize
tests/virmacmaptest.c | 9 +++++++--
tools/nss/libvirt_nss.c | 3 ++-
2 files changed, 9 insertions(+), 3 deletions(-)
--
2.7.4
7 years, 11 months
[libvirt] [PATCH v2] lxc: monitor now holds a reference to the domain
by Cédric Bosdonnat
If the monitor doesn't hold a reference to the domain object
the object may be destroyed before the monitor actually stops.
---
v2: Moved vm ref upper, removed vm unref in error case.
src/lxc/lxc_monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c
index d828d528a..9cab6c203 100644
--- a/src/lxc/lxc_monitor.c
+++ b/src/lxc/lxc_monitor.c
@@ -175,7 +175,7 @@ virLXCMonitorPtr virLXCMonitorNew(virDomainObjPtr vm,
mon->program) < 0)
goto error;
- mon->vm = vm;
+ mon->vm = virObjectRef(vm);
memcpy(&mon->cb, cb, sizeof(mon->cb));
virObjectRef(mon);
@@ -201,6 +201,7 @@ static void virLXCMonitorDispose(void *opaque)
if (mon->cb.destroy)
(mon->cb.destroy)(mon, mon->vm);
virObjectUnref(mon->program);
+ virObjectUnref(mon->vm);
}
--
2.11.0
7 years, 11 months
[libvirt] [PATCH] conf: Make scheduler formatting simpler
by Martin Kletzander
Since the great rework of how we store vcpu- and iothread-related
data, we have overly complex part of code that is trying to format the
scheduler tuning data in as less lines as possible by grouping
settings for multiple threads. That was designed as an input syntax
sugar for users, but we don't need to also use that when formatting
the XML. Switching to simple enumeration makes the code nicer,
shorter and more welcoming to future changes.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/conf/domain_conf.c | 209 ++++-----------------
...l2xmlout-cputune-iothreadsched-zeropriority.xml | 7 +-
.../qemuxml2xmlout-cputune-iothreadsched.xml | 7 +-
3 files changed, 43 insertions(+), 180 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6e008e22e3c7..51f1ee14498a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -23066,183 +23066,35 @@ virDomainDefHasCapabilitiesFeatures(virDomainDefPtr def)
}
-/**
- * virDomainFormatSchedDef:
- * @def: domain definiton
- * @buf: target XML buffer
- * @name: name of the target XML element
- * @func: function that returns the thread scheduler parameter struct for an object
- * @resourceMap: bitmap of indexes of objects that shall be formatted (used with @func)
- *
- * Formats one of the two scheduler tuning elements to the XML. This function
- * transforms the internal representation where the scheduler info is stored
- * per-object to the XML representation where the info is stored per group of
- * objects. This function autogroups all the relevant scheduler configs.
- *
- * Returns 0 on success -1 on error.
- */
-static int
-virDomainFormatSchedDef(virDomainDefPtr def,
- virBufferPtr buf,
+static void
+virDomainFormatSchedDef(virBufferPtr buf,
const char *name,
- virDomainThreadSchedParamPtr (*func)(virDomainDefPtr, unsigned int),
- virBitmapPtr resourceMap)
-{
- virBitmapPtr schedMap = NULL;
- virBitmapPtr prioMap = NULL;
- virDomainThreadSchedParamPtr sched;
- char *tmp = NULL;
- ssize_t next;
- size_t i;
- int ret = -1;
-
- /* Okay, @func should never return NULL here because it does
- * so iff corresponding resource does not exists. But if it
- * doesn't we should not have been called in the first place.
- * But some compilers fails to see this complex reasoning and
- * deduct that this code is buggy. Shut them up by checking
- * for return value of sched. Even though we don't need to.
- */
-
- if (!(schedMap = virBitmapNew(VIR_DOMAIN_CPUMASK_LEN)) ||
- !(prioMap = virBitmapNew(VIR_DOMAIN_CPUMASK_LEN)))
- goto cleanup;
-
- for (i = VIR_PROC_POLICY_NONE + 1; i < VIR_PROC_POLICY_LAST; i++) {
- virBitmapClearAll(schedMap);
-
- /* find vcpus using a particular scheduler */
- next = -1;
- while ((next = virBitmapNextSetBit(resourceMap, next)) > -1) {
- sched = func(def, next);
-
- if (sched && sched->policy == i)
- ignore_value(virBitmapSetBit(schedMap, next));
- }
-
- /* it's necessary to discriminate priority levels for schedulers that
- * have them */
- while (!virBitmapIsAllClear(schedMap)) {
- virBitmapPtr currentMap = NULL;
- ssize_t nextprio;
- bool hasPriority = false;
- int priority = 0;
-
- switch ((virProcessSchedPolicy) i) {
- case VIR_PROC_POLICY_NONE:
- case VIR_PROC_POLICY_BATCH:
- case VIR_PROC_POLICY_IDLE:
- case VIR_PROC_POLICY_LAST:
- currentMap = schedMap;
- break;
-
- case VIR_PROC_POLICY_FIFO:
- case VIR_PROC_POLICY_RR:
- virBitmapClearAll(prioMap);
- hasPriority = true;
-
- /* we need to find a subset of vCPUs with the given scheduler
- * that share the priority */
- nextprio = virBitmapNextSetBit(schedMap, -1);
- if (!(sched = func(def, nextprio)))
- goto cleanup;
-
- priority = sched->priority;
- ignore_value(virBitmapSetBit(prioMap, nextprio));
-
- while ((nextprio = virBitmapNextSetBit(schedMap, nextprio)) > -1) {
- sched = func(def, nextprio);
- if (sched && sched->priority == priority)
- ignore_value(virBitmapSetBit(prioMap, nextprio));
- }
-
- currentMap = prioMap;
- break;
- }
-
- /* now we have the complete group */
- if (!(tmp = virBitmapFormat(currentMap)))
- goto cleanup;
-
- virBufferAsprintf(buf,
- "<%sched %s='%s' scheduler='%s'",
- name, name, tmp,
- virProcessSchedPolicyTypeToString(i));
- VIR_FREE(tmp);
-
- if (hasPriority)
- virBufferAsprintf(buf, " priority='%d'", priority);
+ virDomainThreadSchedParamPtr sched,
+ size_t id)
+{
+ switch (sched->policy) {
+ case VIR_PROC_POLICY_BATCH:
+ case VIR_PROC_POLICY_IDLE:
+ virBufferAsprintf(buf, "<%ssched "
+ "%ss='%zu' scheduler='%s'/>\n",
+ name, name, id,
+ virProcessSchedPolicyTypeToString(sched->policy));
+ break;
- virBufferAddLit(buf, "/>\n");
+ case VIR_PROC_POLICY_RR:
+ case VIR_PROC_POLICY_FIFO:
+ virBufferAsprintf(buf, "<%ssched "
+ "%ss='%zu' scheduler='%s' priority='%d'/>\n",
+ name, name, id,
+ virProcessSchedPolicyTypeToString(sched->policy),
+ sched->priority);
+ break;
- /* subtract all vCPUs that were already found */
- virBitmapSubtract(schedMap, currentMap);
+ case VIR_PROC_POLICY_NONE:
+ case VIR_PROC_POLICY_LAST:
+ break;
}
- }
-
- ret = 0;
- cleanup:
- virBitmapFree(schedMap);
- virBitmapFree(prioMap);
- return ret;
-}
-
-
-static int
-virDomainFormatVcpuSchedDef(virDomainDefPtr def,
- virBufferPtr buf)
-{
- virBitmapPtr allcpumap;
- int ret;
-
- if (virDomainDefGetVcpusMax(def) == 0)
- return 0;
-
- if (!(allcpumap = virBitmapNew(virDomainDefGetVcpusMax(def))))
- return -1;
-
- virBitmapSetAll(allcpumap);
-
- ret = virDomainFormatSchedDef(def, buf, "vcpus", virDomainDefGetVcpuSched,
- allcpumap);
-
- virBitmapFree(allcpumap);
- return ret;
-}
-
-
-static int
-virDomainFormatIOThreadSchedDef(virDomainDefPtr def,
- virBufferPtr buf)
-{
- virBitmapPtr threadmap;
- size_t i;
- int ret = -1;
-
- if (def->niothreadids == 0)
- return 0;
-
- if (!(threadmap = virBitmapNewEmpty()))
- return -1;
-
- for (i = 0; i < def->niothreadids; i++) {
- if (def->iothreadids[i]->sched.policy != VIR_PROC_POLICY_NONE &&
- virBitmapSetBitExpand(threadmap, def->iothreadids[i]->iothread_id) < 0)
- goto cleanup;
- }
-
- if (virBitmapIsAllClear(threadmap)) {
- ret = 0;
- goto cleanup;
- }
-
- ret = virDomainFormatSchedDef(def, buf, "iothreads",
- virDomainDefGetIOThreadSched, threadmap);
-
- cleanup:
- virBitmapFree(threadmap);
- return ret;
}
@@ -23336,11 +23188,16 @@ virDomainCputuneDefFormat(virBufferPtr buf,
VIR_FREE(cpumask);
}
- if (virDomainFormatVcpuSchedDef(def, &childrenBuf) < 0)
- goto cleanup;
+ for (i = 0; i < def->maxvcpus; i++) {
+ virDomainFormatSchedDef(&childrenBuf, "vcpu",
+ &def->vcpus[i]->sched, i);
+ }
- if (virDomainFormatIOThreadSchedDef(def, &childrenBuf) < 0)
- goto cleanup;
+ for (i = 0; i < def->niothreadids; i++) {
+ virDomainFormatSchedDef(&childrenBuf, "iothread",
+ &def->iothreadids[i]->sched,
+ def->iothreadids[i]->iothread_id);
+ }
if (virBufferUse(&childrenBuf)) {
virBufferAddLit(buf, "<cputune>\n");
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched-zeropriority.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched-zeropriority.xml
index 5616c5c8474d..794a52d57133 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched-zeropriority.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched-zeropriority.xml
@@ -12,8 +12,11 @@
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<emulatorpin cpuset='1'/>
- <vcpusched vcpus='0-1' scheduler='fifo' priority='0'/>
- <iothreadsched iothreads='1-3' scheduler='rr' priority='0'/>
+ <vcpusched vcpus='0' scheduler='fifo' priority='0'/>
+ <vcpusched vcpus='1' scheduler='fifo' priority='0'/>
+ <iothreadsched iothreads='1' scheduler='rr' priority='0'/>
+ <iothreadsched iothreads='2' scheduler='rr' priority='0'/>
+ <iothreadsched iothreads='3' scheduler='rr' priority='0'/>
</cputune>
<os>
<type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched.xml
index a0457bc62ec0..cd1dc87b524d 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreadsched.xml
@@ -12,8 +12,11 @@
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<emulatorpin cpuset='1'/>
- <vcpusched vcpus='0-1' scheduler='fifo' priority='1'/>
- <iothreadsched iothreads='1-3' scheduler='batch'/>
+ <vcpusched vcpus='0' scheduler='fifo' priority='1'/>
+ <vcpusched vcpus='1' scheduler='fifo' priority='1'/>
+ <iothreadsched iothreads='1' scheduler='batch'/>
+ <iothreadsched iothreads='2' scheduler='batch'/>
+ <iothreadsched iothreads='3' scheduler='batch'/>
</cputune>
<os>
<type arch='i686' machine='pc'>hvm</type>
--
2.11.0.rc2
7 years, 11 months
[libvirt] [PATCH] libvirt.spec: Package libnss_libvirt_guest.so.2
by Michal Privoznik
In 22f7ceb695a I've introduced another NSS module
but forgot to package it in libvirt-nss.rpm.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed under trivial rule.
libvirt.spec.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 4bb0699cb..51ffbb55c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1858,6 +1858,7 @@ exit 0
%files nss
%{_libdir}/libnss_libvirt.so.2
+%{_libdir}/libnss_libvirt_guest.so.2
%if %{with_lxc}
%files login-shell
--
2.11.0
7 years, 11 months
[libvirt] [PATCH] lxc: monitor now holds a reference to the domain
by Cédric Bosdonnat
If the monitor doesn't hold a reference to the domain object
the object may be destroyed before the monitor actually stops.
---
src/lxc/lxc_monitor.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c
index d828d52..de63f9e 100644
--- a/src/lxc/lxc_monitor.c
+++ b/src/lxc/lxc_monitor.c
@@ -179,6 +179,7 @@ virLXCMonitorPtr virLXCMonitorNew(virDomainObjPtr vm,
memcpy(&mon->cb, cb, sizeof(mon->cb));
virObjectRef(mon);
+ virObjectRef(vm);
virNetClientSetCloseCallback(mon->client, virLXCMonitorEOFNotify, mon,
virLXCMonitorCloseFreeCallback);
@@ -188,6 +189,7 @@ virLXCMonitorPtr virLXCMonitorNew(virDomainObjPtr vm,
error:
virObjectUnref(mon);
+ virObjectUnref(vm);
mon = NULL;
goto cleanup;
}
@@ -201,6 +203,7 @@ static void virLXCMonitorDispose(void *opaque)
if (mon->cb.destroy)
(mon->cb.destroy)(mon, mon->vm);
virObjectUnref(mon->program);
+ virObjectUnref(mon->vm);
}
--
2.10.2
7 years, 11 months
[libvirt] [PATCH v2 0/3] Fix case with non-root domain and hugepages
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2016-November/msg01060.html
diff to v1:
- use virDomainObjGetShortName to construct hugepages path
- instead of implementing virSecurityManagerSetHugepages drop it
Michal Privoznik (3):
virDomainObjGetShortName: take virDomainDef
qemu: Create hugepage path on per domain basis
security: Drop virSecurityManagerSetHugepages
src/conf/domain_conf.c | 4 +-
src/conf/domain_conf.h | 2 +-
src/libvirt_private.syms | 1 -
src/qemu/qemu_command.c | 4 +-
src/qemu/qemu_conf.c | 44 +++++++++----
src/qemu/qemu_conf.h | 16 +++--
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 21 ++----
src/qemu/qemu_process.c | 74 ++++++++++++++++------
src/security/security_driver.h | 1 -
src/security/security_manager.c | 17 -----
src/security/security_manager.h | 3 -
src/security/security_stack.c | 19 ------
.../qemuxml2argv-hugepages-numa.args | 6 +-
.../qemuxml2argv-hugepages-pages.args | 16 ++---
.../qemuxml2argv-hugepages-pages2.args | 2 +-
.../qemuxml2argv-hugepages-pages3.args | 2 +-
.../qemuxml2argv-hugepages-pages5.args | 2 +-
.../qemuxml2argv-hugepages-shared.args | 14 ++--
tests/qemuxml2argvdata/qemuxml2argv-hugepages.args | 2 +-
.../qemuxml2argv-memory-hotplug-dimm-addr.args | 4 +-
.../qemuxml2argv-memory-hotplug-dimm.args | 4 +-
22 files changed, 136 insertions(+), 124 deletions(-)
--
2.8.4
7 years, 11 months