[libvirt] [PATCH v4 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-03-05 Thread John Ferlan
Add virDomainGetIOThreadInfo in order to return a list of virDomainIOThreadInfoPtr structures which list the IOThread ID and the CPU Affinity map for each IOThread for the domain. For an active domain, the live data will be returned, while for an inactive domain, the config data will be returned.

[libvirt] [PATCH v4 2/9] remote: Implement the remote plumbing for virDomainGetIOThreadsInfo

2015-03-05 Thread John Ferlan
Implement the remote plumbing for virDomainGetIOThreadsInfo Signed-off-by: John Ferlan --- daemon/remote.c | 74 +++- src/remote/remote_driver.c | 81 +++- src/remote/remote_protocol.x | 28 +--

[libvirt] [PATCH v4 4/9] virsh: Add 'iothreadsinfo' command

2015-03-05 Thread John Ferlan
Add the 'iothreadsinfo' command to display IOThread Info data. Allow for [--live] or [--config] options in order to display live or config data for an active domain. $ virsh iothreadsinfo --help NAME iothreadsinfo - view domain IOThreads SYNOPSIS iothreadsinfo [--config] [--live] [--

[libvirt] [PATCH v4 5/9] Implement public API for getting/setting specific IOThread pinning

2015-03-05 Thread John Ferlan
Add virDomainGetIOThreadPin to fetch the pinned CPU affinity map for one IOThread. Add virDomainPinIOThread to allow setting the CPU affinity for a specific IOThread. Signed-off-by: John Ferlan --- include/libvirt/libvirt-domain.h | 10 +++ src/driver-hypervisor.h | 16 + src/lib

[libvirt] [PATCH v4 3/9] qemu: Implement the qemu driver fetch for IOThreads

2015-03-05 Thread John Ferlan
Depending on the flags passed, either attempt to return the active/live IOThread data for the domain or the config data. The active/live path will call into the Monitor in order to get the IOThread data and then correlate the thread_id's returned from the monitor to the currently running system/th

[libvirt] [PATCH v4 0/9] Introduce display of IOThreads Information

2015-03-05 Thread John Ferlan
v3: http://www.redhat.com/archives/libvir-list/2015-February/msg00593.html Changes since v3: (from code reviews) - Updated to use 1.2.14 not 1.2.13 - Change struct from virDomainIOThreadsInfo to virDomainIOThreadInfo - Remove the resources and nresources from virDomainIOThreadInfo and of c

[libvirt] [PATCH v4 9/9] virsh: Add iothreadpin command

2015-03-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1135491 $ virsh iothread --help NAME iothreadpin - control or query domain IOThread affinity SYNOPSIS iothreadpin [--cpulist ] [--config] [--live] [--current] DESCRIPTION Pin domain IOThreads to host physical CPUs. OPTIONS

[libvirt] [PATCH v4 6/9] remote: Plumbing for getting/setting specific IOThread pinning

2015-03-05 Thread John Ferlan
Implement the remote plumbing to get an IOThread's pinned CPU data or to allow pinning an IOThread to a specific CPU set Signed-off-by: John Ferlan --- daemon/remote.c | 49 ++ src/remote/remote_driver.c | 62

[libvirt] [PATCH v4 8/9] qemu: Add support to get/set specific IOThread pinning data

2015-03-05 Thread John Ferlan
Add qemuDomainGetIOThreadPin to handle getting the CPU Affinity for one specific IOThread Add qemuDomainPinIOThread to handle setting the cpuset for a specific IOThread Signed-off-by: John Ferlan --- include/libvirt/libvirt-domain.h | 9 ++ src/qemu/qemu_driver.c | 302 +

[libvirt] [PATCH v4 7/9] domain: Introduce virDomainIOThreadsPin{Add|Del}

2015-03-05 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1135491 More or less a virtual copy of the existing virDomainVcpuPin{Add|Del} API's. NB: The IOThreads implementation "reused" the virDomainVcpuPinDefPtr since it provided everything necessary - an "id" and a "map" for each thread id configured. Signed

Re: [libvirt] [PATCH v2 3/3] qemu: Pass file descriptor when using TPM passthrough

2015-03-05 Thread Stefan Berger
On 03/05/2015 10:25 AM, Michal Privoznik wrote: On 03.03.2015 15:40, Stefan Berger wrote: Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional parameters -add-fd set=10,fd=20. This addresses the use case when QEMU is st

Re: [libvirt] [PATCH v8 1/4] domifaddr: Implement the public APIs

2015-03-05 Thread Eric Blake
On 03/05/2015 07:45 AM, Daniel P. Berrange wrote: > On Mon, Jan 26, 2015 at 12:08:46AM +0530, Nehal J Wani wrote: >> Define helper function virDomainInterfaceFree, which allows >> the upper layer application to free the domain interface object >> conveniently. >> >> The API is going to provide mult

Re: [libvirt] [PATCH] Document the effect of empty string as a rom file

2015-03-05 Thread Eric Blake
On 03/05/2015 09:01 AM, Ján Tomko wrote: > This can be used to disable the ROM. > --- > docs/formatdomain.html.in | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) ACK > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index 6276a61..050476f 100644 > --- a/docs/for

Re: [libvirt] [libvirt-tck][PATCH] Add new api get_all_domain_stats testing

2015-03-05 Thread Jim Fehlig
Zhe Peng wrote: > $vmm->get_all_domain_stats > Sys::Virt::GET_ALL_STATS_ACTIVE > Sys::Virt::GET_ALL_STATS_INACTIVE > Sys::Virt::GET_ALL_STATS_OTHER > Sys::Virt::GET_ALL_STATS_PAUSED > Sys::Virt::GET_ALL_STATS_PERSISTENT > Sys::Virt::GET_ALL_STATS_RUNNING > Sys::Virt::GET_ALL_STATS_SHUTOFF > Sys::Vi

Re: [libvirt] direct device assignment

2015-03-05 Thread Raymond Durand
Ok, thanks. So as soon as a device is directly assigned to a VM, setrlimit() or prlimit() are applied to the qemu-kvm process to avoid paging at the host level, right? and if there is not enough physical RAM, is the device simply not connected or is the VM halted? And the VM itself can page in/pa

Re: [libvirt] [libvirt-tck][PATCH] This testcase tests if the open_graphics_fd function works properly.

2015-03-05 Thread Jim Fehlig
Zhe Peng wrote: > Signed-off-by: Hao Liu > --- > scripts/domain/275-open-graphics-fd.t | 76 > +++ > 1 file changed, 76 insertions(+) > create mode 100644 scripts/domain/275-open-graphics-fd.t > > diff --git a/scripts/domain/275-open-graphics-fd.t > b/scripts/do

Re: [libvirt] memory ballooning and nova

2015-03-05 Thread Raymond Durand
Ok thanks. Regards, 2015-03-05 20:45 GMT+01:00 Daniel P. Berrange : > On Wed, Feb 25, 2015 at 11:38:46AM +0100, Raymond Durand wrote: > > Thanks. > > > > Is it possible to enable/disable which parameters are triggered by Nova > on > > Libvirt? ie. > > -device virtio-balloon > > -pci-device isa-s

Re: [libvirt] memory ballooning and nova

2015-03-05 Thread Daniel P. Berrange
On Wed, Feb 25, 2015 at 11:38:46AM +0100, Raymond Durand wrote: > Thanks. > > Is it possible to enable/disable which parameters are triggered by Nova on > Libvirt? ie. > -device virtio-balloon > -pci-device isa-serial No, these are a standard part of Nova Regards, Daniel -- |: http://berrange.c

Re: [libvirt] [PATCH 0/3] libxl: a few minor patches

2015-03-05 Thread Jim Fehlig
Michal Privoznik wrote: > On 04.03.2015 01:09, Jim Fehlig wrote: > >> This series contains a few simple changes to the libxl driver. >> Patches 1 and 2 were included in >> >> https://www.redhat.com/archives/libvir-list/2015-February/msg00611.html >> >> To make an upcoming V2 of that series easie

Re: [libvirt] [libvirt-python PATCH 2/2] Support virDomainSetIOThreads

2015-03-05 Thread Daniel P. Berrange
On Thu, Feb 19, 2015 at 07:59:39AM -0500, John Ferlan wrote: > Support the libvirt_virDomainSetIOThreads method using code that mimics > the existing libvirt_virDomainPinVcpuFlags method > > The following is a sample session assuming guest 'iothr-gst' has IOThreads > configured (it's currently run

Re: [libvirt] [PATCH v3 5/9] Implement public API for virDomainSetIOThreads

2015-03-05 Thread Daniel P. Berrange
On Tue, Feb 17, 2015 at 04:03:54PM -0500, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1135491 > > Add the libvirt API infrastructure to support setting IOThread data. > For now this is the pinned CPU information, but eventually will also > support hot plug add/del > > The API

Re: [libvirt] [PATCH v3 3/9] qemu: Implement the qemu driver fetch for IOThreads

2015-03-05 Thread Ján Tomko
On Thu, Mar 05, 2015 at 07:51:33AM -0500, John Ferlan wrote: > >> +for (i = 0; i < targetDef->iothreads; i++) { > >> +if (VIR_ALLOC(info_ret[i]) < 0) > >> +goto cleanup; > >> + > >> +/* IOThreads being counting at 1 */ > >> +info_ret[i]->iothread_id = i + 1;

Re: [libvirt] [PATCH 09/10] libxl: Stubdom emulator type

2015-03-05 Thread Marek Marczykowski-Górecki
On Wed, Mar 04, 2015 at 08:34:26PM +, Daniel P. Berrange wrote: > On Thu, Feb 19, 2015 at 10:19:22PM +0100, Marek Marczykowski-Górecki wrote: > > On Thu, Feb 19, 2015 at 01:45:52PM -0700, Jim Fehlig wrote: > > > Marek Marczykowski-Górecki wrote: > > > > Xen have feature of having device model i

Re: [libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:17 +0100, Michal Privoznik wrote: > This is going to be needed later, when some functions needs to avoid > calling multiple times at once. It will work like this: > > 1) gain the object list mutex > 2) find the object to work on > 3) do the work > 4) release the mutex

Re: [libvirt] [PATCH v3 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-03-05 Thread Daniel P. Berrange
On Thu, Mar 05, 2015 at 05:21:41PM +0100, Ján Tomko wrote: > On Thu, Mar 05, 2015 at 07:45:51AM -0500, John Ferlan wrote: > > >> +unsigned char *cpumap; /* CPU map for thread */ > > >> +int cpumaplen; /* cpumap size */ > > > > > >> +size_t nresources;

Re: [libvirt] [PATCH v2 15/24] parallels_network: Use virNetworkObjEndAPI

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:16 +0100, Michal Privoznik wrote: > So far, this is pure code replacement. But once we introduce > reference counting to virNetworkObj this will be more handy as > there'll be only one function to change: virNetworkObjEndAPI(). For this patch this isn't entirely true,

[libvirt] [PATCH] Document the effect of empty string as a rom file

2015-03-05 Thread Ján Tomko
This can be used to disable the ROM. --- docs/formatdomain.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 6276a61..050476f 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4265,7 +4

Re: [libvirt] [PATCH v3 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-03-05 Thread Ján Tomko
On Thu, Mar 05, 2015 at 07:45:51AM -0500, John Ferlan wrote: > >> +unsigned char *cpumap; /* CPU map for thread */ > >> +int cpumaplen; /* cpumap size */ > > > >> +size_t nresources; /* count of resources using > >> IOThread */ > >> +

Re: [libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:17 +0100, Michal Privoznik wrote: > This is going to be needed later, when some functions needs to avoid > calling multiple times at once. It will work like this: > > 1) gain the object list mutex > 2) find the object to work on > 3) do the work > 4) release the mutex

Re: [libvirt] [PATCH v2 14/24] test_driver: Use virNetworkObjEndAPI

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:15 +0100, Michal Privoznik wrote: > So far, this is pure code replacement. But once we introduce > reference counting to virNetworkObj this will be more handy as > there'll be only one function to change: virNetworkObjEndAPI(). > > Signed-off-by: Michal Privoznik > -

Re: [libvirt] [PATCH] domain_conf: Format without address correctly

2015-03-05 Thread Pavel Hrdina
On Thu, Mar 05, 2015 at 02:59:52PM +0100, Michal Privoznik wrote: > We have something like pvpanic device. However, in some cases it does > not have any address assigned, in which case we produce this ugly XML > (still valid though): > > > /usr/bin/qemu > ... > > > > > Let

Re: [libvirt] [PATCH v2 13/24] bridge_driver: Use virNetworkObjEndAPI

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:14 +0100, Michal Privoznik wrote: > So far, this is pure code replacement. But once we introduce > reference counting to virNetworkObj this will be more handy as > there'll be only one function to change: virNetworkObjEndAPI(). > > Signed-off-by: Michal Privoznik > -

Re: [libvirt] [PATCHv2] spec: Enable RBD storage driver in RHEL-7

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 16:20:55 +0100, Jiri Denemark wrote: > On Thu, Mar 05, 2015 at 13:26:09 +0100, Peter Krempa wrote: > > Use correct package names too as they differ. > > --- > > libvirt.spec.in | 14 +- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > ACK Pushed; Thanks

Re: [libvirt] [PATCH] conf: Remove duplicate entries in by namespace

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 15:03:22 +0100, Michal Privoznik wrote: > On 04.03.2015 10:06, Peter Krempa wrote: > > Since the APIs support just one element per namespace and while > > modifying an element all duplicates would be removed, let's do this > > right away in the post parse callback. > > > >

Re: [libvirt] [PATCHv2] spec: Enable RBD storage driver in RHEL-7

2015-03-05 Thread Jiri Denemark
On Thu, Mar 05, 2015 at 13:26:09 +0100, Peter Krempa wrote: > Use correct package names too as they differ. > --- > libvirt.spec.in | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) ACK Jirka -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/

Re: [libvirt] [PATCH v2 3/3] qemu: Pass file descriptor when using TPM passthrough

2015-03-05 Thread Michal Privoznik
On 03.03.2015 15:40, Stefan Berger wrote: > Pass the TPM file descriptor to QEMU via command line. > Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional > parameters -add-fd set=10,fd=20. > > This addresses the use case when QEMU is started with non-root privileges > and QEMU

Re: [libvirt] [PATCH v2 11/24] virNetworkObjList: Derive from virObjectLockableClass

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:12 +0100, Michal Privoznik wrote: > Later we can turn APIs to lock the object if needed instead of > relying on caller to mutually exclude itself (probably done by > locking a big lock anyway). > > Signed-off-by: Michal Privoznik > --- > src/conf/network_conf.c | 6

Re: [libvirt] [PATCH v2 12/24] network_conf: Introduce virNetworkObjEndAPI

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:13 +0100, Michal Privoznik wrote: > This is practically copy of qemuDomObjEndAPI. The reason why is > it so widely available is to avoid code duplication, since the > function is going to be called from our bridge driver, test > driver and parallels driver too. > > Si

[libvirt] [libvirt-python PATCH] Clarify description for virNodeGetSecurityModel

2015-03-05 Thread Ján Tomko
s/host/hypervisor/ to match the wording used by the C binding. https://bugzilla.redhat.com/show_bug.cgi?id=1198518 --- libvirt-override-api.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Pushed as trivial. diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 439cb40

[libvirt] [PATCH v2 2/3] virutil: introduce helper functions for memory limits

2015-03-05 Thread Pavel Hrdina
The first one is to truncate the memory limit to VIR_DOMAIN_MEMORY_PARAM_UNLIMITED if the value is greater and the second one is to decide whether the memory limit is set or not, unlimited means that it's not set. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 2 ++ src/util/virutil

[libvirt] [PATCH v2 0/3] unify memtune value representation in libvirt

2015-03-05 Thread Pavel Hrdina
The first patch rewrites virsh memtune command to accept 0 as valid value instead of ignoring it. In the second patch I'll introduce a simple helper to crop the *_limit values to VIR_DOMAIN_MEMORY_PARAM_UNLIMITED as its used several times while reading values from cgroups and also a helper to chec

[libvirt] [PATCH v2 3/3] memtune: change the way how we store unlimited value

2015-03-05 Thread Pavel Hrdina
There was a mess in the way how we store unlimited value for memory limits and how we handled values provided by user. Internally there were two possible ways how to store unlimited value: as 0 value or as VIR_DOMAIN_MEMORY_PARAM_UNLIMITED. Because we chose to store memory limits as unsigned long

[libvirt] [PATCH v2 1/3] virsh: fix memtune to also accept 0 as valid value

2015-03-05 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- tools/virsh-domain.c | 83 1 file changed, 38 insertions(+), 45 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 55c269c..3836a1b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-do

Re: [libvirt] [PATCH v2 10/24] network_conf: Make virNetworkObj actually virObject

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:11 +0100, Michal Privoznik wrote: > So far it's just a structure which happens to have 'Obj' in its > name, but otherwise it not related to virObject at all. No > reference counting, not virObjectLock(), nothing. > > Signed-off-by: Michal Privoznik > --- > cfg.mk

Re: [libvirt] [PATCH v2 08/24] network_conf: Turn virNetworkObjList into virObject

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:09 +0100, Michal Privoznik wrote: > Well, one day this will be self-locking object, but not today. > But lets prepare the code for that! Moreover, > virNetworkObjListFree() is no longer needed, so turn it into > virNetworkObjListDispose(). > > Signed-off-by: Michal Pr

Re: [libvirt] [PATCH v2 09/24] network_conf: Turn struct _virNetworkObjList private

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:10 +0100, Michal Privoznik wrote: > Now that all the code uses accessors, don't expose the structure > anyway. > > Signed-off-by: Michal Privoznik > --- > src/conf/network_conf.c | 7 +++ > src/conf/network_conf.h | 6 -- > 2 files changed, 7 insertions(+),

Re: [libvirt] [PATCH v2 06/24] test_driver: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:07 +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/test/test_driver.c | 64 > ++ > 1 file changed, 12 insertions(+), 52 deletions(-) ACK, Peter signature.asc Description: Digital signat

Re: [libvirt] [PATCH v2 07/24] parallels_network: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:08 +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/parallels/parallels_network.c | 66 > +++ > 1 file changed, 12 insertions(+), 54 deletions(-) ACK Peter signature.asc Description: Digital signatu

Re: [libvirt] [PATCH v8 1/4] domifaddr: Implement the public APIs

2015-03-05 Thread Daniel P. Berrange
On Mon, Jan 26, 2015 at 12:08:46AM +0530, Nehal J Wani wrote: > Define helper function virDomainInterfaceFree, which allows > the upper layer application to free the domain interface object > conveniently. > > The API is going to provide multiple methods by flags, e.g. > * Query guest agent >

Re: [libvirt] [PATCH v2 05/24] bridge_driver: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:06 +0100, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/network/bridge_driver.c | 334 > > 1 file changed, 148 insertions(+), 186 deletions(-) ACK, Peter signature.asc Description: Digital sign

Re: [libvirt] [PATCH 3/3] libxl: remove unneeded cleanup_unlock label

2015-03-05 Thread Michal Privoznik
On 04.03.2015 01:09, Jim Fehlig wrote: > In the old days of a global driver lock, it was necessary to unlock > the driver after a domain restore operation. When the global lock > was removed from the driver, some remnants were left behind in > libxlDomainRestoreFlags. Remove this unneeded (and in

Re: [libvirt] [PATCH v2 04/24] network_conf: Introduce virNetworkObjListPrune

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:05 +0100, Michal Privoznik wrote: > The API will iterate over the list of network object and remove > desired ones from it. > > Signed-off-by: Michal Privoznik > --- > src/conf/network_conf.c | 31 +++ > src/conf/network_conf.h | 3 +++

Re: [libvirt] [PATCH 0/3] libxl: a few minor patches

2015-03-05 Thread Michal Privoznik
On 04.03.2015 01:09, Jim Fehlig wrote: > This series contains a few simple changes to the libxl driver. > Patches 1 and 2 were included in > > https://www.redhat.com/archives/libvir-list/2015-February/msg00611.html > > To make an upcoming V2 of that series easier to review, I removed the > mostly

Re: [libvirt] [PATCH v2 02/24] network_conf: Introduce virNetworkObjListGetNames

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:03 +0100, Michal Privoznik wrote: > An accessor following pattern laid out by virDomainObjList* APIs. > > Signed-off-by: Michal Privoznik > --- > src/conf/network_conf.c | 38 ++ > src/conf/network_conf.h | 8 > src/li

Re: [libvirt] [PATCH v2 03/24] network_conf: Introduce virNetworkObjListNumOfNetworks

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:04 +0100, Michal Privoznik wrote: > An accessor following pattern laid out by virDomainObjList* APIs. > > Signed-off-by: Michal Privoznik > --- ACK, Peter signature.asc Description: Digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.

Re: [libvirt] [PATCH] conf: Remove duplicate entries in by namespace

2015-03-05 Thread Michal Privoznik
On 04.03.2015 10:06, Peter Krempa wrote: > Since the APIs support just one element per namespace and while > modifying an element all duplicates would be removed, let's do this > right away in the post parse callback. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1190590 > --- > src/c

[libvirt] [PATCH] domain_conf: Format without address correctly

2015-03-05 Thread Michal Privoznik
We have something like pvpanic device. However, in some cases it does not have any address assigned, in which case we produce this ugly XML (still valid though): /usr/bin/qemu ... Lets format "" instead. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c

Re: [libvirt] [PATCH v2 01/24] network_conf: Introduce virNetworkObjListForEach

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:02 +0100, Michal Privoznik wrote: > This API will be used in the future to call passed callback over > each network object in the list. It's slightly different to its > virDomainObjListForEach counterpart, because virDomainObjList > uses a hash table to store domain ob

Re: [libvirt] [PATCH 2/3] virutil: introduce helper to set memory limits

2015-03-05 Thread Pavel Hrdina
On Thu, Mar 05, 2015 at 10:11:50AM +0100, Peter Krempa wrote: > On Wed, Mar 04, 2015 at 17:17:06 +0100, Pavel Hrdina wrote: > > Using this macro will ensure that the value stored in domain def will > > never be greater than VIR_DOMAIN_MEMORY_PARAM_UNLIMITED. > > > > Signed-off-by: Pavel Hrdina >

Re: [libvirt] [PATCH v3 5/9] Implement public API for virDomainSetIOThreads

2015-03-05 Thread John Ferlan
On 03/04/2015 01:00 PM, Ján Tomko wrote: > On Tue, Feb 17, 2015 at 04:03:54PM -0500, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1135491 >> >> Add the libvirt API infrastructure to support setting IOThread data. >> For now this is the pinned CPU information, but eventually w

Re: [libvirt] [PATCH v3 4/9] virsh: Add 'iothreads' command

2015-03-05 Thread John Ferlan
On 03/04/2015 12:48 PM, Ján Tomko wrote: > On Tue, Feb 17, 2015 at 04:03:53PM -0500, John Ferlan wrote: >> Add the 'iothreads' command to display IOThread Info data. Allow for >> [--live] or [--config] options in order to display live or config data >> for an active domain. >> >> An active domain

Re: [libvirt] [PATCH v3 3/9] qemu: Implement the qemu driver fetch for IOThreads

2015-03-05 Thread John Ferlan
On 03/04/2015 12:45 PM, Ján Tomko wrote: > On Tue, Feb 17, 2015 at 04:03:52PM -0500, John Ferlan wrote: >> Depending on the flags passed, either attempt to return the active/live >> IOThread data for the domain or the config data. >> >> The active/live path will call into the Monitor in order to

Re: [libvirt] [PATCH v3 1/9] Implement public API for virDomainGetIOThreadsInfo

2015-03-05 Thread John Ferlan
On 03/04/2015 12:24 PM, Ján Tomko wrote: > On Tue, Feb 17, 2015 at 04:03:50PM -0500, John Ferlan wrote: >> Add virDomainGetIOThreadsInfo in order to return a list of >> virDomainIOThreadsInfoPtr structures which list the IOThread ID, >> the CPU Affinity map, and associated resources for each IOTh

Re: [libvirt] [PATCH 1/3] virsh: fix memtune to also accept 0 as valid value

2015-03-05 Thread Pavel Hrdina
On Thu, Mar 05, 2015 at 10:08:45AM +0100, Peter Krempa wrote: > On Wed, Mar 04, 2015 at 17:17:05 +0100, Pavel Hrdina wrote: > > Commit message is too sparse. > > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1146539 > > Also I doubt that this on itself resolves this bug. Well, not dir

[libvirt] [PATCHv2] spec: Enable RBD storage driver in RHEL-7

2015-03-05 Thread Peter Krempa
Use correct package names too as they differ. --- libvirt.spec.in | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 12bd17c..ce792e6 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -108,7 +108,7 @@ %define with_storage

Re: [libvirt] [PATCH] spec: Enable RBD storage driver in RHEL-7

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 11:44:07 +0100, Peter Krempa wrote: > Use correct package names too as they differ. > --- > libvirt.spec.in | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Self NACK. The two libraries are available only on x86_64. v2 comming soon. Peter signature.asc Des

[libvirt] [PATCH] Fix build on mingw

2015-03-05 Thread Ján Tomko
Last commit unconditionally included a linux-specific header. Do not do that. --- Pushed as trivial. Forgot to send the mail. src/util/virnetdev.c | 4 src/util/virnetdev.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index

Re: [libvirt] [PATCH] Do not inline virNumaNodeIsAvailable

2015-03-05 Thread Daniel P. Berrange
On Thu, Mar 05, 2015 at 12:05:52PM +0100, Ján Tomko wrote: > Explicitly request that virNumaNodeIsAvailable not be inlined. > This fixes the test suite when building with clang (3.5.1). Huh, so clang will inline functions, even if they are exported in the .so library ? Is there some clang compile

[libvirt] [PATCH v2 03/24] network_conf: Introduce virNetworkObjListNumOfNetworks

2015-03-05 Thread Michal Privoznik
An accessor following pattern laid out by virDomainObjList* APIs. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 26 ++ src/conf/network_conf.h | 5 + src/libvirt_private.syms | 1 + 3 files changed, 32 insertions(+) diff --git a/src/conf/network_c

[libvirt] [PATCH v2 24/24] virNetworkObjFindBy*: Don't lock all networks in the list

2015-03-05 Thread Michal Privoznik
Ta-Da! Finally the commit you've been waiting for. This is yet one of the bottlenecks. Each API has to go through the list of network objects to find the correct one to work on. But currently it's done in suboptimal way: every single network object is locked, and then compared. If found, it's retur

[libvirt] [PATCH v2 23/24] virNetworkObjUnsetDefTransient: Lock object list if needed

2015-03-05 Thread Michal Privoznik
This patch alone does not make much sense, I know. But it prepares ground for next patch which when looking up a network in the object list will not lock each network separately when accessing its definition. Therefore we must have all the places changing network definition lock the list. Signed-o

[libvirt] [PATCH v2 02/24] network_conf: Introduce virNetworkObjListGetNames

2015-03-05 Thread Michal Privoznik
An accessor following pattern laid out by virDomainObjList* APIs. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 38 ++ src/conf/network_conf.h | 8 src/libvirt_private.syms | 1 + 3 files changed, 47 insertions(+) diff --git a/src

[libvirt] [PATCH v2 04/24] network_conf: Introduce virNetworkObjListPrune

2015-03-05 Thread Michal Privoznik
The API will iterate over the list of network object and remove desired ones from it. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 31 +++ src/conf/network_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 35 insertions(+) diff --g

[libvirt] [PATCH v2 00/24] Drop network driver lock

2015-03-05 Thread Michal Privoznik
Yet another version. This time with: 1) Peter's review worked in 2) Even more patches, that allow even more parallelism. With my test program [1], I've been able to go from 56s to 23s. 1: https://www.redhat.com/archives/libvir-list/2015-February/msg01214.html Michal Privoznik (24): network

[libvirt] [PATCH v2 01/24] network_conf: Introduce virNetworkObjListForEach

2015-03-05 Thread Michal Privoznik
This API will be used in the future to call passed callback over each network object in the list. It's slightly different to its virDomainObjListForEach counterpart, because virDomainObjList uses a hash table to store domain object, while virNetworkObjList uses an array. Signed-off-by: Michal Priv

[libvirt] [PATCH v2 05/24] bridge_driver: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 334 1 file changed, 148 insertions(+), 186 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 2a61991..1878833 100644 --- a/src/network/bridge_dr

[libvirt] [PATCH v2 06/24] test_driver: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 64 ++ 1 file changed, 12 insertions(+), 52 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 9591b7c..2bfe0ad 100644 --- a/src/test/test_driver.c +++ b/src/

[libvirt] [PATCH] Do not inline virNumaNodeIsAvailable

2015-03-05 Thread Ján Tomko
Explicitly request that virNumaNodeIsAvailable not be inlined. This fixes the test suite when building with clang (3.5.1). --- This only leaves the mysterious check-protocol failure. And too large stack frame size when building the tests with -O0. src/internal.h | 10 ++ src/util/virn

[libvirt] [PATCH v2 12/24] network_conf: Introduce virNetworkObjEndAPI

2015-03-05 Thread Michal Privoznik
This is practically copy of qemuDomObjEndAPI. The reason why is it so widely available is to avoid code duplication, since the function is going to be called from our bridge driver, test driver and parallels driver too. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 20 ++

[libvirt] [PATCH v2 20/24] test_driver: Drop testDriverLock() from almost everywhere

2015-03-05 Thread Michal Privoznik
Well, if 'everywhere' is defined as that part of the driver code that serves virNetwork* APIs. Again, we lower layers already have their locks, so there's no point doing big lock. Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 56 +-

[libvirt] [PATCH v2 19/24] bridge_driver: Drop networkDriverLock() from almost everywhere

2015-03-05 Thread Michal Privoznik
Now that we have fine grained locks, there's no need to lock the whole driver. We can rely on self-locking APIs. Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 49 +++-- 1 file changed, 7 insertions(+), 42 deletions(-) diff --git a/src/

[libvirt] [PATCH v2 17/24] virNetworkObjListPtr: Make APIs self-locking

2015-03-05 Thread Michal Privoznik
Every API that touches internal structure of the object must lock the object first. Not every API that has the object as an argument needs to do that though. Some APIs just pass the object to lower layers which, however, must lock the object then. Look at the code, you'll get my meaning soon. Sign

[libvirt] [PATCH v2 08/24] network_conf: Turn virNetworkObjList into virObject

2015-03-05 Thread Michal Privoznik
Well, one day this will be self-locking object, but not today. But lets prepare the code for that! Moreover, virNetworkObjListFree() is no longer needed, so turn it into virNetworkObjListDispose(). Signed-off-by: Michal Privoznik --- cfg.mk| 1 - src/conf/network_con

[libvirt] [PATCH v2 21/24] parallels_network: Drop parallelsDriverLock() from everywhere.

2015-03-05 Thread Michal Privoznik
While in previous commits there were some places that relied on the big lock, in this file there's no such place and the big driver lock can be dropped completely. Yay! Signed-off-by: Michal Privoznik --- src/parallels/parallels_network.c | 33 + 1 file changed, 1

[libvirt] [PATCH v2 09/24] network_conf: Turn struct _virNetworkObjList private

2015-03-05 Thread Michal Privoznik
Now that all the code uses accessors, don't expose the structure anyway. Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 7 +++ src/conf/network_conf.h | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c i

[libvirt] [PATCH v2 15/24] parallels_network: Use virNetworkObjEndAPI

2015-03-05 Thread Michal Privoznik
So far, this is pure code replacement. But once we introduce reference counting to virNetworkObj this will be more handy as there'll be only one function to change: virNetworkObjEndAPI(). Signed-off-by: Michal Privoznik --- src/parallels/parallels_network.c | 29 - 1

[libvirt] [PATCH v2 22/24] bridge_driver: Use more of networkObjFromNetwork

2015-03-05 Thread Michal Privoznik
Now that the network driver lock is ash heap of history, we can use more of networkObjFromNetwork(). Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 33 + 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/src/network/bridge_driver.c

[libvirt] [PATCH v2 10/24] network_conf: Make virNetworkObj actually virObject

2015-03-05 Thread Michal Privoznik
So far it's just a structure which happens to have 'Obj' in its name, but otherwise it not related to virObject at all. No reference counting, not virObjectLock(), nothing. Signed-off-by: Michal Privoznik --- cfg.mk| 2 - src/conf/network_conf.c | 135

[libvirt] [PATCH v2 18/24] virNetworkObjFindBy*: Return an reference to found object

2015-03-05 Thread Michal Privoznik
This patch turns both virNetworkObjFindByUUID() and virNetworkObjFindByName() to return an referenced object so that even if caller unlocks it, it's for sure that object won't disappear meanwhile. Especially if the object (in general) is locked and unlocked during the caller run. Moreover, this com

[libvirt] [PATCH v2 07/24] parallels_network: Adapt to new virNetworkObjList accessors

2015-03-05 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/parallels/parallels_network.c | 66 +++ 1 file changed, 12 insertions(+), 54 deletions(-) diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c index e1c6040..6b53518 100644 --- a/src/parall

[libvirt] [PATCH v2 14/24] test_driver: Use virNetworkObjEndAPI

2015-03-05 Thread Michal Privoznik
So far, this is pure code replacement. But once we introduce reference counting to virNetworkObj this will be more handy as there'll be only one function to change: virNetworkObjEndAPI(). Signed-off-by: Michal Privoznik --- src/test/test_driver.c | 42 ++

[libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Michal Privoznik
This is going to be needed later, when some functions needs to avoid calling multiple times at once. It will work like this: 1) gain the object list mutex 2) find the object to work on 3) do the work 4) release the mutex As an example of such function is virNetworkAssignDef(). The other use case

[libvirt] [PATCH v2 11/24] virNetworkObjList: Derive from virObjectLockableClass

2015-03-05 Thread Michal Privoznik
Later we can turn APIs to lock the object if needed instead of relying on caller to mutually exclude itself (probably done by locking a big lock anyway). Signed-off-by: Michal Privoznik --- src/conf/network_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf

[libvirt] [PATCH v2 13/24] bridge_driver: Use virNetworkObjEndAPI

2015-03-05 Thread Michal Privoznik
So far, this is pure code replacement. But once we introduce reference counting to virNetworkObj this will be more handy as there'll be only one function to change: virNetworkObjEndAPI(). Signed-off-by: Michal Privoznik --- src/network/bridge_driver.c | 57 +++

Re: [libvirt] [PATCH v2] qemu: Allow spaces in disk serial

2015-03-05 Thread Ján Tomko
On Tue, Feb 24, 2015 at 04:34:25PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1195660 > > There's been a bug report appearing on the qemu-devel list, that > libvirt is unable to pass spaces in disk serial number [1]. Not only > our RNG schema forbids that, the cod

[libvirt] [PATCH] spec: Enable RBD storage driver in RHEL-7

2015-03-05 Thread Peter Krempa
Use correct package names too as they differ. --- libvirt.spec.in | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 12bd17c..d85bd4e 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -108,7 +108,7 @@ %define with_storage_iscsi

Re: [libvirt] [PATCHv2] SRIOV NIC offload feature discovery

2015-03-05 Thread Ján Tomko
On Mon, Feb 23, 2015 at 03:38:29PM +, James Chapman wrote: > Adding functionality to libvirt that will allow it > query the ethtool interface for the availability > of certain NIC HW offload features > > Here is an example of the feature XML definition: > > > net_eth4_90_e2_ba_5e_a5_45 > /

[libvirt] [libvirt-tck][PATCH] Add new api get_all_domain_stats testing

2015-03-05 Thread Zhe Peng
$vmm->get_all_domain_stats Sys::Virt::GET_ALL_STATS_ACTIVE Sys::Virt::GET_ALL_STATS_INACTIVE Sys::Virt::GET_ALL_STATS_OTHER Sys::Virt::GET_ALL_STATS_PAUSED Sys::Virt::GET_ALL_STATS_PERSISTENT Sys::Virt::GET_ALL_STATS_RUNNING Sys::Virt::GET_ALL_STATS_SHUTOFF Sys::Virt::GET_ALL_STATS_TRANSIENT Sys::V

[libvirt] [libvirt-tck][PATCH] Fix disk interface hot plug unplug test scripts

2015-03-05 Thread Zhe Peng
This patch fixed following issues: 1) Hot unplug won't work for a VM without OS. Create a working VM instead. 2) Avoid using multicast MAC address. Signed-off-by: Zhe Peng --- scripts/domain/200-disk-hotplug.t | 5 +++-- scripts/domain/205-disk-hotplug-ordering.t | 3 ++- scripts/dom

[libvirt] [libvirt-tck][PATCH] This testcase tests if the open_graphics_fd function works properly.

2015-03-05 Thread Zhe Peng
Signed-off-by: Hao Liu --- scripts/domain/275-open-graphics-fd.t | 76 +++ 1 file changed, 76 insertions(+) create mode 100644 scripts/domain/275-open-graphics-fd.t diff --git a/scripts/domain/275-open-graphics-fd.t b/scripts/domain/275-open-graphics-fd.t new fi

  1   2   >