[libvirt] [PATCH 0/2] vsh-table: Remove trailing spaces
by Simon Kobyda
Right now, each line in last column of our table leaves trailing spaces.
Let's get rid of it.
Simon Kobyda (2):
vsh-table: Get rid of trailing spaces
tests: Remove trailing spaces in test cases
tests/virshtest.c | 10 ++++----
tests/vshtabletest.c | 58 ++++++++++++++++++++++----------------------
tools/vsh-table.c | 6 +++--
3 files changed, 38 insertions(+), 36 deletions(-)
--
2.17.1
5 years, 12 months
[libvirt] [PATCH v2] qemu: Add check for whether KVM nesting is enabled
by John Ferlan
Support for nested KVM is handled via a kernel module configuration
adjustment which if done after libvirtd is started and/or the last
QEMU capabilities adjustment can result in the inability to start a
guest and use nested KVM until the capabilities cache is invalidated.
This is because without knowing, the CPU settings for a guest may not
add the vmx=on to/for the guest config.
Thus, let's fetch and save the setting during initialization and then
when the capabilities are checked for various host related adjustments
that could affect whether the capabilities cache is updated add a check
whether the nested value was set for Intel, AMD, or s390 to force a
refetch of the capabilities.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
v1 was part of an RFC:
https://www.redhat.com/archives/libvir-list/2018-November/msg00494.html
This patch alters that code slightly to add the check Marc Hartmayer
requested for S390 and to use "kvm" in the API names and variables to
make it clearer that it's not CapsIsNested but CapsKVMIsNested.
If it's felt the new check should slide down further in virQEMUCapsIsValid
then that's fine - just let me know what it should follow.
src/qemu/qemu_capabilities.c | 45 ++++++++++++++++++++++++++++++++++++
src/qemu/qemu_capspriv.h | 2 ++
tests/qemucapabilitiestest.c | 3 +++
3 files changed, 50 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fde27010e4..c377733fe6 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -40,6 +40,7 @@
#include "virnodesuspend.h"
#include "virnuma.h"
#include "virhostcpu.h"
+#include "virkmod.h"
#include "qemu_monitor.h"
#include "virstring.h"
#include "qemu_hostdev.h"
@@ -557,6 +558,7 @@ struct _virQEMUCaps {
virObject parent;
bool usedQMP;
+ bool kvmIsNested;
char *binary;
time_t ctime;
@@ -1528,6 +1530,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
return NULL;
ret->usedQMP = qemuCaps->usedQMP;
+ ret->kvmIsNested = qemuCaps->kvmIsNested;
if (VIR_STRDUP(ret->binary, qemuCaps->binary) < 0)
goto error;
@@ -3587,6 +3590,9 @@ virQEMUCapsLoadCache(virArch hostArch,
virQEMUCapsInitHostCPUModel(qemuCaps, hostArch, VIR_DOMAIN_VIRT_KVM);
virQEMUCapsInitHostCPUModel(qemuCaps, hostArch, VIR_DOMAIN_VIRT_QEMU);
+ qemuCaps->kvmIsNested = virXPathBoolean("count(./kvmIsNested) > 0",
+ ctxt) > 0;
+
ret = 0;
cleanup:
VIR_FREE(str);
@@ -3806,6 +3812,9 @@ virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps)
if (qemuCaps->sevCapabilities)
virQEMUCapsFormatSEVInfo(qemuCaps, &buf);
+ if (qemuCaps->kvmIsNested)
+ virBufferAddLit(&buf, "<kvmIsNested/>\n");
+
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "</qemuCaps>\n");
@@ -3846,6 +3855,30 @@ virQEMUCapsSaveFile(void *data,
}
+static bool
+virQEMUCapsKVMIsNested(void)
+{
+ VIR_AUTOFREE(char *) kConfig = NULL;
+
+ /* Intel, AMD, and s390 related checks */
+ if ((kConfig = virKModConfig()) &&
+ (strstr(kConfig, "kvm_intel nested=1") ||
+ strstr(kConfig, "kvm_amd nested=1") ||
+ strstr(kConfig, "kvm nested=1")))
+ return true;
+ return false;
+}
+
+
+void
+virQEMUCapsClearKVMIsNested(virQEMUCapsPtr qemuCaps)
+{
+ /* For qemucapabilitiestest to avoid printing the </kvmIsNested> on
+ * hosts with nested set in the kernel */
+ qemuCaps->kvmIsNested = false;
+}
+
+
static bool
virQEMUCapsIsValid(void *data,
void *privData)
@@ -3854,6 +3887,7 @@ virQEMUCapsIsValid(void *data,
virQEMUCapsCachePrivPtr priv = privData;
bool kvmUsable;
struct stat sb;
+ bool kvmIsNested;
if (!qemuCaps->binary)
return true;
@@ -3886,6 +3920,15 @@ virQEMUCapsIsValid(void *data,
return false;
}
+ /* Check if someone changed the nested={0|1} value for the kernel from
+ * the previous time we checked. If so, then refresh the capabilities. */
+ kvmIsNested = virQEMUCapsKVMIsNested();
+ if (kvmIsNested != qemuCaps->kvmIsNested) {
+ VIR_WARN("changed kernel nested kvm value was %d", qemuCaps->kvmIsNested);
+ qemuCaps->kvmIsNested = kvmIsNested;
+ return false;
+ }
+
if (!virQEMUCapsGuestIsNative(priv->hostArch, qemuCaps->arch)) {
VIR_DEBUG("Guest arch (%s) is not native to host arch (%s), "
"skipping KVM-related checks",
@@ -4472,6 +4515,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
if (virQEMUCapsInitQMPMonitor(qemuCaps, cmd->mon) < 0)
goto cleanup;
+ qemuCaps->kvmIsNested = virQEMUCapsKVMIsNested();
+
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
virQEMUCapsInitQMPCommandAbort(cmd);
if ((rc = virQEMUCapsInitQMPCommandRun(cmd, true)) != 0) {
diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h
index 8d1a40fe74..edfe2cd6f6 100644
--- a/src/qemu/qemu_capspriv.h
+++ b/src/qemu/qemu_capspriv.h
@@ -48,6 +48,8 @@ int
virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
qemuMonitorPtr mon);
+void virQEMUCapsClearKVMIsNested(virQEMUCapsPtr qemuCaps);
+
int
virQEMUCapsInitQMPMonitorTCG(virQEMUCapsPtr qemuCaps,
qemuMonitorPtr mon);
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index 8fe5a55e1d..90942c6fce 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -63,6 +63,9 @@ testQemuCaps(const void *opaque)
qemuMonitorTestGetMonitor(mon)) < 0)
goto cleanup;
+ /* Don't apply what the host has... force clear for testing purposes */
+ virQEMUCapsClearKVMIsNested(capsActual);
+
if (virQEMUCapsGet(capsActual, QEMU_CAPS_KVM)) {
qemuMonitorResetCommandID(qemuMonitorTestGetMonitor(mon));
if (virQEMUCapsInitQMPMonitorTCG(capsActual,
--
2.17.2
5 years, 12 months
[libvirt] [PATCH] qemu: Fix post-copy migration on the source
by Jiri Denemark
Post-copy migration has been broken on the source since commit
v3.8.0-245-g32c29f10db which implemented support for
pause-before-switchover QEMU migration capability.
Even though the migration itself went well, the source did not really
know when it switched to the post-copy mode despite the messages logged
by MIGRATION event handler. As a result of this, the events emitted by
source libvirtd were not accurate and statistics of the completed
migration would cover only the pre-copy part of migration. Moreover, if
migration failed during the post-copy phase for some reason, the source
libvirtd would just happily resume the domain, which could lead to disk
corruption.
With the pause-before-switchover capability enabled, the order of events
emitted by QEMU changed:
pause-before-switchover
disabled enabled
MIGRATION, potcopy-active STOP
STOP MIGRATION, pre-switchover
MIGRATION, postcopy-active
The STOP even handler checks the migration status (postcopy-active) and
sets the domain state accordingly. Which is sufficient when
pause-before-switchover is disabled, but once we enable it, the
migration status is still active when we get STOP from QEMU. Thus the
domain state set in the STOP handler has to be corrected once we are
notified that migration changed to postcopy-active.
This results in two SUSPENDED events to be emitted by the source
libvirtd during post-copy migration. The first one with
VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED detail, while the second one reports
the corrected VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY detail. This is
inevitable because we don't know whether migration will eventually
switch to post-copy at the time we emit the first event.
https://bugzilla.redhat.com/show_bug.cgi?id=1647365
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_process.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 622341b8a4..2c89978996 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1543,9 +1543,13 @@ static int
qemuProcessHandleMigrationStatus(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virDomainObjPtr vm,
int status,
- void *opaque ATTRIBUTE_UNUSED)
+ void *opaque)
{
qemuDomainObjPrivatePtr priv;
+ virQEMUDriverPtr driver = opaque;
+ virObjectEventPtr event = NULL;
+ virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
+ int reason;
virObjectLock(vm);
@@ -1562,8 +1566,28 @@ qemuProcessHandleMigrationStatus(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
priv->job.current->stats.mig.status = status;
virDomainObjBroadcast(vm);
+ if (status == QEMU_MONITOR_MIGRATION_STATUS_POSTCOPY &&
+ virDomainObjGetState(vm, &reason) == VIR_DOMAIN_PAUSED &&
+ reason == VIR_DOMAIN_PAUSED_MIGRATION) {
+ VIR_DEBUG("Correcting paused state reason for domain %s to %s",
+ vm->def->name,
+ virDomainPausedReasonTypeToString(VIR_DOMAIN_PAUSED_POSTCOPY));
+
+ virDomainObjSetState(vm, VIR_DOMAIN_PAUSED, VIR_DOMAIN_PAUSED_POSTCOPY);
+ event = virDomainEventLifecycleNewFromObj(vm,
+ VIR_DOMAIN_EVENT_SUSPENDED,
+ VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY);
+
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0) {
+ VIR_WARN("Unable to save status on vm %s after state change",
+ vm->def->name);
+ }
+ }
+
cleanup:
virObjectUnlock(vm);
+ virObjectEventStateQueue(driver->domainEventState, event);
+ virObjectUnref(cfg);
return 0;
}
--
2.19.1
5 years, 12 months
[libvirt] [PATCH 00/18] Implement original label remembering
by Michal Privoznik
Dear list,
there were several attempts in the past to implement this feature, but
none of them was successful. The problem is that we change security
labels when starting a domain but never record the original labels
therefore when restoring the labels back in domain shutdown phase we
have to go with root:root or restorecon. This is not user friendly.
Now that we have metadata locking implemented we have exclusive access
to the files we are touching and therefore can call functions to record
the original owner. Since this database needs to be distributed
(consider multiple daemons and an network file system) it can't be
stored inside a daemon (libvirtd knows nothing about other daemons
running on distant hosts). Therefore the next option is to store it with
the files themselves - in XATTRs.
There is one caveat though. A file can be passed to multiple domains at
the same time (for instance an installation ISO), therefore we need a
reference counter so that the only the last label restore call actually
restores the original owner. A picture is worth more than a thousand
words:
# chown 5:6 /var/lib/libvirt/images/fd.img
# ls -ln /var/lib/libvirt/images/fd.img
-rw-r--r-- 1 5 6 2097152 Mar 17 2018 /var/lib/libvirt/images/fd.img
# getfattr -d -m - /var/lib/libvirt/images/fd.img
(no output)
# virsh domblklist fedora
Target Source
------------------------------------------------
sda /var/lib/libvirt/images/fedora.qcow2
sdb /var/lib/libvirt/images/fd.img
# virsh domblklist gentoo
Target Source
----------------------------------------------------------------------
fda /var/lib/libvirt/images/fd.img
sda /var/lib/libvirt/images/gentoo.qcow2
# virsh start fedora
Domain fedora started
# getfattr -d -m - /var/lib/libvirt/images/fd.img
trusted.libvirt.security.dac="+5:+6"
trusted.libvirt.security.ref_dac="1"
# virsh start gentoo
Domain gentoo started
# getfattr -d -m - /var/lib/libvirt/images/fd.img
trusted.libvirt.security.dac="+5:+6"
trusted.libvirt.security.ref_dac="2"
# virsh shutdown --domain fedora
Domain fedora is being shutdown
# ls -ln /var/lib/libvirt/images/fd.img
-rw-r--r-- 1 0 0 2097152 Mar 17 2018 /var/lib/libvirt/images/fd.img
# getfattr -d -m - /var/lib/libvirt/images/fd.img
trusted.libvirt.security.dac="+5:+6"
trusted.libvirt.security.ref_dac="1"
# virsh shutdown --domain gentoo
Domain gentoo is being shutdown
# getfattr -d -m - /var/lib/libvirt/images/fd.img
(no output)
# ls -ln /var/lib/libvirt/images/fd.img
-rw-r--r-- 1 5 6 2097152 Mar 17 2018 /var/lib/libvirt/images/fd.img
Even though I'm showing DAC only in my example, it's the same story with
SELinux.
Of course, this plays nicely with filesystems that don't support XATTRs,
which there are not that much, but unfortunately NFS is one of them :(
Michal Prívozník (18):
security: Unify header conditionals
util: Introduce xattr getter/setter/remover
security: Include security_util
security_dac: Restore label on failed chown() attempt
virSecurityDACTransactionRun: Implement rollback
virSecurityDACRestoreAllLabel: Reorder device relabeling
virSecurityDACRestoreAllLabel: Restore more labels
security_dac: Allow callers to enable/disable label remembering/recall
security_dac: Remember old labels
virSecurityDACRestoreImageLabelInt: Restore even shared/RO disks
security_selinux: Track if transaction is restore
security_selinux: Remember old labels
security_selinux: Restore label on failed setfilecon() attempt
virSecuritySELinuxTransactionRun: Implement rollback
virSecuritySELinuxRestoreAllLabel: Reorder device relabeling
virSecuritySELinuxRestoreAllLabel: Restore more labels
tools: Provide a script to recover fubar'ed XATTRs setup
qemu.conf: Allow users to enable/disable label remembering
src/libvirt_private.syms | 3 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 6 +
src/qemu/qemu_conf.c | 4 +
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/security/Makefile.inc.am | 2 +
src/security/security_apparmor.h | 6 +-
src/security/security_dac.c | 212 +++++++++++++++++-------
src/security/security_dac.h | 6 +-
src/security/security_driver.h | 6 +-
src/security/security_manager.h | 6 +-
src/security/security_nop.h | 6 +-
src/security/security_selinux.c | 256 +++++++++++++++++++++--------
src/security/security_selinux.h | 6 +-
src/security/security_stack.h | 6 +-
src/security/security_util.c | 198 ++++++++++++++++++++++
src/security/security_util.h | 32 ++++
src/util/virfile.c | 121 ++++++++++++++
src/util/virfile.h | 11 ++
tools/Makefile.am | 1 +
tools/libvirt_recover_xattrs.sh | 89 ++++++++++
21 files changed, 829 insertions(+), 150 deletions(-)
create mode 100644 src/security/security_util.c
create mode 100644 src/security/security_util.h
create mode 100755 tools/libvirt_recover_xattrs.sh
--
2.18.1
5 years, 12 months
[libvirt] [PATCH 0/2] lxc: Fix a bug related to IPv{4, 6} gateway persistent setting.
by Julio Faracco
This serie fixes a bug related to IPv{4,6} gateway settings when it is
defined and used with multiple network definitions. Basically, this data
is being carried on to the next network settings because the pointer is
not being cleaned up/initialized properly.
This serie add a new test case to cover this scenario too. It will be so
important to network index implemented on LXC 3.X.
Julio Faracco (2):
lxc: Initializing IPv6 and IPv4 gateway to overwrite old settings.
tests: Adding test case to include multiple network definitions.
src/lxc/lxc_native.c | 3 ++
.../lxcconf2xml-miscnetwork-v3.config | 23 ++++++++++
.../lxcconf2xml-miscnetwork.config | 23 ++++++++++
.../lxcconf2xml-miscnetwork.xml | 45 +++++++++++++++++++
tests/lxcconf2xmltest.c | 2 +
5 files changed, 96 insertions(+)
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-miscnetwork-v3.config
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-miscnetwork.config
create mode 100644 tests/lxcconf2xmldata/lxcconf2xml-miscnetwork.xml
--
2.19.1
5 years, 12 months
[libvirt] [PATCH] qemu: Arm architectures don't have a default machine type
by Andrea Bolognani
Commit 26cfb1a3cd39 introduced a list of preferred machine types,
which are meant to reflect QEMU's per-architecture historical
defaults and shield libvirt users from any changes in that area.
Arm architectures, however, never had a default machine type
associated with them, so if no machine type is requested by the
user we should just go through the usual path of picking the
first one reported by the 'query-machines' QMP command instead
of using integratorcp straight away.
Reported-by: Kashyap Chamarthy <kchamart(a)redhat.com>
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fde27010e4..09980467b1 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2200,10 +2200,10 @@ static const char *preferredMachines[] =
NULL, /* VIR_ARCH_NONE (not a real arch :) */
"clipper", /* VIR_ARCH_ALPHA */
NULL, /* VIR_ARCH_ARMV6L (no QEMU impl) */
- "integratorcp", /* VIR_ARCH_ARMV7L */
- "integratorcp", /* VIR_ARCH_ARMV7B */
+ NULL, /* VIR_ARCH_ARMV7L (no default machine type) */
+ NULL, /* VIR_ARCH_ARMV7B (no default machine type) */
- "integratorcp", /* VIR_ARCH_AARCH64 */
+ NULL, /* VIR_ARCH_AARCH64 (no default machine type) */
"axis-dev88", /* VIR_ARCH_CRIS */
"pc", /* VIR_ARCH_I686 */
NULL, /* VIR_ARCH_ITANIUM (doesn't exist in QEMU any more) */
--
2.19.1
5 years, 12 months
[libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
by Wang Huaqiang
These patches are the remaining part for the CMT enabling series,
and most of the series have been merged.
This series is addressing John's review comments and suggestions,
which are
https://www.redhat.com/archives/libvir-list/2018-November/msg00907.html
https://www.redhat.com/archives/libvir-list/2018-November/msg00510.html
https://www.redhat.com/archives/libvir-list/2018-November/msg00561.html
Change lists:
Changes in v10:
-. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData, thus
qemuDomainGetResctrlMonData could be reused for MBM.
-. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr list.
-. Add qemuDomainFreeResctrlMonData.
-. Add virResctrlMonitorFreeStats.
-. Return a list of virResctrlMonitorStatsPtr instead of
a virResctrlMonitorStats array in virResctrlMonitorGetStats.
Changes in V9:
-. Addressing code review comments form John.
-. Refined the names for new data structure and new functions.
-. Merged qemuDomainGetStatsCpuResMonitorPerTag and qemuDomainGetStatsCpuResMonitor,
and refined new function name based on the fact that we only support cache monitor now.
Wang Huaqiang (4):
util: Return a list of pointer in virResctrlMonitorGetStats
util: Add function to free monitor statistical data
qemu: Report cache occupancy (CMT) with domstats
docs: Updated news.xml for CMT
docs/news.xml | 12 ++++
src/libvirt-domain.c | 12 ++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_driver.c | 183 ++++++++++++++++++++++++++++++++++++++++++++++-
src/util/virresctrl.c | 26 +++++--
src/util/virresctrl.h | 8 ++-
tools/virsh.pod | 14 ++++
7 files changed, 248 insertions(+), 8 deletions(-)
--
2.7.4
5 years, 12 months
[libvirt] [PATCH RFC 00/22] Move process code to qemu_process
by Chris Venteicher
Make process code usable outside qemu_capabilities by moving code
from qemu_capabilities to qemu_process and exposing public functions.
The process code is used to activate a non domain QEMU process for QMP
message exchanges.
This patch set modifies capabilities to use the new public functions.
--
The process code is being decoupled from qemu_capabilities now to
support hypervisor baseline and comparison using QMP commands.
This patch set was originally submitted as part of the baseline patch set:
[libvirt] [PATCH v4 00/37] BaselineHypervisorCPU using QEMU QMP exchanges
https://www.redhat.com/archives/libvir-list/2018-November/msg00091.html
The baseline and comparison requirements are described here:
https://bugzilla.redhat.com/show_bug.cgi?id=1511999
https://bugzilla.redhat.com/show_bug.cgi?id=1511996
I am extracting and resubmitting just the process changes as a stand
alone series to try to make review easier.
The patch set shows capabilities using the public functions.
To see baseline using the public functions...
Look at the "qemu_driver:" patches at the end of
https://www.redhat.com/archives/libvir-list/2018-November/msg00091.html
Also,
The "qemu_driver: Support feature expansion via QEMU when baselining cpu"
patch might be of particular interest because the same QEMU process is
used for both baseline and expansion using QMP commands.
--
Many patches were used to isolate code moves and name changes from other
actual implementation changes.
The patches reuse the pattern of public qemuProcess{Start,Stop} functions
and internal static qemuProcess{Init,Launch,ConnectMonitor} functions
but adds a "Qmp" suffix to make them unique.
A number of patches are about re-partitioning the code into static
functions for initialization, process launch and connection monitor
stuff. This matches the established pattern in qemu_process and seemed
to make sense to do.
For concurrency...
A thread safe library function creates a unique directory under libDir for each QEMU
process (for QMP messaging) to decouple processes in terms of sockets and
file system footprint.
Every patch should compile independently if applied in sequence.
Chris Venteicher (22):
qemu_process: Move process code from qemu_capabilities to qemu_process
qemu_process: Use qemuProcess prefix
qemu_process: Limit qemuProcessNew to const input strings
qemu_process: Refer to proc not cmd in process code
qemu_process: Use consistent name for stop process function
qemu_capabilities: Stop QEMU process before freeing
qemu_process: Use qemuProcess struct for a single process
qemu_process: Persist stderr in qemuProcess struct
qemu_capabilities: Detect caps probe failure by checking monitor ptr
qemu_process: Introduce qemuProcessStartQmp
qemu_process: Collect monitor code in single function
qemu_process: Store libDir in qemuProcess struct
qemu_process: Setup paths within qemuProcessInitQmp
qemu_process: Stop retaining Qemu Monitor config in qemuProcess
qemu_process: Don't open monitor if process failed
qemu_process: Cleanup qemuProcess alloc function
qemu_process: Cleanup qemuProcessStopQmp function
qemu_process: Catch process free before process stop
qemu_monitor: Make monitor callbacks optional
qemu_process: Enter QMP command mode when starting QEMU Process
qemu_process: Use unique directories for QMP processes
qemu_process: Stop locking QMP process monitor immediately
src/qemu/qemu_capabilities.c | 300 +++++------------------------
src/qemu/qemu_monitor.c | 4 +-
src/qemu/qemu_process.c | 356 +++++++++++++++++++++++++++++++++++
src/qemu/qemu_process.h | 37 ++++
tests/qemucapabilitiestest.c | 7 +
5 files changed, 444 insertions(+), 260 deletions(-)
--
2.17.1
5 years, 12 months
[libvirt] [BUG][PATCH][RRFC][libvirt-python] libvirtError(..., conn=, dom=. vol=, pool=, snap=)
by Philipp Hahn
Hi,
while working on the Python type annotations for the Python libvirt
binding I noticed the following code in
libvirt-override-virDomainSnapshot.py:
> def listAllChildren(self, flags=0):
> """List all child snapshots and returns a list of snapshot objects"""
...
> raise libvirtError("..., conn=self)
"self" is an instance of virDomainSnapshot here.
I found two similar cases where "conn" was not a "virConnect" instance
in listAllSnapshots() and listAllVolumes().
Compare that with the declaration of libvirtError in libvirt-override.py:
> class libvirtError(Exception):
> def __init__(self, defmsg, conn=None, dom=None, net=None, pool=None, vol=None):
Looking further at the implementation of that method only "defmsg" is
used; all other references are not accessed and never stored in an
instance variable.
Should I add a new "snap" argument to libvirtError.__init__() or should
we stop passing those references to the constructor altogether?
Patch 2 and 3 might be applied to the current branch already, patch 1
currently depends on my other work.
Philipp
--
Philipp Hahn
Open Source Software Engineer
Univention GmbH
be open.
Mary-Somerville-Str. 1
D-28359 Bremen
Tel.: +49 421 22232-0
Fax : +49 421 22232-99
hahn(a)univention.de
http://www.univention.de/
Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876
5 years, 12 months
[libvirt] [PATCH 0/6] qemu: Implement nested HV support for pSeries guests
by Andrea Bolognani
Andrea Bolognani (6):
qemu: Drop duplicated code from qemuDomainDefValidateFeatures()
tests: Add capabilities data for QEMU 3.1.0 on ppc64
qemu: Introduce QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV
conf: Parse and format nested-hv feature
qemu: Format nested-hv feature on the command line
news: Document nested-hv feature
docs/formatdomain.html.in | 12 +
docs/news.xml | 10 +
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 4 +
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 20 +
src/qemu/qemu_domain.c | 15 +-
.../caps_3.1.0.ppc64.replies | 23503 ++++++++++++++++
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1076 +
tests/qemucapabilitiestest.c | 1 +
.../qemucaps2xmloutdata/caps_3.1.0.ppc64.xml | 26 +
tests/qemucaps2xmltest.c | 1 +
tests/qemuxml2argvdata/pseries-features.args | 2 +-
tests/qemuxml2argvdata/pseries-features.xml | 1 +
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/pseries-features.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
19 files changed, 24669 insertions(+), 14 deletions(-)
create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.ppc64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_3.1.0.ppc64.xml
create mode 100644 tests/qemucaps2xmloutdata/caps_3.1.0.ppc64.xml
--
2.19.1
5 years, 12 months