Re: [libvirt] [PATCH 2/3] network: allow disabling dnsmasq's DNS server

2016-08-18 Thread Michal Privoznik
On 18.08.2016 20:42, Laine Stump wrote: > On Aug 18, 2016 5:01 AM, "Michal Privoznik" wrote: >> >> On 12.08.2016 04:41, Laine Stump wrote: >>> If you define a libvirt virtual network with one or more IP addresses, >>> it starts up an instance of dnsmasq. It's always been possible to >>> avoid dnsm

[libvirt] [PATCH v4 1/5] Move validating chipset PCI slots to qemuDomainPCIAddressSetCreate

2016-08-18 Thread Tomasz Flendrich
In order to simplify the code and make it possible to recalculate the PCI address set, I incorporated qemuDomainValidateDevicePCISlotsChipsets into qemuDomainPCIAddressSetCreate. Three functions had to be moved up to be seen in qemuDomainPCIAddressSetCreate. --- src/qemu/qemu_domain_address.c | 1

[libvirt] [PATCH v4 2/5] Warn when assigning new pci addresses during recalculation

2016-08-18 Thread Tomasz Flendrich
With a parameter, we can show whether we want qemuDomainValidateDevicePCISlotsChipsets to assign new addresses or simply verify the existing ones and reserve slots for potential future devices. If the parameter is false and some device is missing an address, a warning will be displayed. The PCI add

[libvirt] [PATCH v4 3/5] Reduce number of parameters to qemuDomainPCIAddressSetCreate

2016-08-18 Thread Tomasz Flendrich
We can as well generate the number of buses inside that function. Fewer parameters will be useful when recalculating the pci address set on demand. --- src/qemu/qemu_domain_address.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain_address

[libvirt] [PATCH v4 5/5] qemu: remove pciaddrs caching

2016-08-18 Thread Tomasz Flendrich
The cached pci address set is not required anymore, because the set is now being recalculated from the domain definition on demand, so the cache can be deleted. --- src/qemu/qemu_domain.c | 1 - src/qemu/qemu_domain.h | 1 - src/qemu/qemu_domain_address.c | 14 ++ 3 f

[libvirt] [PATCH v4 4/5] qemu_hotplug: generate pci address set on demand

2016-08-18 Thread Tomasz Flendrich
Dropping the caching of pci address set. Instead of using the cached address set, functions in qemu_hotplug.c now recalculate it on demand. --- src/qemu/qemu_domain_address.c | 8 +-- src/qemu/qemu_domain_address.h | 6 + src/qemu/qemu_hotplug.c| 50 ++

[libvirt] [PATCH v4 0/5] Remove caching of address sets

2016-08-18 Thread Tomasz Flendrich
Link to the previous version: https://www.redhat.com/archives/libvir-list/2016-August/msg00721.html Changes in v4: * instead of failing, qemuDomainValidateDevicePCISlotsChipsets now simply displays a warning when a new address is being assigned during pci address set recalculation Tomasz Flen

Re: [libvirt] [PATCH] util: Make virStringArrayHasString() const-correct

2016-08-18 Thread Martin Kletzander
On Wed, Aug 17, 2016 at 10:22:46AM +0200, Erik Skultety wrote: On 17/08/16 09:56, Andrea Bolognani wrote: On Tue, 2016-08-16 at 22:31 +0200, Martin Kletzander wrote: This change means we no longer have to cast arrays of immutable strings to arrays of mutable strings; we still have to do the opp

Re: [libvirt] [PATCH 2/3] network: allow disabling dnsmasq's DNS server

2016-08-18 Thread Laine Stump
On Aug 18, 2016 5:01 AM, "Michal Privoznik" wrote: > > On 12.08.2016 04:41, Laine Stump wrote: > > If you define a libvirt virtual network with one or more IP addresses, > > it starts up an instance of dnsmasq. It's always been possible to > > avoid dnsmasq's dhcp server (simply don't include a e

Re: [libvirt] [PATCH v2 0/7] qemu: util: vz: some fixes and improvements

2016-08-18 Thread Maxim Nestratov
17-Aug-16 16:12, Maxim Nestratov пишет: 17-Aug-16 13:43, Mikhail Feoktistov пишет: Ack the series, except [PATCH v2 7/7] vz: relax disk bus controller and device indices check On 16.08.2016 15:24, Maxim Nestratov wrote: v1-v2 changes: - fixed "vz: reset errors after ignoring return values"

Re: [libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Maxim Nestratov
18-Aug-16 14:43, Mikhail Feoktistov пишет: This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not initialized disk->info.addr.drive struct yet. Mov

Re: [libvirt] [PATCH v2] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Maxim Nestratov
18-Aug-16 17:04, Mikhail Feoktistov пишет: Ack On 18.08.2016 15:37, Olga Krishtal wrote: While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, w

[libvirt] [RFC] libvirt vGPU QEMU integration

2016-08-18 Thread Neo Jia
Hi libvirt experts, I am starting this email thread to discuss the potential solution / proposal of integrating vGPU support into libvirt for QEMU. Some quick background, NVIDIA is implementing a VFIO based mediated device framework to allow people to virtualize their devices without SR-IOV, for

Re: [libvirt] [PATCH v2] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Mikhail Feoktistov
Ack On 18.08.2016 15:37, Olga Krishtal wrote: While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the

[libvirt] [PATCH] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Olga Krishtal
While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the same device. Signed-off-by: Olga Krishtal ---

[libvirt] [PATCH v2] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Olga Krishtal
While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the same device. Signed-off-by: Olga Krishtal ---

Re: [libvirt] [PATCH] vz: fixed race in vzDomainAttach/DettachDevice

2016-08-18 Thread Mikhail Feoktistov
On 18.08.2016 14:57, Olga Krishtal wrote: While dettaching/attaching device in OpenStack, nova calls vzDomainDettachDevice twice, because the update of the internal configuration of the ct comes a bit latter than the update event. As the result, we suffer from the second call to dettach the same

[libvirt] [PATCH] qemu_driver: protect existed save image

2016-08-18 Thread Chen Hanxiao
From: Chen Hanxiao We may overwrite existed save image by 'virsh save' command. This patch will check qemu save headers before trying to rewrite it. Signed-off-by: Chen Hanxiao --- src/qemu/qemu_driver.c | 141 +++-- 1 file changed, 89 insertions(+)

Re: [libvirt] Question about virtio-pci in Aarch64

2016-08-18 Thread Kevin Zhao
Hi Andrea, I'm using the Debian Jessie with kernel Linux u202154 4.4.0-135-arm64. But I am not sure whether the virtio-pci module has been built into the kernel. not as a module. So I am changing to Ubuntu and RHEL73. As far as I know, ubuntu Wily has the driver of virtio-pci. Thanks~

Re: [libvirt] [PATCH 1/7] maint: update to latest gnulib

2016-08-18 Thread Ján Tomko
On Thu, Aug 18, 2016 at 01:18:59AM -0400, Laine Stump wrote: On 08/03/2016 12:20 PM, Ján Tomko wrote: Pick up the new syntax-check speedups. --- I think eblake usually pushes those without review under the "gnulib updates are immune from review | can't be effectively reviewed" rule :-) My i

Re: [libvirt] Question about virtio-pci in Aarch64

2016-08-18 Thread Kevin Zhao
Hi Cole, Greate ! Thanks for your help. On 17 August 2016 at 21:18, Cole Robinson wrote: > On 08/17/2016 07:49 AM, Kevin Zhao wrote: > > Hi Cole, > > Long time no see~ > > Thanks for giving help me about AArch64 of virtio-pci. You have rich > > experience about this, > > I am gree

Re: [libvirt] [PATCH 0/7] More detailed description

2016-08-18 Thread Olga Krishtal
This is the first implementation of fspool with directory backend(dir). Fspool is some host directory that holds another directories (items). In an item fs of container can be placed. Examle and usage: Define: virsh -c qemu:///system fspool-define-as fs_pool_name dir --target /path/on/host Build v

[libvirt] [PATCH v2 07/20] virlog: Introduce virLogNewOutputTo* as a replacement for virLogAddOutputTo*

2016-08-18 Thread Erik Skultety
Continuing with the effort to split output parsing and defining, these new functions return a logging object reference instead of defining the output. Eventually, these functions will replace the existing ones (virLogAddOutputTo*) which will then be dropped. Also, make the new functions non-static,

Re: [libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Mikhail Feoktistov
On 18.08.2016 14:47, Maxim Nestratov wrote: 18-Aug-16 14:43, Mikhail Feoktistov пишет: This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not ini

[libvirt] [PATCH v2 10/20] virlog: Introduce virLogParseFilter

2016-08-18 Thread Erik Skultety
Same as for outputs, introduce a new method, that is basically the same as virLogParseAndDefineFilter with the difference that it does not define the filter. It rather returns a newly created object that needs to be inserted into a list and then defined separately. Signed-off-by: Erik Skultety --

[libvirt] [PATCH v2 01/20] virlog: Rename virLogParse* to virLogParseAndDefine*

2016-08-18 Thread Erik Skultety
The reason for this is to be later able to split parsing from defining in a convenient and transparent way, so eventually, the original virLogParse* (virLogParseAndDefine* after this patch) functions which were named a bit poorly will be dropped completely. Signed-off-by: Erik Skultety --- daemo

Re: [libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Maxim Nestratov
18-Aug-16 14:43, Mikhail Feoktistov пишет: This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not initialized disk->info.addr.drive struct yet. Mov

[libvirt] [PATCH v2 16/20] daemon: Split filter parsing and filter defining

2016-08-18 Thread Erik Skultety
Similar to outputs, parser should do parsing only, thus the 'define' logic is going to be stripped from virLogParseAndDefineFilters by replacing calls to this method to virLogSetFilters instead. Signed-off-by: Erik Skultety --- daemon/libvirtd.c | 2 +- src/locking/lock_daemon.c | 2 +-

[libvirt] [PATCH v2 08/20] virlog: Take a special care of syslog when setting new set of log outputs

2016-08-18 Thread Erik Skultety
Now that we're in the critical section, syslog connection can be re-opened by issuing openlog, which is something that cannot be done beforehand, since syslog keeps its file descriptor private and changing the tag earlier might introduce a log inconsistency if something went wrong with preparing a

[libvirt] [PATCH v2 19/20] virlog: Store the journald fd within the output object

2016-08-18 Thread Erik Skultety
Now that previous patches tried to refactor the code and split parsing and defining logic of logging primitives, there is no reason why we could not keep journald's fd within the journald output object the same way as we do for regular file-based outputs. Quite the opposite, by doing that we gain t

[libvirt] [PATCH v2 17/20] virlog: Remove functions that aren't used anywhere anymore

2016-08-18 Thread Erik Skultety
This is mainly virLogAddOutputTo* which were replaced by virLogNewOutputTo* and the previously poorly named ones virLogParseAndDefine* functions. All of these are unnecessary now, since all the original callers were transparently switched to the new model of separate parsing and defining logic. Si

[libvirt] [PATCH v2 05/20] virlog: Introduce virLogDefineOutputs

2016-08-18 Thread Erik Skultety
Prepare a method that only defines a set of outputs. It takes a list of outputs, preferably created by virLogParseOutputs. The original set of outputs is reset and replaced by the new user-provided set of outputs. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virlog.

[libvirt] [PATCH v2 11/20] virlog: Introduce virLogParseOutputs

2016-08-18 Thread Erik Skultety
Another abstraction added on the top of parsing a single logging output. This method takes and parses the whole set of outputs, adding each single output that has already been parsed into a caller-provided array. If the user-supplied string contained duplicate outputs, only the last occurrence is t

[libvirt] [PATCH v2 15/20] daemon: Split output parsing and output defining

2016-08-18 Thread Erik Skultety
Since virLogParseAndDefineOutputs is going to be stripped from 'output defining' logic, replace all relevant occurrences with virLogSetOutputs call to make the change transparent to all original callers (daemons mostly). Signed-off-by: Erik Skultety --- daemon/libvirtd.c | 6 +++--- src

[libvirt] [PATCH v2 14/20] virlog: Introduce virLogSetFilters

2016-08-18 Thread Erik Skultety
This method will eventually replace virLogParseAndDefineFilters which currently does both parsing and defining. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virlog.c| 31 +++ src/util/virlog.h| 1 + 3 files changed, 33 in

[libvirt] [PATCH v2 04/20] virlog: Introduce virLogFindOutput

2016-08-18 Thread Erik Skultety
Outputs are a bit trickier than filters, because if the user(config)-specified set of outputs does contain duplicates. So, not only we would log twice, but we would also leek FD for journald, since that one is global and is overwritten every time a journald output was specified. For compatibility r

[libvirt] [PATCH v2 18/20] virlog: Make some of the methods static

2016-08-18 Thread Erik Skultety
Several methods that were introduced in previous patches were not made static on purpose so they could be introduced without any occurrence without the compiler complaining about not using them. Since the scope of the methods is local to the virlog module only, they can now be turned to static. Si

[libvirt] [PATCH v2 12/20] virlog: Introduce virLogParseFilters

2016-08-18 Thread Erik Skultety
Same as with outputs. Another layer of abstraction, this provides support for parsing a set of filters (preferred way). Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virlog.c| 65 src/util/virlog.h| 1

[libvirt] [PATCH v2 02/20] virlog: Introduce virLogOutputNew

2016-08-18 Thread Erik Skultety
Continuing with the refactor, in order to later split output parsing and output defining, introduce a new function which will create a new virLogOutput object which parser will insert into a list with the list being eventually defined. Signed-off-by: Erik Skultety --- src/libvirt_private.syms |

[libvirt] [PATCH v2 03/20] virlog: Introduce virLogFilterNew

2016-08-18 Thread Erik Skultety
This method allocated a new filter object which it then returns back to caller. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 2 ++ src/util/virlog.c| 46 ++ src/util/virlog.h| 3 +++ 3 files changed, 51 insertions(+) d

[libvirt] [PATCH v2 13/20] virlog: Introduce virLogSetOutputs

2016-08-18 Thread Erik Skultety
This API is the entry point to output modification of the logger. Currently, everything is done by virLogParseAndDefineOutputs. Parsing and defining will be split into two operations both handled by this method transparently. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/

[libvirt] [PATCH v2 09/20] virlog: Introduce virLogParseOutput

2016-08-18 Thread Erik Skultety
Introduce a method to parse an individual logging output. The difference compared to the virLogParseAndDefineOutput is that this method does not define the output, instead it makes use of the virLogNewOutputTo* methods introduced in the previous patch and just returns the virLogOutput object that h

[libvirt] [PATCH v2 06/20] virlog: Introduce virLogDefineFilters

2016-08-18 Thread Erik Skultety
Prepare a method that only defines a set of filters. It takes a list of filters, preferably created by virLogParseFilters. The original set of filters is reset and replaced by the new user-provided set of filters. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/util/virlog.

[libvirt] [PATCH v2 20/20] virlog: Split parsing and setting priority

2016-08-18 Thread Erik Skultety
Handling of outputs and filters has been changed in a way that splits parsing and defining. Do the same thing for logging priority as well, this however, doesn't need much of a preparation. --- src/util/virlog.c | 21 + tests/eventtest.c | 3 ++- 2 files changed, 11 insertions

[libvirt] [PATCH v2 00/20] Split parsing and defining logic of daemon's logging

2016-08-18 Thread Erik Skultety
v2 of the original series https://www.redhat.com/archives/libvir-list/2016-May/msg00229.html since v1: - as Cole pointed out in 20/38 of the original series, the patches were not designed in an elegant way and they were hard to review, so this series reworked the whole series: -> first the exi

[libvirt] [PATCH] vz: add validation callbacks

2016-08-18 Thread Mikhail Feoktistov
This patch fixes a bug which occurs when we check a bus and unit number for a new attached disk. We should do this check in ValidadionCallback, not in PostParse callback. Because in PostParse we have not initialized disk->info.addr.drive struct yet. Move part of code from domainPostParseCallback to

[libvirt] [PATCH] networkxml2conftest: Don't leak dnsmasq capabilities

2016-08-18 Thread Michal Privoznik
==18324== 32 bytes in 1 blocks are still reachable in loss record 41 of 114 ==18324==at 0x4C2C070: calloc (vg_replace_malloc.c:623) ==18324==by 0x4EA479B: virAlloc (viralloc.c:144) ==18324==by 0x4EA674A: virBitmapNewQuiet (virbitmap.c:77) ==18324==by 0x4EA67F7: virBitmapNew (virbitm

Re: [libvirt] [PATCH 3/3] network: allow limiting a element to certain domains

2016-08-18 Thread Michal Privoznik
On 12.08.2016 04:41, Laine Stump wrote: > For some unknown reason the original implementation of the > element only took advantage of part of the functionality in the > dnsmasq feature it exposes - it allowed specifying the ip address of a > DNS server which *all* DNS requests would be forwarded t

Re: [libvirt] [PATCH 1/3] network: new network forward mode 'open'

2016-08-18 Thread Michal Privoznik
On 12.08.2016 04:41, Laine Stump wrote: > The new forward mode 'open' is just like mode='route', except that no > firewall rules are added to assure that any traffic does or doesn't > pass. It is assumed that either they aren't necessary, or they will be > setup outside the scope of libvirt. > > R

Re: [libvirt] [PATCH 2/3] network: allow disabling dnsmasq's DNS server

2016-08-18 Thread Michal Privoznik
On 12.08.2016 04:41, Laine Stump wrote: > If you define a libvirt virtual network with one or more IP addresses, > it starts up an instance of dnsmasq. It's always been possible to > avoid dnsmasq's dhcp server (simply don't include a element), > but until now it wasn't possible to avoid having th

Re: [libvirt] [PATCH 2/2] qemu: allow turning off QEMU guest RAM dump globally

2016-08-18 Thread Andrea Bolognani
On Wed, 2016-08-17 at 17:04 -0400, John Ferlan wrote: > > @@ -6999,17 +7000,22 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, > >virTristateSwitchTypeToString(vmport)); > > } > > > > -if (def->mem.dump_core) { > > -if (!virQEMUCapsGe