[libvirt] [PATCH v2 0/5] Add read error ignore to storage backend vol info APIs
by John Ferlan
v1 took a simplistic approach:
http://www.redhat.com/archives/libvir-list/2015-October/msg00919.html
but not specific enough according to the review. So adding some extra
complexity of checking for specific errors and flag bits to "ignore" the
error similar to the catch-all openflags VIR_STORAGE_VOL_OPEN_NOERROR for
all the virStorageBackendUpdateVol{Info|TargetInfo|TargetInfoFD} API's
which are used to get the volume capacity, allocation, etc. data.
Along the way an inavertent bug was found and fixed in patch 3 in
virStorageBackendUpdateVolTargetInfo where an error could have been
reported, but not propagated back to the user since 'ret' would have
been 0 after the virStorageBackendUpdateVolTargetInfoFD call.
John Ferlan (5):
storage: Add readflags for backend error processing
storage: Add comments for backend APIs
storage: Handle readflags errors
storage: Add debug message
storage: Ignore block devices that fail format detection
src/storage/storage_backend.c | 151 +++++++++++++++++++++++++++-------
src/storage/storage_backend.h | 20 ++++-
src/storage/storage_backend_disk.c | 5 +-
src/storage/storage_backend_fs.c | 8 +-
src/storage/storage_backend_gluster.c | 2 +-
src/storage/storage_backend_logical.c | 2 +-
src/storage/storage_backend_mpath.c | 2 +-
src/storage/storage_backend_scsi.c | 6 +-
8 files changed, 153 insertions(+), 43 deletions(-)
--
2.5.0
8 years, 11 months
[libvirt] [PATCH LIBVIRT v1 0/2] Support maxvcpus (AKA >1 vcpu on Xen/ARM)
by Ian Campbell
libvirt currently clamps the maximum number of vcpus to MAX_VIRT_CPUS
== XEN_LEGACY_MAX_VCPUS, which on ARM is 1 (because all guests are expected
to support vcpu info placement).
Even on x86 this limitation is a hold over from an older xm interface where
the maximum number of vcpus was expressed as a bitmap and so limited to the
number of bits in an unsigned long (for which XEN_LEGACY_MAX_VCPUS is a
convenient proxy), which doesn't apply to xl on x86 which uses a bitmap
data type to express larger bitmaps.
To do this it was necessary to add a new value to xenConfigVersionEnum
corresponding to this new version.
I've tested with tests/x?configtest (including new test case) on x86 and on
ARM with xlconfigtest and via domxml-from-native.
As you might infer from some of the changlogs I feel a bit like I am
abusing xendConfigVersion somewhat here (given that xl != xend, and that
real xend never went passed xend_config_version) but its use is quite
widespread in the common xl/xm support code in libvirt so a great deal of
refactoring/renaming would otherwise seem to be required. I'm open to other
ideas or suggestions though.
Ian.
8 years, 11 months
[libvirt] libvirt-php 0.5.1 - missing arginfo
by Remi Collet
Hi,
arginfo are very important in PHP extensions, useful for users
(documentation), and various tools rely on them (through reflection).
Attached patch add some.
Tell me if ok, and I will continue to add more.
Remi.
8 years, 11 months
[libvirt] [PATCH v2 0/2] libxl: implement virDomainInterfaceStats
by Joao Martins
Hey,
This patch series implements virDomainInterfaceStats
but based on "ConsoleCallback" as opposed of doing it in libxlDomainStart.
The series is divided as following: Patch 1 renames console callback to
something more generic and Patch 2 implements virDomainInterfaceStats also
taking the previous review (v3 statistics) comments.
Changes since v1:
- Improve error reporting in case interface is not known
- Use libxl_device_nic_list as opposed to libxl_domain_config
Regards,
Joao
Joao Martins (2):
libxl: rename libxlConsoleCallback
libxl: implement virDomainInterfaceStats
src/libxl/libxl_domain.c | 33 ++++++++++++++++++++++++++++--
src/libxl/libxl_driver.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 2 deletions(-)
--
2.1.4
8 years, 12 months
[libvirt] [PATCH] network: selectively disable -Wcast-align in virNetDevParseDadStatus
by Ian Campbell
Commit 0f7436ca54c9 "network: wait for DAD to finish for bridge IPv6 addresses"
results in:
CC util/libvirt_util_la-virnetdevmacvlan.lo
util/virnetdev.c: In function 'virNetDevParseDadStatus':
util/virnetdev.c:1319:188: error: cast increases required alignment of target type [-Werror=cast-align]
util/virnetdev.c:1332:41: error: cast increases required alignment of target type [-Werror=cast-align]
util/virnetdev.c:1334:92: error: cast increases required alignment of target type [-Werror=cast-align]
cc1: all warnings being treated as errors
on at least ARM platforms.
The three macros involved (NLMSG_NEXT, IFA_RTA and RTA_NEXT) all appear to
correctly take care of alignment, therefore suppress Wcast-align around their
uses.
Signed-off-by: Ian Campbell <ian.campbell(a)citrix.com>
Cc: Maxim Perevedentsev <mperevedentsev(a)virtuozzo.com>
Cc: Laine Stump <laine(a)laine.org>
Cc: Dario Faggioli <dario.faggioli(a)citrix.com>
Cc: Jim Fehlig <jfehlig(a)suse.com>
---
src/util/virnetdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index ade9afa..0bc809e 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1316,7 +1316,10 @@ virNetDevParseDadStatus(struct nlmsghdr *nlh, int len,
struct rtattr *rtattr_ptr;
size_t i;
struct in6_addr *addr;
+
+ VIR_WARNINGS_NO_CAST_ALIGN
for (; NLMSG_OK(nlh, len); nlh = NLMSG_NEXT(nlh, len)) {
+ VIR_WARNINGS_RESET
if (NLMSG_PAYLOAD(nlh, 0) < sizeof(struct ifaddrmsg)) {
/* Message without payload is the last one. */
break;
@@ -1329,9 +1332,11 @@ virNetDevParseDadStatus(struct nlmsghdr *nlh, int len,
}
ifaddrmsg_len = IFA_PAYLOAD(nlh);
+ VIR_WARNINGS_NO_CAST_ALIGN
rtattr_ptr = (struct rtattr *) IFA_RTA(ifaddrmsg_ptr);
for (; RTA_OK(rtattr_ptr, ifaddrmsg_len);
rtattr_ptr = RTA_NEXT(rtattr_ptr, ifaddrmsg_len)) {
+ VIR_WARNINGS_RESET
if (RTA_PAYLOAD(rtattr_ptr) != sizeof(struct in6_addr)) {
/* No address: ignore. */
continue;
--
2.1.4
8 years, 12 months
[libvirt] [PATCH 0/8] Make loading domains with invalid XML possible
by Martin Kletzander
The RFC version [1] was ACKed, but I have found out that we could then
cause inconsistency by calling virDomainCreateXML() or Restore() calls
etc. This series is basically the same apart from the fact that it is
rebased on current master and then one simple diff [2] is added to
PATCH 5/8.
[1] https://www.redhat.com/archives/libvir-list/2015-September/msg00698.html
[2] diff to the previous version:
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 16f26acf4839..c8291be2b7b5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2875,6 +2875,14 @@ virDomainObjListAddLocked(virDomainObjListPtr doms,
}
}
+ if (vm->def->parseError) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("domain '%s' was not loaded due to an XML error "
+ "(%s), please redefine it"),
+ vm->def->name, vm->def->parseError);
+ virDomainObjEndAPI(&vm);
+ }
+
virDomainObjAssignDef(vm,
def,
!!(flags & VIR_DOMAIN_OBJ_LIST_ADD_LIVE),
--
Martin Kletzander (8):
conf, virsh: Add new domain shutoff reason
qemu: Few whitespace cleanups
conf: Extract name-parsing into its own function
conf: Extract UUID parsing into its own function
conf: Optionally keep domains with invalid XML, but don't allow
starting them
qemu: Don't lookup invalid domains unless specified otherwise
qemu: Prepare basic APIs to handle invalid defs
qemu: Load domains with invalid XML on start
include/libvirt/libvirt-domain.h | 2 +
src/bhyve/bhyve_driver.c | 2 +
src/conf/domain_conf.c | 191 +++++++++++++++++++++++++++++++++------
src/conf/domain_conf.h | 5 +
src/libxl/libxl_driver.c | 3 +
src/lxc/lxc_driver.c | 3 +
src/qemu/qemu_driver.c | 64 ++++++++++---
src/uml/uml_driver.c | 2 +
tools/virsh-domain-monitor.c | 3 +-
9 files changed, 234 insertions(+), 41 deletions(-)
--
2.6.3
8 years, 12 months
[libvirt] [PATCH] tools: fix output of list with state-shutoff
by Wei Jiangang
Due to the default of flags is VIR_CONNECT_LIST_DOMAINS_ACTIVE,
It doesn't show the domains that have been shutdown when we use
'virsh list' with only --state-shutoff.
Signed-off-by: Wei Jiangang <weijg.fnst(a)cn.fujitsu.com>
---
tools/virsh-domain-monitor.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index d4e500b..7b30c4c 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1873,7 +1873,8 @@ cmdList(vshControl *ctl, const vshCmd *cmd)
unsigned int flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE;
/* construct filter flags */
- if (vshCommandOptBool(cmd, "inactive"))
+ if (vshCommandOptBool(cmd, "inactive") ||
+ vshCommandOptBool(cmd, "state-shutoff"))
flags = VIR_CONNECT_LIST_DOMAINS_INACTIVE;
if (vshCommandOptBool(cmd, "all"))
--
1.9.3
8 years, 12 months
[libvirt] [PATCH 0/8] Add perf and Intel CMT feature support
by Qiaowei Ren
The series mainly adds Intel CMT feature support into libvirt. CMT is
new introduced PQos (Platform Qos) feature to monitor the usage of
cache by applications running on the platform.
Currently CMT patches has been merged into Linux kernel mainline.
The CMT implementation in Linux kernel is based on perf mechanism and
there is no support for perf in libvirt, and so this series firstly
add perf support into libvirt, including two public API and a set of
util interfaces. And based on these APIs and interfaces, thie series
implements CMT perf event support.
TODO:
1. This series relys on keeping an open file descriptor for the guest.
We should add one patch to call sys_perf_event_open again iff libvirtd
is restarted.
Qiaowei Ren (8):
perf: add new public APIs for perf event
perf: define internal driver API for perf event
perf: implement the public APIs for perf event
perf: implement the remote protocol for perf event
perf: implement a set of util functions for perf event
qemu_driver: add support to perf event
virsh: extend domstats command
virsh: implement new command to support perf
daemon/remote.c | 60 +++++++++++
include/libvirt/libvirt-domain.h | 19 ++++
include/libvirt/virterror.h | 2 +
src/Makefile.am | 1 +
src/driver-hypervisor.h | 12 +++
src/libvirt-domain.c | 106 +++++++++++++++++++
src/libvirt_private.syms | 8 ++
src/libvirt_public.syms | 6 ++
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 181 +++++++++++++++++++++++++++++++
src/qemu/qemu_process.c | 6 ++
src/remote/remote_driver.c | 49 +++++++++
src/remote/remote_protocol.x | 32 +++++-
src/remote_protocol-structs | 20 ++++
src/util/virerror.c | 2 +
src/util/virperf.c | 222 +++++++++++++++++++++++++++++++++++++++
src/util/virperf.h | 60 +++++++++++
tools/virsh-domain-monitor.c | 7 ++
tools/virsh-domain.c | 139 ++++++++++++++++++++++++
tools/virsh.pod | 15 ++-
20 files changed, 947 insertions(+), 3 deletions(-)
create mode 100644 src/util/virperf.c
create mode 100644 src/util/virperf.h
--
1.9.1
8 years, 12 months
[libvirt] [PATCH 0/8] qemu: add support for virtio-input devices
by Ján Tomko
Support virtio-keyboard, virtio-mouse, virtio-tablet and virtio-input-host.
Requires kernel 4.1+ in the guest.
https://www.kraxel.org/blog/2015/06/new-member-in-the-virtio-family-input...
https://bugzilla.redhat.com/show_bug.cgi?id=1231114
Ján Tomko (8):
qemu: add capabilities for virtio input devices
conf: parse and format virtio input bus in domain XML
qemu: build command line for virtio input devices
qemu: add capability for virtio-input-host-device
conf: add XML for input device passthrough
security: label the evdev for input device passthrough
qemu: add passed-through input devs to cgroup ACL
qemu: build command line for virtio-input-host device
docs/formatdomain.html.in | 18 ++++-
docs/schemas/domaincommon.rng | 50 ++++++++----
src/conf/domain_conf.c | 34 ++++++--
src/conf/domain_conf.h | 5 ++
src/qemu/qemu_capabilities.c | 12 +++
src/qemu/qemu_capabilities.h | 4 +
src/qemu/qemu_cgroup.c | 25 ++++++
src/qemu/qemu_command.c | 92 +++++++++++++++++++++-
src/security/security_dac.c | 72 +++++++++++++++++
src/security/security_selinux.c | 70 ++++++++++++++++
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 4 +
.../qemuxml2argv-virtio-input-passthrough.args | 22 ++++++
.../qemuxml2argv-virtio-input-passthrough.xml | 24 ++++++
.../qemuxml2argv-virtio-input.args | 23 ++++++
.../qemuxml2argvdata/qemuxml2argv-virtio-input.xml | 26 ++++++
tests/qemuxml2argvtest.c | 4 +
tests/qemuxml2xmltest.c | 3 +
17 files changed, 462 insertions(+), 26 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-input-passthrough.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-input-passthrough.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-input.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-input.xml
--
2.4.6
8 years, 12 months