[libvirt] [PATCH v2 00/12] Some fixes and improvement for virsh completion in non interactive mode
by Lin Ma
This patch series is about some fixes and improvement for virsh completion
in non interactive mode.
Some of them probably don't make sense, I sent them out for suggestions.
v2->v1:
* Add a new patch for centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to virsh.h
* rename the helper function from virDomainEventGetName virshDomainEventGetName
Follow Peter Krempa's suggestion:
* Drop the original patch#10 which about introduce some VIR_DOMAIN_EVENT_* macros
* code formatting fix
* centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL
* centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL
* refactor some code in patch#10 for using same array, handle the case when
'--event' and '--all' are provided together through command line.
* Due to the helper function is only used for virsh, unnecessary to be publiced,
I move it from src/conf/domain_event.c to tools/virsh-util.c
Lin Ma (12):
virsh: Move the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to
virsh.h
virsh: Add domain name completion to 'migrate-postcopy' command
virsh: Conditionally Ignore the first entry in list of completions
virsh: Create macros for VSH_OT_STRING "domain" option
virsh: Apply macro for current VSH_OT_STRING "domain" options
vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_ARGV
options
virsh: Create macros for VSH_OT_ARGV "domain" option
virsh: Apply macro for current VSH_OT_ARGV "domain" options
vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options
to list
virsh: Enable multiple --event flags to 'event' command
virsh: add helper for returning event name string
virsh: Add event name completion to 'event' command
tools/virsh-completer.c | 37 ++++++++++++
tools/virsh-completer.h | 3 +
tools/virsh-domain-monitor.c | 9 +--
tools/virsh-domain.c | 135 ++++++++++++++++++++-----------------------
tools/virsh-snapshot.c | 3 -
tools/virsh-util.c | 60 +++++++++++++++++++
tools/virsh-util.h | 3 +
tools/virsh.h | 26 +++++++++
tools/vsh.c | 12 +++-
9 files changed, 203 insertions(+), 85 deletions(-)
--
2.15.1
6 years, 6 months
[libvirt] [PATCH 0/9] Some virsh completion fixes
by Lin Ma
patch 1 is not about completion, I merge it into this patch set for
easy review because it's a tiny fix.
Lin Ma (9):
virsh: Remove 'id' text from help message for 'domrename' command
virsh: Only return active domain names for 'reset' command
virsh: Only return active domain names for block* command
virsh-network: Create macros for VSH_OT_STRING "network" option
virsh-network: Add network name completion to 'net-event' command
virsh-network: Add macro VIRSH_COMMON_OPT_NETWORK_FULL
virsh-network: Add network name completion to 'net-uuid' command
virsh: Introduce virshDomainBlockTargetCompleter
virsh: Add target name completion for block device options
tools/virsh-completer.c | 48 ++++++++++++++++++++++++++++++++++++++++++++
tools/virsh-completer.h | 4 ++++
tools/virsh-domain-monitor.c | 2 ++
tools/virsh-domain.c | 23 ++++++++++++++-------
tools/virsh-network.c | 47 +++++++++++++++++++++++++------------------
5 files changed, 97 insertions(+), 27 deletions(-)
--
2.16.2
6 years, 6 months
[libvirt] [PATCH] libxl: don't set hasManagedSave when performing save
by Jim Fehlig
libxlDoDomainSave() is used in both the save and managedsave code
paths but was unconditionally setting hasManagedSave to true on
success. As a result, undefine would fail after a non-managed
save/restore operation. E.g.
virsh define; virsh start
virsh save; virsh restore
virsh shutdown
virsh undefine
error: Refusing to undefine while domain managed save image exists
Modify libxlDoDomainSave() to take an additional parameter to
specify managed vs non-managed save, and change callers to use it.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_driver.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 34adef8d48..df53dead0a 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1653,8 +1653,10 @@ libxlDomainGetState(virDomainPtr dom,
* virDomainObjPtr must be locked on invocation
*/
static int
-libxlDoDomainSave(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
- const char *to)
+libxlDoDomainSave(libxlDriverPrivatePtr driver,
+ virDomainObjPtr vm,
+ const char *to,
+ bool managed)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
libxlSavefileHeader hdr;
@@ -1725,7 +1727,7 @@ libxlDoDomainSave(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
}
libxlDomainCleanup(driver, vm);
- vm->hasManagedSave = true;
+ vm->hasManagedSave = managed;
ret = 0;
cleanup:
@@ -1772,7 +1774,7 @@ libxlDomainSaveFlags(virDomainPtr dom, const char *to, const char *dxml,
if (virDomainObjCheckActive(vm) < 0)
goto endjob;
- if (libxlDoDomainSave(driver, vm, to) < 0)
+ if (libxlDoDomainSave(driver, vm, to, false) < 0)
goto endjob;
if (!vm->persistent)
@@ -1989,7 +1991,7 @@ libxlDomainManagedSave(virDomainPtr dom, unsigned int flags)
VIR_INFO("Saving state to %s", name);
- if (libxlDoDomainSave(driver, vm, name) < 0)
+ if (libxlDoDomainSave(driver, vm, name, true) < 0)
goto endjob;
if (!vm->persistent)
--
2.16.3
6 years, 6 months
[libvirt] [PATCH v2 0/8] vfio-ccw passthrough support
by Boris Fiuczynski
Let us support the basic channel I/O passthrough infrastructure based on
vfio, which have been introduced in QEMU 2.10. The current focus is to
support dasd-eckd (cu_type/dev_type = 0x3990/0x3390) as the target
device.
Shalini Chellathurai Saroja (8):
qemu: introduce capability for virtual-css-bridge
qemu: introduce vfio-ccw capability
util: virhostdev: add virHostdevIsMdevDevice()
qemu: vfio-ccw device address generation
qemu: command line generation for vfio-ccw device
tests: tests for vfio-ccw passthrough
docs: documentation for vfio-ccw passthrough
news: documentation of new feature
docs/drvnodedev.html.in | 21 ++++-
docs/formatdomain.html.in | 20 +++-
docs/news.xml | 9 ++
docs/schemas/domaincommon.rng | 5 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 23 +++++
src/qemu/qemu_capabilities.h | 5 +
src/qemu/qemu_command.c | 37 ++++++--
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_domain_address.c | 32 +++++--
src/qemu/qemu_hostdev.c | 3 +-
src/qemu/qemu_hotplug.c | 4 +-
src/util/virhostdev.c | 26 ++++--
src/util/virhostdev.h | 3 +
src/util/virmdev.c | 3 +-
src/util/virmdev.h | 1 +
.../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 28 ++++--
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.11.0.s390x.replies | 28 ++++--
tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.12.0.s390x.replies | 31 +++++--
tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 3 +
.../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 24 +++--
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 28 ++++--
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 3 +-
.../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 28 ++++--
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 3 +-
tests/qemuhotplugtest.c | 2 +-
...tdev-subsys-mdev-vfio-ccw-duplicate-address.xml | 29 ++++++
...ostdev-subsys-mdev-vfio-ccw-invalid-address.xml | 23 +++++
.../hostdev-subsys-mdev-vfio-ccw.args | 26 ++++++
.../hostdev-subsys-mdev-vfio-ccw.xml | 22 +++++
tests/qemuxml2argvtest.c | 102 ++++++++++++---------
.../hostdev-subsys-mdev-vfio-ccw.xml | 28 ++++++
tests/qemuxml2xmltest.c | 31 ++++---
36 files changed, 494 insertions(+), 149 deletions(-)
create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-duplicate-address.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw-invalid-address.xml
create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.args
create mode 100644 tests/qemuxml2argvdata/hostdev-subsys-mdev-vfio-ccw.xml
create mode 100644 tests/qemuxml2xmloutdata/hostdev-subsys-mdev-vfio-ccw.xml
--
2.9.4
6 years, 6 months
[libvirt] [PATCH 0/3] bhyve: allow locking memory
by Fabian Freyer
This patch series adds support for locking guest memory to the bhyve
driver using the following elements
<memoryBacking>
<locked/>
</memoryBacking>
When specified, the -S flag is passed to the bhyve binary.
Fabian Freyer (3):
bhyve: add support for wiring memory
bhyve: add tests for wiring memory
bhyve: document support for wiring guest memory
docs/drvbhyve.html.in | 14 +++++++++
docs/news.xml | 10 ++++++
src/bhyve/bhyve_command.c | 3 ++
src/bhyve/bhyve_parse_command.c | 3 ++
tests/bhyveargv2xmldata/bhyveargv2xml-wired.args | 7 +++++
tests/bhyveargv2xmldata/bhyveargv2xml-wired.xml | 19 ++++++++++++
tests/bhyveargv2xmltest.c | 1 +
tests/bhyvexml2argvdata/bhyvexml2argv-wired.args | 10 ++++++
tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs | 3 ++
tests/bhyvexml2argvdata/bhyvexml2argv-wired.xml | 26 ++++++++++++++++
tests/bhyvexml2argvtest.c | 1 +
.../bhyvexml2xmloutdata/bhyvexml2xmlout-wired.xml | 36 ++++++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
13 files changed, 134 insertions(+)
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-wired.args
create mode 100644 tests/bhyveargv2xmldata/bhyveargv2xml-wired.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-wired.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-wired.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-wired.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-wired.xml
--
2.15.1
6 years, 6 months
[libvirt] [PATCH 0/5] Rely on GnuTLS for md5/sha256 functions
by Ján Tomko
Ján Tomko (5):
vircrypto: provide constants for hash sizes
Introduce virCryptoHashBuf
esx: use virCryptoHashBuf
esx: Use VIR_CRYPTO_HASH_SIZE_MD5
vircrypto: Rely on GnuTLS for hash functions
bootstrap.conf | 2 --
src/esx/esx_network_driver.c | 22 ++++++++------
src/esx/esx_storage_backend_iscsi.c | 46 +++++++++++++++++-------------
src/esx/esx_storage_backend_vmfs.c | 20 ++++++-------
src/util/vircrypto.c | 57 ++++++++++++++++++++++++++-----------
src/util/vircrypto.h | 10 +++++++
6 files changed, 100 insertions(+), 57 deletions(-)
--
2.16.1
6 years, 6 months
[libvirt] [PATCH] travis: Uninstall packages before upgrade
by Andrea Bolognani
numpy (needed by cgal) started having the same issue with
linking as python, which makes upgrade and thus the entire
build fail on macOS.
Instead of playing more tricks with linking/unlinking, just
uninstall the problematic packages (and those dragging them
in) before doing anything else.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Technically a build breaker, but since I'm changing the
approach I'd rather wait for an explicit ACK before pushing.
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index d3f72d46f3..140072b801 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,10 +21,10 @@ matrix:
- compiler: clang
os: osx
before_install:
+ - brew uninstall python mercurial postgis sfcgal cgal gdal
- brew update
- - brew unlink python
- brew upgrade
- - brew install rpcgen yajl
+ - brew install python rpcgen yajl
script:
# We can't run make distcheck/syntax-check because they
# fail on macOS, but doing 'install' and 'dist' gives us
--
2.17.0
6 years, 6 months
[libvirt] [PATCH] tests: Fix qemucapsprobemock linking
by Martin Kletzander
Add libvirt.la into qemucapsprobemock_la_LIBADD because that mock uses bunch of
libvirt internal functions. Without this patch the following error occurs:
$ ./qemucapsprobe /usr/bin/qemu-system-x86_64
...
warning : virQEMUCapsLogProbeFailure:4204 : Failed to probe capabilities for
/usr/bin/qemu-system-x86_64: internal error: Failed to probe QEMU binary with
QMP: /usr/bin/qemu-system-x86_64: symbol lookup error:
.../qemucapsprobemock.so: undefined symbol: virJSONValueObjectHasKey
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
TBH I didn't go into details why this is needed. It still seems fishy to me.
Not only that I get that error above as a libvirt error, but if i add just
libvirt_util.la in there, I get:
.../qemucapsprobe: symbol lookup error: .../qemucapsprobemock.so:
undefined symbol: libvirt_event_poll_update_handle_semaphore
If anyone has a better idea how this should be fixed, please suggest that.
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 05db6b1192a4..24ea41f5176c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -619,7 +619,7 @@ qemucapsprobe_LDADD = \
qemucapsprobemock_la_SOURCES = \
qemucapsprobemock.c
qemucapsprobemock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
-qemucapsprobemock_la_LIBADD = $(MOCKLIBS_LIBS)
+qemucapsprobemock_la_LIBADD = $(MOCKLIBS_LIBS) ../src/libvirt.la
qemucommandutiltest_SOURCES = \
qemucommandutiltest.c \
--
2.17.0
6 years, 6 months
[libvirt] [dbus PATCH v2 0/3] Type fixes
by Katerina Koukiou
Katerina Koukiou (3):
virtDBusNetworkGetDHCPLeases: fix lease type
Replace uint -> int wherever libvirt uses int type
virtDBusNetworkGetDHCPLeases: fix type for expirytime
data/org.libvirt.Connect.xml | 18 +++++++++---------
data/org.libvirt.Domain.xml | 18 +++++++++---------
data/org.libvirt.Network.xml | 2 +-
data/org.libvirt.Secret.xml | 2 +-
data/org.libvirt.StoragePool.xml | 2 +-
src/connect.c | 6 +++---
src/domain.c | 22 +++++++++++-----------
src/events.c | 12 ++++++------
src/network.c | 4 ++--
src/secret.c | 2 +-
src/storagepool.c | 2 +-
11 files changed, 45 insertions(+), 45 deletions(-)
--
2.15.0
6 years, 6 months