Re: [libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-19 Thread David Gibson
On Thu, 19 Apr 2018 10:09:30 +0200 Laszlo Ersek wrote: > On 04/19/18 02:09, David Gibson wrote: > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > > Thank you -- I will replace SLOF with "openfirmware". > > This also implies

Re: [libvirt] [PATCH] tests: Xen: use qemu-system-i386 for emulator

2018-04-19 Thread Jim Fehlig
Ping? It's a trivial patch that causes some test file churn, but IMO the consistency with other files and removal of deprecated config is worth it. Regards, Jim On 04/11/2018 01:25 PM, Jim Fehlig wrote: Many of the old xm and sexpr test files used qemu-dm as the emulator. Modern Xen systems

[libvirt] [PATCH] util: Clean up consumers of virJSONValueArraySize

2018-04-19 Thread John Ferlan
Rather than have virJSONValueArraySize return a -1 when the input is not an array and then splat an error message, let's check for an array before calling and then change the return to be a size_t instead of ssize_t. That means using the helper virJSONValueIsArray as well as using a more generic

Re: [libvirt] [REPOST PATCH 0/2] vz - Clean/fix test driver usage of FindBy{UUID|ID}

2018-04-19 Thread John Ferlan
ping^2. Second of the remaining FindBy type changes... Tks, John On 04/11/2018 12:05 PM, John Ferlan wrote: > ping? > > Changes are less about vz driver and more about domain object > manipulation consistency. > > Tks, > > John > > > On 04/02/2018 09:21 AM, John Ferlan wrote: >>

Re: [libvirt] [PATCH v2 0/4] vmware - Clean/fix test driver usage of FindBy{UUID|ID}

2018-04-19 Thread John Ferlan
ping^2 Getting closer to being able to fix Add/Remove, but still need a few more baby steps... Tks, John On 04/11/2018 11:41 AM, John Ferlan wrote: > > ping? This is less about vmware specifically and more about domain > object manipulation coordination... > > Tks, > > John > > On

Re: [libvirt] [PATCH v4 0/5] qemu: add virQEMUBuildBufferEscapeComma in qemu_command.c

2018-04-19 Thread Sukrit Bhatnagar
On 18 April 2018 at 00:41, Cole Robinson wrote: > On 04/17/2018 01:33 PM, John Ferlan wrote: > > > > > > On 04/16/2018 06:56 PM, Sukrit Bhatnagar wrote: > >> Changes in v4: > >> Changes made in v2 anbd v3 to qemu_command.c are discarded. > >> Some changes introduced in v2

Re: [libvirt] [PATCHv2 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-19 Thread Collin Walling
On 04/19/2018 12:06 AM, Chris Venteicher wrote: > New function qemuMonitorJSONBuildCPUModelInfoFromJSON > created by extracting code from existing function > qemuMonitorJSONGetCPUModelExpansion > to create a reusable function for extracting cpu model info from json. > > Function

Re: [libvirt] [PATCHv2 0/3] query-cpu-model-baseline QMP command

2018-04-19 Thread Collin Walling
On 04/19/2018 12:06 AM, Chris Venteicher wrote: > Implementation of libvirt functions to support the > QEMU query-cpu-model-baseline QMP command. > > This is part of resolution of: > https://bugzilla.redhat.com/show_bug.cgi?id=1511999 > > Signed-off-by: Chris Venteicher >

[libvirt] [PATCH] tests: Fix incorrect check for virNetServerClientClose call

2018-04-19 Thread John Ferlan
Commit id '6df5d777' somehow during the move from one branch to another added an erroneous '!'... Signed-off-by: John Ferlan --- Pushing under the trivial rule. Not quite sure how a git am from my Coverity tree added the not in the condition.

Re: [libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command

2018-04-19 Thread Collin Walling
[...] >> Hi Chris, >> >> I'm working on a neighboring item with implementing cpu-comparison. Since >> there >> are some similarities with both comparison and baseline, I'd like for us to >> work together on driving both features forward. >> >> Thus far, I've created the qemu_monitor_json

Re: [libvirt] [PATCH 2/2] storage: Check qemu-img encryption type capability

2018-04-19 Thread John Ferlan
[...] >> Oh, OK - well I didn't find that to be obvious... So there is a way >> using secret objects to create a qcow[2] encrypted volume? > > Sure, the exact same syntax as with luks volumes - you just specify > "qcow" instead of "luks" as the type. > So I've been working on doing as

Re: [libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command

2018-04-19 Thread Chris Venteicher
- Original Message - > From: "Collin Walling" > To: "Chris Venteicher" , libvir-list@redhat.com > Sent: Monday, April 16, 2018 6:26:07 PM > Subject: Re: [libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command > > On 04/16/2018 02:06 AM,

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-19 Thread John Snow
On 04/16/2018 06:20 AM, Vladimir Sementsov-Ogievskiy wrote: > > So my point is: if we are going to implement something complicated, > let's implement entirely what we want, not a semi-solution. Otherwise, > implement a minimal and simple thing, to just make it all work (my > current solution).

Re: [libvirt] [PATCH 0/2] vmx: start reading/writing CPU topology

2018-04-19 Thread Richard W.M. Jones
On Thu, Apr 19, 2018 at 03:03:36PM +0200, Pino Toscano wrote: > Read/write only cpuid.coresPerSocket for now. > > Pino Toscano (2): > vmx: convert cpuid.coresPerSocket for CPU topology > vmx: write cpuid.coresPerSocket back from CPU topology > > src/vmx/vmx.c

[libvirt] [PATCH 04/14] driver: don't keep a pointer to the loaded library handle

2018-04-19 Thread Daniel P . Berrangé
Now that we've activated two hacks to prevent unloading of modules, there is no point passing back a pointer to the loaded library handle. Signed-off-by: Daniel P. Berrangé --- src/driver.c | 23 +++ src/driver.h | 5

[libvirt] [PATCH 01/14] build: prevent unloading of all public libraries

2018-04-19 Thread Daniel P . Berrangé
We previously added "-z nodelete" to the build of libvirt.so to prevent crashes when thread local destructors run which point to a code that has been dlclose()d: commit 384b9a76a5e387f64cfe8f83f4a518bb302e80f7 Author: Daniel P. Berrangé Date: Thu Apr 19 11:42:22 2018

[libvirt] [PATCH 05/14] driver: fix handling of error return from finding resource

2018-04-19 Thread Daniel P . Berrangé
The virFileFindResource method merely builds up the expected fully qualified path to the resource. It does not actually check if it exists on disk. The loadable module callers were mistakenly thinking a NULL indicates the file doesn't exist on disk, whereas it in fact indicates an out of memory

[libvirt] [PATCH 09/14] remote: honour errors from virDriverLoadModule

2018-04-19 Thread Daniel P . Berrangé
The libvirtd daemon currently ignores the return status of virDriverLoadModule entirely. This is way too loose, resulting in many important problems going undiagnosed, resulting in a libvirtd that may never work correctly. We should only ignore a non-existant module, and pass back any fatal

[libvirt] [PATCH 10/14] remote: split URI scheme into driver and transport upfront

2018-04-19 Thread Daniel P . Berrangé
Currently the remote driver extracts the transport from URI scheme and plays games to temporarily hide the driver part when formatting URIs. Refactor the code to split the URI scheme upfront so the two pieces are easily available where needed. Signed-off-by: Daniel P. Berrangé

[libvirt] [PATCH WIP 12/14] remote: conditionalize sources for some pieces to become optional

2018-04-19 Thread Daniel P . Berrangé
Prepare for reusing libvirtd source to create other daemons by making various bits conditionalized. This will avoid cut+paste of huge amount of source code for each new daemon. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am| 21 +

[libvirt] [PATCH 00/14] Initial split of the daemons

2018-04-19 Thread Daniel P . Berrangé
This patch series is the final bit of refactoring needed to start splitting up libvirtd for real. The last three patches are not really quite ready for merge, but I've included them to illustrate what the end result is looking like. I have taken the approach of adding conditionals into the

[libvirt] [PATCH WIP 13/14] remote: allow remote driver to connect to alternative daemons

2018-04-19 Thread Daniel P . Berrangé
If we are running inside the daemon, the remote driver usually declines URIs without a hostname present to avoid connecting back to itself, and to avoid accepting a URI that would be handled by a real local driver later in the probe order. It is now, however, possible to connect to alternative

[libvirt] [PATCH WIP 14/14] secret: introduce virtsecretd daemon

2018-04-19 Thread Daniel P . Berrangé
The virtsecretd daemon will be responsible for providing the secret API driver functionality. The secret driver is now disabled for the main libvirtd daemon. Signed-off-by: Daniel P. Berrangé --- src/remote/Makefile.inc.am | 1 - src/secret/Makefile.inc.am | 54

[libvirt] [PATCH 11/14] remote: refactor code for building UNIX socket paths

2018-04-19 Thread Daniel P . Berrangé
The code for building UNIX socket paths will be getting more complex to cope with accessing various different daemons. Refactor it to eliminate the code duplication and isolation the logic for constructing paths. Signed-off-by: Daniel P. Berrangé ---

[libvirt] [PATCH 07/14] driver: use normal error reporting APIs when loading modules

2018-04-19 Thread Daniel P . Berrangé
The driver module loading code is one of the few places that still uses VIR_ERROR for reporting failures. Convert it to normal error reporting APIs. Signed-off-by: Daniel P. Berrangé --- src/driver.c | 34 +++--- 1 file changed, 27 insertions(+),

[libvirt] [PATCH 08/14] driver: add option to make missing drivers a fatal problem

2018-04-19 Thread Daniel P . Berrangé
Currently the driver module loading code does not report an error if the driver module is physically missing on disk. This is useful for distro packaging optional pieces. When the daemons are split up into one daemon per driver, we will expect module loading to always succeed. If a driver is not

[libvirt] [PATCH 06/14] driver: tighten check for whether loadable module exists or not

2018-04-19 Thread Daniel P . Berrangé
Currently we do a access(R_OK) check to see whether a loadable module exists, treating failure as non-fatal. This is unreasonably loose, as a module which exists but has had incorrect permissions set will turn into a silent skip. We only want to skip loading if the module genuinely does not exist

[libvirt] [PATCH 03/14] build: prevent unloading of dlopen'd modules

2018-04-19 Thread Daniel P . Berrangé
We previously added "-z nodelete" to the build of libvirt.so to prevent crashes when thread local destructors run which point to a code that has been dlclose()d: commit 384b9a76a5e387f64cfe8f83f4a518bb302e80f7 Author: Daniel P. Berrangé Date: Thu Apr 19 11:42:22 2018

[libvirt] [PATCH 02/14] remote: stop trying to load Xen driver module

2018-04-19 Thread Daniel P . Berrangé
The Xen driver was recently deleted, but libvirtd has left over code that tries to use it. Fortunately this is dead code because WITH_XEN will never be defined anymore. Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon.c | 3 --- 1 file changed, 3 deletions(-)

Re: [libvirt] [dbus PATCH 5/8] Implement GetAllDomainStats method for Connect Interface

2018-04-19 Thread Katerina Koukiou
On Thu, 2018-04-19 at 16:45 +0200, Ján Tomko wrote: > On Thu, Apr 19, 2018 at 03:58:04PM +0200, Katerina Koukiou wrote: > > Signed-off-by: Katerina Koukiou > > --- > > data/org.libvirt.Connect.xml | 7 +++ > > src/connect.c| 40 > >

Re: [libvirt] [PATCH] git: add config file telling git-publish how to send patches

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 06:11:20PM +0200, Martin Kletzander wrote: > On Thu, Apr 19, 2018 at 10:06:45AM +0100, Daniel P. Berrangé wrote: > > On Thu, Apr 19, 2018 at 10:55:01AM +0200, Peter Krempa wrote: > > > On Wed, Apr 18, 2018 at 18:35:18 +0100, Daniel Berrange wrote: > > > > The "git-publish"

Re: [libvirt] [PATCH v3 5/5] qemu: Introduce memoryBacking/discard

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:00:27PM +0200, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1480668 QEMU has this new feature memory-backend-file.discard-data=yes which is a nifty optimization. Basically, when qemu is quitting or on memory hotplug it calls munmap() and close()

Re: [libvirt] [PATCH] git: add config file telling git-publish how to send patches

2018-04-19 Thread Martin Kletzander
On Thu, Apr 19, 2018 at 10:06:45AM +0100, Daniel P. Berrangé wrote: On Thu, Apr 19, 2018 at 10:55:01AM +0200, Peter Krempa wrote: On Wed, Apr 18, 2018 at 18:35:18 +0100, Daniel Berrange wrote: > The "git-publish" tool is a useful git extension for sending patch > series for code review. It

Re: [libvirt] [PATCH v3 4/5] qemu_capabilities: Introduce QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:00:26PM +0200, Michal Privoznik wrote: This capability tracks if memory-backend-file has discard-data attribute or not. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 17 + src/qemu/qemu_capabilities.h

Re: [libvirt] [PATCH v3 3/5] qemu_monitor: Introduce qemuMonitorGetObjectProps

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:00:25PM +0200, Michal Privoznik wrote: Now that we've gotten rid of misleading names we can introduce qemuMonitorGetObjectProps() function which queries -object properties. Again, some parts of code can be reused. This should be two commits: * split out

Re: [libvirt] [PATCH v3 1/5] qemu_capabilities: s/ObjectProps/DeviceProps/g

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:00:23PM +0200, Michal Privoznik wrote: So far all the properties we are trying to fetch are device properties, i.e. -device $dev on qemu command line. Change misleading variable names to express what's queried for better. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH v3 2/5] qemu_capabilities: Separate out device props fetching

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:00:24PM +0200, Michal Privoznik wrote: The code is written generic enough to be reused. Move it into a s/written// or s/generic/generically/ separate function. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 62

Re: [libvirt] [jenkins-ci PATCH 4/5] guests: Create ccache symlink farm

2018-04-19 Thread Martin Kletzander
Disclaimer: I don't feel like I can review the patches properly. Not only because I never heard the term "symlink farm" before, but mostly because jenkins-ci. However I noticed two nits here and there. I hope it won't discourage others from review. I apologize in advance if it does. On Wed,

[libvirt] [RFC PATCH 27/30] tests: qemublock: basic qcow2 tests

2018-04-19 Thread Peter Krempa
Add tests for backing chain handling, including a very long chain which is fully specified in the XML and an unterminated chain. The top level disk image would generate the following '-drive': file-qcow2-backing-chain-encryption.xml: -drive file=/var/lib/libvirt/images/a,encrypt.format=luks,

[libvirt] [RFC PATCH 23/30] tests: qemublock: Add tests for basic backing chain formats

2018-04-19 Thread Peter Krempa
Formats supporting backing chain such as qed, vmdk, don't have any other parameters than the backing store and 'qcow' has only encryption params which will be tested extra. Add this test case so they are covered since any further test cases will mainly care about 'qcow2' and 'raw'. The top level

[libvirt] [RFC PATCH 28/30] tests: qemublock: Add test combining authentication and encryption

2018-04-19 Thread Peter Krempa
iscsi and rbd support authentication of the connection. Combine it with encryption of qcow2. The top level disk image would generate the following '-drive' cmdline: -drive file=rbd:rbdpool/rbdimg:id=testuser-rbd:auth_supported=cephx\;none:

[libvirt] [RFC PATCH 29/30] tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options

2018-04-19 Thread Peter Krempa
The test cases would correspond to the following -drive command lines: file-backing_basic-detect.xml: -drive file=/var/lib/libvirt/images/a,format=qcow,if=none,id=drive-dummy,detect-zeroes=on -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy file-backing_basic-unmap-detect.xml: -drive

[libvirt] [RFC PATCH 20/30] tests: qemublock: Add testing of blockdev JSON property generator

2018-04-19 Thread Peter Krempa
Add a test infrastructure that will allow testing the JSON object generator used for generating data to use with blockdev-add. The resulting disk including the backing chain is validated to conform to the QAPI schema and the expected output files. The first test cases make sure that libvirt will

[libvirt] [RFC PATCH 26/30] tests: qemublock: Add test for raw luks disk format

2018-04-19 Thread Peter Krempa
Apart from adding test data add a function which sets up fake secrets for the test. The top level disk image would generate the following '-drive' cmdline: -drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy -device

[libvirt] [RFC PATCH 16/30] tests: qemublock: Rename variables in anticipation of new tests

2018-04-19 Thread Peter Krempa
New tests will add new data structures so rename the 'data' structure. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index

[libvirt] [RFC PATCH 00/30] qemu: Add generators and tests for format block node layers (blockdev-add saga)

2018-04-19 Thread Peter Krempa
To adopt -blockdev we will need to fully convert virStorageSource into the format accepted by qemu. This series adds the format layer (qcow2/raw/etc ...) since the protocol layer is already implemented. The goal is that we do the equivalent thing with blockdev to what we did with -drive. This

[libvirt] [RFC PATCH 06/30] qemu: block: Handle iomode property for json 'file' driver

2018-04-19 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index e7bd6c909d..6cf41cf544 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@

[libvirt] [RFC PATCH 14/30] [RFC] qemu: block: Always set discard for storage nodes

2018-04-19 Thread Peter Krempa
According to my research it seems that qemu always sets discard for the storage nodes. Replicate this in our generator. --- src/qemu/qemu_block.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 44662a4603..0357d93384

[libvirt] [RFC PATCH 21/30] tests: qemublock: Add basic 'raw' file test

2018-04-19 Thread Peter Krempa
Test the JSON props generator with a very simple 'raw' image with no other options. The node-names for the image are 31 bytes long so that we validate our node name detector. The top level disk image would generate the following '-drive' cmdline: -drive

[libvirt] [RFC PATCH 18/30] qemu: domain: Export qemuDomainDeviceDefValidateDisk

2018-04-19 Thread Peter Krempa
It will be used in the qemublocktest. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 8f240bd66d..b8abae1afb

[libvirt] [RFC PATCH 15/30] qemu: block: Add support for creating 'format' layer for blockdev-add

2018-04-19 Thread Peter Krempa
When using blockdev-add and friends, libvirt will need to create also properties for the qcow2/raw/... format handler in qemu. This patch adds the infrastructure and implements all formats known to libvirt including all properties which are expressed at the format level in qemu. Signed-off-by:

[libvirt] [RFC PATCH 19/30] qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain

2018-04-19 Thread Peter Krempa
The function will be reused in the test code where we don't care much that the gluster debug level can't be populated from the qemu config. Set the level only when 'cfg' is passed. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2

[libvirt] [RFC PATCH 25/30] tests: qemublock: Add test cases for 'aio' options of 'file' storage

2018-04-19 Thread Peter Krempa
Test that the 'aio' option is applied correctly for the 'file' protocol backend and across the backing chain. The top level disk image would generate the following '-drive' cmdline: file-backing_basic-aio_threads: -drive

[libvirt] [RFC PATCH 22/30] tests: qemublock: Add tests for all other format without special options

2018-04-19 Thread Peter Krempa
Similarly to the 'raw' case add tests for bochs, cloop, dmg, ploop, vdi vhd, and vpc. Covering all supproted non-backing formats. Note that the JSON name for 'ploop' maps to 'parallels' and 'vhd' maps to 'vhdx'. Files added here would result in the followint configs: file-bochs-noopts.xml:

[libvirt] [RFC PATCH 24/30] tests: qemublock: Add test-case for the 'vvfat' driver in qemu

2018-04-19 Thread Peter Krempa
Test mapping of the 'FAT' disk format to 'vvfat' in qemu. The top level disk image would generate the following '-drive' cmdline: dir-fat-readonly.xml: -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy Signed-off-by:

[libvirt] [RFC PATCH 30/30] tests: qemublock: Test handling of all cache modes

2018-04-19 Thread Peter Krempa
The test cases would correspond to the following -drive command lines: dir-fat-cache.xml: -drive file=fat:/var/somefiles,if=none,id=drive-dummy,readonly=on,cache=directsync -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy,write-cache=off file-backing_basic-cache-directsync.xml: -drive

[libvirt] [RFC PATCH 17/30] tests: Makefile: Sanitize entry for qemublocktest

2018-04-19 Thread Peter Krempa
Remove gnulib from _LDADD and move LDADDS to replace it. Also reformat the _SOURCES so that they can be easily extended. Signed-off-by: Peter Krempa --- tests/Makefile.am | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.am

[libvirt] [RFC PATCH 03/30] util: storage: Add shadow copies of few disk properties to virStorageSource

2018-04-19 Thread Peter Krempa
Few things which are currently stored the virDomainDiskDef structure are actually relevant for the storage source as well. Add the fields with a note that they are just mirror of the values from the disk. Signed-off-by: Peter Krempa --- src/util/virstoragefile.c | 4

[libvirt] [RFC PATCH 13/30] qemu: block: Format 'read-only' attribute for JSON disk protocol

2018-04-19 Thread Peter Krempa
This will be required when doing blockdev-add to conform with the approach qemu would chose to create the disks. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index

[libvirt] [RFC PATCH 10/30] qemu: block: Propagate 'legacy' parameter when formatting disk backing

2018-04-19 Thread Peter Krempa
The gluster protocol in qemu uses two styles, one of which is legacy and not covered by the QAPI schema. To allow using of the new style in the blockdev-add code, add a parameter for qemuBlockStorageSourceGetBackendProps which will switch between the two modes. Signed-off-by: Peter Krempa

[libvirt] [RFC PATCH 08/30] qemu: Move virtual FAT disk validation from command line builder

2018-04-19 Thread Peter Krempa
Move it to the validation callback and make it more robust. This will also put the checks in the correct place to use with -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 14 -- src/qemu/qemu_domain.c | 25 + 2 files

[libvirt] [RFC PATCH 01/30] storage: Properly track that backing chain members are readonly

2018-04-19 Thread Peter Krempa
Everything besides the top of the chain is readonly. Track this when parsing the XML and detecting the chain from the disk. Also fix the state when taking snapshots. All other cases where the top image is changed already preserve the readonly state from the original image. Signed-off-by: Peter

[libvirt] [RFC PATCH 05/30] qemu: block: Extract formatting of props for 'file' backend

2018-04-19 Thread Peter Krempa
'file' backend in qemu supports few more options than the current implementation. Extract it so that changes don't pollute the code. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git

[libvirt] [RFC PATCH 04/30] qemu: domain: Carefuly transfer configuration from disk to storage source

2018-04-19 Thread Peter Krempa
Some properties don't make sense to be configured for every single layer of the backing chain, but to avoid needing to pass the disk structure we will copy them to the individual virStorageSource-s Zero detection is applied only for the top layer image, while caching and iomode for all layers.

[libvirt] [RFC PATCH 12/30] qemu: block: Format cache modes for disk storage backends

2018-04-19 Thread Peter Krempa
When used directly with blockdev-add/-blockdev the cache mode will need to be specified directly for every image rather than just for the disk itself. This implements the backing options 'direct' and 'no-flush'. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 45

[libvirt] [RFC PATCH 09/30] qemu: block: Add support for accessing directories via the 'vvfat' driver

2018-04-19 Thread Peter Krempa
Handle VIR_STORAGE_TYPE_DIR in qemuBlockStorageSourceGetBackendProps so that a 'vvfat' driver is used, which emulates a FAT filesystem containing the folders. qemu requires us to add it as a storage layer, since a 'raw' layer is usually put on top of it. Signed-off-by: Peter Krempa

[libvirt] [RFC PATCH 02/30] qemu: domain: Format storage source node names into private data

2018-04-19 Thread Peter Krempa
Save and restore node names if we know them in the status XML so that we don't need to recalculate them or don't lose them in some cases. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 12 1 file changed, 12 insertions(+) diff --git

[libvirt] [RFC PATCH 07/30] utils: storage: Mark that a virStorageSource is going to be used as a floppy

2018-04-19 Thread Peter Krempa
Add a flag denoting that a virStorageSource is going to be used as a floppy image. This will be useful in cases where the user passes in files which shall be exposed as an image to the guest. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 3 +++

[libvirt] [RFC PATCH 11/30] qemu: block: Validate node-names for use with qemu

2018-04-19 Thread Peter Krempa
qemu declares node-name as a 32 byte buffer and silently truncates anything longer than that. This is unacceptable for libvirt, so we need to make sure that we won't ever supply a node-name exceeding 31 chars. Add a function which will do the validation and use it to validate storage-protocol

Re: [libvirt] [dbus PATCH 4/8] Move definition for g_autoptr virDomainStatsRecordPtr to util.h

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 04:47:51PM +0200, Pavel Hrdina wrote: > On Thu, Apr 19, 2018 at 03:58:03PM +0200, Katerina Koukiou wrote: > > We be reused in connect.c > > s/We/We'll/ Ehm, ignore this, it supposed to be s/We/Will/. Pavel signature.asc Description: PGP signature -- libvir-list mailing

Re: [libvirt] [PATCH v2 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:19:39PM +0200, Andrea Bolognani wrote: The current private XML parsing code relies on the assumption that NUMA node IDs start from 0 and are densely allocated, neither of which is necessarily the case. Change it so that the bitmap size is dynamically calculated by

Re: [libvirt] [PATCH v2 1/2] tests: Create full host NUMA topology in more cases

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:19:38PM +0200, Andrea Bolognani wrote: vircapstest has code to add a full host NUMA topology, that is, one that includes all information about nodes and CPUs including IDs; testQemuCapsInit(), which is used to create a mock virCapsPtr for QEMU tests, however, just

Re: [libvirt] [PATCH python] Fix build with older libvirt versions

2018-04-19 Thread Daniel P . Berrangé
On Thu, Apr 19, 2018 at 05:03:37PM +0200, Ján Tomko wrote: > On Thu, Apr 19, 2018 at 03:35:33PM +0100, Daniel P. Berrangé wrote: > > The libvirt python module is supposed to build with historical versions > > of the API back to 0.9.1, which means all constants / methods must be The incomplete

Re: [libvirt] [dbus PATCH 8/8] Implement GetDomainCapabilties method for Connect Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:07PM +0200, Katerina Koukiou wrote: s/GetDomainCapabilties/GetDomainCapabilities/ in $subject > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 10 ++ > src/connect.c| 34

Re: [libvirt] [PATCH python] Fix build with older libvirt versions

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:35:33PM +0100, Daniel P. Berrangé wrote: The libvirt python module is supposed to build with historical versions of the API back to 0.9.1, which means all constants / methods must be commit 314b2346df2d8e2d7d705b003c693b4fa0189bdf Author: Edgar Kaziakhmedov

Re: [libvirt] [dbus PATCH 5/8] Implement GetAllDomainStats method for Connect Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:04PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 7 +++ > src/connect.c| 40 > 2 files changed, 47 insertions(+) > > diff

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:28:36PM +0200, Michal Privoznik wrote: On 04/19/2018 04:16 PM, Michal Privoznik wrote: Allocated in qemuMigrationParamsNew() we need to free priv->job.migParams when no longer needed. ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in

Re: [libvirt] [dbus PATCH 8/8] Implement GetDomainCapabilties method for Connect Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:07PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 10 ++ src/connect.c| 34 ++ 2 files changed, 44 insertions(+) Reviewed-by: Ján

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-19 Thread Paolo Bonzini
On 19/04/2018 10:40, Gerd Hoffmann wrote: >> So I was ready to return and suggest that maybe libvirt should probe >> the device to know about these ancillary configuration details, but >> then I remembered that both mdev vGPU vendors had external dependencies >> to even allow probing the device.

Re: [libvirt] [dbus PATCH 6/8] Introduce virtDBusUtilStringListFree

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:05PM +0200, Katerina Koukiou wrote: virtDBusUtilStringListFree is an autoptr cleanup function for gchar ** type. Signed-off-by: Katerina Koukiou --- src/util.c | 9 + src/util.h | 7 +++ 2 files changed, 16 insertions(+) diff --git

Re: [libvirt] [dbus PATCH 4/8] Move definition for g_autoptr virDomainStatsRecordPtr to util.h

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:03PM +0200, Katerina Koukiou wrote: > We be reused in connect.c s/We/We'll/ Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [dbus PATCH 5/8] Implement GetAllDomainStats method for Connect Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:04PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 40 2 files changed, 47 insertions(+) diff --git

Re: [libvirt] [dbus PATCH 3/8] Implement FindStoragePoolSources for Domain Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:02PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 9 + > src/connect.c| 30 ++ > tests/test_connect.py| 5 + > 3 files

Re: [libvirt] [dbus PATCH 2/8] Implement CompareCPU method for Connect Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:01PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 7 +++ > src/connect.c| 43 +++ > 2 files changed, 50 insertions(+) > >

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Andrea Bolognani
On Thu, 2018-04-19 at 16:15 +0200, Peter Krempa wrote: > On Thu, Apr 19, 2018 at 15:45:52 +0200, Andrea Bolognani wrote: > > Mh, that's trickier than I initially though, because > > virBitmapParseSeparator() calls virReportError() itself on parse > > failure, and changing doesn't sound feasible. >

Re: [libvirt] [dbus PATCH 4/8] Move definition for g_autoptr virDomainStatsRecordPtr to util.h

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:03PM +0200, Katerina Koukiou wrote: We be reused in connect.c s/We/Will/ Signed-off-by: Katerina Koukiou --- src/domain.c | 2 -- src/util.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Peter Krempa
On Thu, Apr 19, 2018 at 16:37:23 +0200, Andrea Bolognani wrote: > On Thu, 2018-04-19 at 16:15 +0200, Peter Krempa wrote: > > On Thu, Apr 19, 2018 at 15:45:52 +0200, Andrea Bolognani wrote: > > > Mh, that's trickier than I initially though, because > > > virBitmapParseSeparator() calls

Re: [libvirt] [dbus PATCH 3/8] Implement FindStoragePoolSources for Domain Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:02PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 9 + src/connect.c| 30 ++ tests/test_connect.py| 5 + 3 files changed, 44

Re: [libvirt] [dbus PATCH 1/8] Implement BaselineCPU method for Connect Interface

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 03:58:00PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Connect.xml | 7 +++ > src/connect.c| 38 ++ > 2 files changed, 45 insertions(+)

[libvirt] [PATCH python] Fix build with older libvirt versions

2018-04-19 Thread Daniel P . Berrangé
The libvirt python module is supposed to build with historical versions of the API back to 0.9.1, which means all constants / methods must be commit 314b2346df2d8e2d7d705b003c693b4fa0189bdf Author: Edgar Kaziakhmedov Date: Wed Feb 7 17:49:30 2018 +0300

Re: [libvirt] [dbus PATCH] Fix memory leaks introduced by commits 40dc3b and 408a25

2018-04-19 Thread Pavel Hrdina
On Thu, Apr 19, 2018 at 04:09:38PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > src/domain.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Pavel Hrdina signature.asc Description: PGP

Re: [libvirt] [dbus PATCH 1/8] Implement BaselineCPU method for Connect Interface

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 03:58:00PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Connect.xml | 7 +++ src/connect.c| 38 ++ 2 files changed, 45 insertions(+) Reviewed-by: Ján

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Michal Privoznik
On 04/19/2018 04:16 PM, Michal Privoznik wrote: > Allocated in qemuMigrationParamsNew() we need to free > priv->job.migParams when no longer needed. > > ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost > in loss record 112 of 123 > ==8061==at 0x4C2CF26: calloc

Re: [libvirt] [PATCH v2] qemuDomainObjPrivateDataClear: Don't leak @migParams

2018-04-19 Thread Ján Tomko
On Thu, Apr 19, 2018 at 04:16:56PM +0200, Michal Privoznik wrote: Allocated in qemuMigrationParamsNew() we need to free priv->job.migParams when no longer needed. ==8061== 234 (192 direct, 42 indirect) bytes in 1 blocks are definitely lost in loss record 112 of 123 ==8061==at 0x4C2CF26:

Re: [libvirt] [PATCH 0/3] sample: vfio mdev display devices.

2018-04-19 Thread Alex Williamson
On Thu, 19 Apr 2018 10:40:18 +0200 Gerd Hoffmann wrote: > > So I was ready to return and suggest that maybe libvirt should probe > > the device to know about these ancillary configuration details, but > > then I remembered that both mdev vGPU vendors had external dependencies >

[libvirt] [PATCH v2 REBASE] lib: provide error message in new blockjob event

2018-04-19 Thread Nikolay Shirokovskiy
If block job is completed with error qemu additionally provides error message. This patch introduces new event VIR_DOMAIN_EVENT_ID_BLOCK_JOB_ERROR to pass error message to client. This error message has no semantics and should not be interpreted. API and RPC layer also have reserved 'code' field

[libvirt] [PATCH v2 2/2] qemu: Figure out nodeset bitmap size correctly

2018-04-19 Thread Andrea Bolognani
The current private XML parsing code relies on the assumption that NUMA node IDs start from 0 and are densely allocated, neither of which is necessarily the case. Change it so that the bitmap size is dynamically calculated by looking at NUMA node IDs instead, which ensures all nodes will be able

[libvirt] [PATCH v2 0/2] Don't choke on valid NUMA nodesets on daemon restart

2018-04-19 Thread Andrea Bolognani
Changes from [v1]: * make sure the tests pass even when compiling --without-qemu; * actually run syntax-check before sending out patches. [v1] https://www.redhat.com/archives/libvir-list/2018-April/msg00937.html Andrea Bolognani (2): tests: Create full host NUMA topology in more cases

[libvirt] [PATCH v2 1/2] tests: Create full host NUMA topology in more cases

2018-04-19 Thread Andrea Bolognani
vircapstest has code to add a full host NUMA topology, that is, one that includes all information about nodes and CPUs including IDs; testQemuCapsInit(), which is used to create a mock virCapsPtr for QEMU tests, however, just fakes it by setting nnumaCell_max to some number. While the latter

Re: [libvirt] [PATCH v2 2/5] uml: Fix umlInotifyEvent dom object handling

2018-04-19 Thread John Ferlan
On 04/19/2018 09:51 AM, Daniel P. Berrangé wrote: > On Mon, Apr 02, 2018 at 09:06:13AM -0400, John Ferlan wrote: >> The virDomainObjListFindByName will return a locked and reffed >> object. If we call virDomainObjListRemove that will unlock the >> object upon return, thus we need to relock the

  1   2   >