[libvirt] [PATCH 0/3] fix regression wrt <interface typ='hostdev'>
by Laine Stump
The full description of the problem fixed by these patches is in patch
3/3. Basically, a recent patch changed the ordering of things during
startup such that hostdev interfaces are given an alias named "netN"
rather than the expected "hostdevN". That caused a problem when
subsequently trying to hotplug another interface of any kind.
This is solved by adding a new function that lets us learn the type of
any interface prior to setting it up, then using that function to
change the behavior when assigning aliases.
This *really* should be pushed before 1.3.3 is released.
Laine Stump (3):
network: new function networkGetActualType
qemu: change args to qemuAssignDeviceHostdevAlias()
qemu: fix alias name for <interface type='hostdev'>
src/network/bridge_driver.c | 72 +++++++++++++++++++++++++++++++++++++++++++++
src/network/bridge_driver.h | 6 +++-
src/qemu/qemu_alias.c | 60 +++++++++++++++++++++----------------
src/qemu/qemu_alias.h | 2 +-
src/qemu/qemu_hotplug.c | 10 +++----
5 files changed, 118 insertions(+), 32 deletions(-)
--
2.5.5
8 years, 8 months
[libvirt] [libvirt-perl][PATCH 0/3] Adapt to new virDomain{Get, Set}PerfEvents API
by Michal Privoznik
It would be nice to have these in before the release.
Michal Privoznik (3):
Adapt to new virDomain{Get,Set}PerfEvents()
gitignore: Add more files to ignore & reorder
Add myself to AUTHORS
.gitignore | 17 ++++++++++-------
AUTHORS | 1 +
Changes | 1 +
Virt.xs | 38 ++++++++++++++++++++++++++++++++++++++
lib/Sys/Virt/Domain.pm | 32 ++++++++++++++++++++++++++++++++
lib/Sys/Virt/Error.pm | 4 ++++
6 files changed, 86 insertions(+), 7 deletions(-)
--
2.7.3
8 years, 8 months
[libvirt] [PATCH for 1.3.3 0/3] qemu: Regenerate per-domain paths on restart
by Martin Kletzander
We forgot to clean up after the domain is torn down. And because they
are kept, we don't regenerate them upn another start and because of
that they contain old IDs in them.
Again, the series is structured as with the previous one [1]. The
smallest part (firs patch only) is enough to fix it for the release,
others can be pushed before or after release. That depends on the
reviewer.
[1] https://www.redhat.com/archives/libvir-list/2016-April/msg00081.html
Martin Kletzander (3):
qemu: Clear generated private paths
qemu: Simplify calls to qemuDomainSetPrivatePaths
qemu: Add qemuDomainClearPrivatePaths and use it
src/qemu/qemu_domain.c | 40 ++++++++++++++++++++++++++++------------
src/qemu/qemu_domain.h | 10 ++++------
src/qemu/qemu_process.c | 9 +++------
3 files changed, 35 insertions(+), 24 deletions(-)
--
2.8.0
8 years, 8 months
[libvirt] [PATCH] apparmor: QEMU monitor socket moved
by Guido Günther
The directory name changed in a89f05ba8df095875f5ec8a9065a585af63a010b.
---
src/security/virt-aa-helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index a2d7226..0ded671 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1366,6 +1366,8 @@ main(int argc, char **argv)
LOCALSTATEDIR, ctl->def->name);
virBufferAsprintf(&buf, " \"%s/lib/libvirt/qemu/domain-%s/monitor.sock\" rw,\n",
LOCALSTATEDIR, ctl->def->name);
+ virBufferAsprintf(&buf, " \"%s/lib/libvirt/qemu/domain-*-%.*s/monitor.sock\" rw,\n",
+ LOCALSTATEDIR, 20, ctl->def->name);
virBufferAsprintf(&buf, " \"%s/run/libvirt/**/%s.pid\" rwk,\n",
LOCALSTATEDIR, ctl->def->name);
virBufferAsprintf(&buf, " \"/run/libvirt/**/%s.pid\" rwk,\n",
--
2.8.0.rc3
8 years, 9 months
[libvirt] [PATCH v2 00/10] Introduce worker tuning APIs
by Erik Skultety
NOTE: patch 2/10 moves typed params definition from libvirt-host.h to
libvirt-common.h.in to enable it for admin as well -> therefore
libvirt-common.h must be regenerated with config.status
- also I'd like to open a discussion about virt-admin commands naming, since
I was sort of of out ideas when I copied numatune,memtune,etc. design into
"workertune"; I thought about srv-threadpool-info and srv-threadpool-set to
be a little consistent with srv-list, but for some reason I found it quite
long-ish so I dropped that...
v2:
- repost of v1 due to rebase conflicts
- due to rebase conflicts and overall changes since the original v1
po/POTFILES.in (patch 1/10) had to be updated
Erik Skultety (10):
po: Fix record ordering in POTFILES.in
libvirt-host: Move virTypedParam* to libvirt-common
admin: Enable usage of typed parameters
util: Refactor thread creation by introducing virThreadPoolExpand
util: Report system error when virThreadCreateFull fails
util: Add more getters to threadpool parameters
admin: Prepare admin protocol for future worker related procedures
admin: Introduce virAdmServerGethreadPoolParameters
admin: Introduce virAdmServerSetThreadPoolParameters
virt-admin: Introduce srv-workertune command
cfg.mk | 2 +-
daemon/admin.c | 102 +++++++++++++++++++
daemon/admin_server.c | 112 +++++++++++++++++++++
daemon/admin_server.h | 11 ++
include/libvirt/libvirt-admin.h | 71 +++++++++++++
include/libvirt/libvirt-common.h.in | 185 ++++++++++++++++++++++++++++++++++
include/libvirt/libvirt-host.h | 186 ----------------------------------
po/POTFILES.in | 4 +-
src/admin/admin_protocol.x | 54 +++++++++-
src/admin/admin_remote.c | 77 ++++++++++++++
src/admin_protocol-structs | 45 +++++++++
src/libvirt-admin.c | 83 +++++++++++++++
src/libvirt_admin_private.syms | 3 +
src/libvirt_admin_public.syms | 2 +
src/libvirt_private.syms | 4 +
src/rpc/virnetserver.c | 37 +++++++
src/rpc/virnetserver.h | 13 +++
src/util/virthreadpool.c | 196 ++++++++++++++++++++++++------------
src/util/virthreadpool.h | 8 ++
tools/virt-admin.c | 132 ++++++++++++++++++++++++
20 files changed, 1073 insertions(+), 254 deletions(-)
--
2.4.3
8 years, 9 months
[libvirt] [PATCH] Revert "hostdev: Use actual device when reattaching"
by Andrea Bolognani
This reverts commit ee4cfb56436b50345b072c706b87aff82e06d760.
Since we're still not persisting our bookkeeping lists across
daemon restarts, we might have lost some information
virPCIDeviceReattach() relies on, for example whether the
device needs to be unbound from the stub driver.
As a result, if the daemon has been restarted in the meantime,
the device might end up remaining bound to the stub driver even
after 'virsh nodedev-reattach' or similar has been called, with
no way of giving it back to the host short of messing with
sysfs behind libvirt's back.
Revert back to the previous behavior of always trying to bind
the device to the host driver, regardless of its status when it
was detached, until persistent bookkeeping lists have been
implemented.
---
src/util/virhostdev.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c
index b397b79..933c942 100644
--- a/src/util/virhostdev.c
+++ b/src/util/virhostdev.c
@@ -1658,7 +1658,6 @@ virHostdevPCINodeDeviceReAttach(virHostdevManagerPtr mgr,
virPCIDevicePtr pci)
{
struct virHostdevIsPCINodeDeviceUsedData data = { mgr, NULL, false };
- virPCIDevicePtr actual;
int ret = -1;
virObjectLock(mgr->activePCIHostdevs);
@@ -1667,12 +1666,11 @@ virHostdevPCINodeDeviceReAttach(virHostdevManagerPtr mgr,
if (virHostdevIsPCINodeDeviceUsed(virPCIDeviceGetAddress(pci), &data))
goto cleanup;
- /* We need to look up the actual device because that's what
- * virPCIDeviceReattach() expects as its argument */
- if (!(actual = virPCIDeviceListFind(mgr->inactivePCIHostdevs, pci)))
- goto cleanup;
+ virPCIDeviceSetUnbindFromStub(pci, true);
+ virPCIDeviceSetRemoveSlot(pci, true);
+ virPCIDeviceSetReprobe(pci, true);
- if (virPCIDeviceReattach(actual, mgr->activePCIHostdevs,
+ if (virPCIDeviceReattach(pci, mgr->activePCIHostdevs,
mgr->inactivePCIHostdevs) < 0)
goto cleanup;
--
2.5.5
8 years, 9 months
[libvirt] [PATCH 0/4] Add support for an XKCD mode
by Daniel P. Berrange
The XKCD website primarily publishes comics, but many of them
are in fact design blueprints showing best practice for software
developers. A number of these designs are applicable to libvirt
and will provide valuable features to our users. This series
introduces a new framework for enabling these enhanced features
via a so called "XKCD mode". They are not enabled by default
since we want to retain backwards compatibility for existing
users. Users of libvirt though are encouraged to enable as many
of the features as possible for their deployments.
Daniel P. Berrange (4):
xkcd: add initial framework to enabling XKCD mode
xkcd: enable more efficient random number generator
xkcd: enabling pre-processing of XML with perl
xkcd: generate secure rememberable qcow2 passwords
src/Makefile.am | 2 +
src/libvirt_private.syms | 4 ++
src/util/virrandom.c | 26 ++++++++-----
src/util/virstorageencryption.c | 47 ++++++++++++----------
src/util/virxkcd.c | 86 +++++++++++++++++++++++++++++++++++++++++
src/util/virxkcd.h | 31 +++++++++++++++
src/util/virxml.c | 35 ++++++++++++++---
7 files changed, 194 insertions(+), 37 deletions(-)
create mode 100644 src/util/virxkcd.c
create mode 100644 src/util/virxkcd.h
--
2.5.5
8 years, 9 months
[libvirt] [PATCH] docs: Remove useless p:first-line CSS rule
by Andrea Bolognani
According to MDN[1], the 'margin-left' CSS property cannot be
applied to the '::first-line' pseudo-element, so this rule
will never have any effect and can be safely removed.
[1] https://developer.mozilla.org/en/docs/Web/CSS/::first-line
---
docs/generic.css | 4 ----
1 file changed, 4 deletions(-)
diff --git a/docs/generic.css b/docs/generic.css
index 4f98b26..208e31e 100644
--- a/docs/generic.css
+++ b/docs/generic.css
@@ -7,10 +7,6 @@ body {
background: #ffffff;
}
-p:first-line {
- margin-right: 1em;
-}
-
p, ul, ol, dl {
padding: 0px;
margin: 0px;
--
2.5.5
8 years, 9 months
[libvirt] [PATCH 00/11] vz: change vz driver to be stateful driver and other enhancements
by Maxim Nestratov
There is no benefit in providing two ways of connecting to vz driver:
by connecting via daemon and directly from client. Both ways finally
come to a host where vz daemon sits. Always connecting via daemon allows
us to have a single list of domains and share it among all connections.
Maxim Nestratov (11):
virsh: report when vz driver is compiled
vz: change the order of capabilities reported
vz: remove drivername field from vzConn structure
vz: build driver as module and don't register it on client's side
vz: pass vzConnPtr to prlsdkXxx functions instead of virConnectPtr
vz: make vzConn structure be a new lockable object and use it
vz: implement connectGetSysinfo hypervisor callback
vz: remove close callback implementations
vz: remove vzDriverLock/Unlock function
vz: minor cleanup
vz: change vzConnectIsAlive behavior
daemon/Makefile.am | 4 +
daemon/libvirtd.c | 9 +
src/Makefile.am | 21 ++-
src/libvirt.c | 7 -
src/vz/vz_driver.c | 479 ++++++++++++++++++++++++++++++-----------------------
src/vz/vz_sdk.c | 36 ++--
src/vz/vz_sdk.h | 6 +-
src/vz/vz_utils.c | 18 +-
src/vz/vz_utils.h | 15 +-
tools/virsh.c | 3 +
10 files changed, 341 insertions(+), 257 deletions(-)
--
2.4.3
8 years, 9 months
[libvirt] [PATCH perl] Add APIS & constants for new perf event support
by Daniel P. Berrange
Add binding for virDomainGetPerfEvents,
virDomainSetPerfEvents, VIR_DOMAIN_STATS_PERF,
VIR_PERF_PARAM_CMT, and VIR_FROM_PERF
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Changes | 1 +
Virt.xs | 43 +++++++++++++++++++++++++++++++++++++++++++
lib/Sys/Virt/Domain.pm | 34 ++++++++++++++++++++++++++++++++++
lib/Sys/Virt/Error.pm | 4 ++++
4 files changed, 82 insertions(+)
diff --git a/Changes b/Changes
index 2f86a3d..8e08e3e 100644
--- a/Changes
+++ b/Changes
@@ -12,6 +12,7 @@ Revision history for perl module Sys::Virt
- Add VIR_MIGRATE_PARAM_DISKS_PORT constant
- Add virDomainMigrateStartPostCopy API support
- Add constants related to post-copy migration
+ - Add APIS & constants for new perf event support
1.3.2 2016-03-01
diff --git a/Virt.xs b/Virt.xs
index 3664521..50ed6cd 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -4213,6 +4213,46 @@ set_blkio_parameters(dom, newparams, flags=0)
Safefree(params);
+HV *
+get_perf_events(dom, flags=0)
+ virDomainPtr dom;
+ unsigned int flags;
+ PREINIT:
+ virTypedParameter *params = NULL;
+ int nparams = 0;
+ CODE:
+ if (virDomainGetPerfEvents(dom, ¶ms, &nparams, flags) < 0) {
+ Safefree(params);
+ _croak_error();
+ }
+
+ RETVAL = vir_typed_param_to_hv(params, nparams);
+ Safefree(params);
+ OUTPUT:
+ RETVAL
+
+
+void
+set_perf_events(dom, newparams, flags=0)
+ virDomainPtr dom;
+ HV *newparams;
+ unsigned int flags;
+ PREINIT:
+ virTypedParameter *params = NULL;
+ int nparams = 0;
+ PPCODE:
+ if (virDomainGetPerfEvents(dom, ¶ms, &nparams, flags) < 0) {
+ Safefree(params);
+ _croak_error();
+ }
+
+ nparams = vir_typed_param_from_hv(newparams, params, nparams);
+
+ if (virDomainSetPerfEvents(dom, params, nparams, flags) < 0)
+ _croak_error();
+ Safefree(params);
+
+
unsigned long
get_max_memory(dom)
virDomainPtr dom;
@@ -7641,6 +7681,7 @@ BOOT:
REGISTER_CONSTANT(VIR_DOMAIN_STATS_INTERFACE, STATS_INTERFACE);
REGISTER_CONSTANT(VIR_DOMAIN_STATS_STATE, STATS_STATE);
REGISTER_CONSTANT(VIR_DOMAIN_STATS_VCPU, STATS_VCPU);
+ REGISTER_CONSTANT(VIR_DOMAIN_STATS_PERF, STATS_PERF);
REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE, GET_ALL_STATS_ACTIVE);
REGISTER_CONSTANT(VIR_CONNECT_GET_ALL_DOMAINS_STATS_INACTIVE, GET_ALL_STATS_INACTIVE);
@@ -7905,6 +7946,7 @@ BOOT:
REGISTER_CONSTANT(VIR_DOMAIN_NUMATUNE_MEM_PREFERRED, NUMATUNE_MEM_PREFERRED);
REGISTER_CONSTANT(VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE, NUMATUNE_MEM_INTERLEAVE);
+ REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CMT, PERF_PARAM_CMT);
REGISTER_CONSTANT_STR(VIR_DOMAIN_BANDWIDTH_IN_AVERAGE, BANDWIDTH_IN_AVERAGE);
REGISTER_CONSTANT_STR(VIR_DOMAIN_BANDWIDTH_IN_PEAK, BANDWIDTH_IN_PEAK);
@@ -8368,6 +8410,7 @@ BOOT:
REGISTER_CONSTANT(VIR_FROM_ADMIN, FROM_ADMIN);
REGISTER_CONSTANT(VIR_FROM_LOGGING, FROM_LOGGING);
REGISTER_CONSTANT(VIR_FROM_XENXL, FROM_XENXL);
+ REGISTER_CONSTANT(VIR_FROM_PERF, FROM_PERF);
REGISTER_CONSTANT(VIR_ERR_OK, ERR_OK);
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 26ead9b..b095dbd 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -812,6 +812,23 @@ of the NUMA PARAMETERS constants. The C<$flags>
parameter accepts one or more the CONFIG OPTION constants
documented later, and defaults to 0 if omitted.
+=item my $params = $dom->get_perf_events($flags=0)
+
+Return a hash reference containing the set of performance
+events that are available for the guest. The keys in the
+hash are one of the constants PERF EVENTS described later.
+The C<$flags> parameter accepts one or more the CONFIG
+OPTION constants documented later, and defaults to 0 if
+omitted.
+
+=item $dom->set_perf_events($params, $flags=0)
+
+Update the enabled state for performance events for the
+guest. The C<$params> should be a hash reference whose
+keys are one of the PERF EVENTS constants. The C<$flags>
+parameter accepts one or more the CONFIG OPTION constants
+documented later, and defaults to 0 if omitted.
+
=item $dom->block_resize($disk, $newsize, $flags=0)
Resize the disk C<$disk> to have new size C<$newsize> KB. If the disk
@@ -2588,6 +2605,19 @@ The burstable outbound bandwidth
=back
+=head2 PERF EVENTS
+
+The following constants defined performance events
+which can be monitored for a guest
+
+=over 4
+
+=item Sys::Virt::Domain::PERF_PARAM_CMT
+
+The CMT event counter
+
+=back
+
=head2 VCPU FLAGS
The following constants are useful when getting/setting the
@@ -3716,6 +3746,10 @@ General lifecycle state
Virtual CPU info
+=item Sys::Virt::Domain::STATS_PERF
+
+Performance event counter values
+
=back
=head2 PROCESS SIGNALS
diff --git a/lib/Sys/Virt/Error.pm b/lib/Sys/Virt/Error.pm
index 3f6b058..b54f876 100644
--- a/lib/Sys/Virt/Error.pm
+++ b/lib/Sys/Virt/Error.pm
@@ -394,6 +394,10 @@ The logging service
The Xen XL driver
+=item Sys::Virt::Error::FROM_PERF
+
+The performance events subsystem
+
=back
=head2 ERROR CODE CONSTANTS
--
2.5.5
8 years, 9 months