[libvirt] [PATCHv2 24/62] qemu: domain: Add infrastructure to generate block node names

2018-08-13 Thread Peter Krempa
Node names for block objects in qemu need to be unique for an instance of the qemu process. Add a counter to generate objects sequentially and store it in the status XML so that we can restore it. The helpers added allow to create new node names and reset the counter after the VM process

[libvirt] [PATCHv2 27/62] qemu: Use proper backingIndex when reporting stats for backing chain

2018-08-13 Thread Peter Krempa
Use the index stored in virStorageSource struct rather than recalculating it. Currently we'd report proper numbers but that will change with blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCHv2 12/62] qemu: monitor: Allow using 'qdev' instead of 'device' for getting disk throttling

2018-08-13 Thread Peter Krempa
The 'device' field reported by 'query-block' is empty when -blockdev is used. Add an argument which will allow matching disk by using the qdev id so we can use this code with -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 8

[libvirt] [PATCHv2 04/62] qemu: monitor: Remove unsupported function check for 'block_resize'

2018-08-13 Thread Peter Krempa
QEMU supports 'block_resize' since 0.14 so we don't need to do explicit checking. Additionally the caller did not use the different value at all. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c

[libvirt] [PATCHv2 61/62] qemu: driver: Prepare qemuDomainGetStatsBlock (bulk disk stats) for -blockdev

2018-08-13 Thread Peter Krempa
Add code paths which call into the new functions to gather the data on a per-node-name basis and tweak the aliases used for extracting the data. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 54 +++--- 1 file changed, 38 insertions(+), 16

[libvirt] [PATCHv2 41/62] qemu: monitor: Handle TRAY_MOVED event correctly with -blockdev

2018-08-13 Thread Peter Krempa
Add handling of the 'id' field in the event which corresponds to the QDEV id of the device. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 ++- src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 11 --- src/qemu/qemu_process.c | 3 ++- 4 files

Re: [libvirt] [PATCH] spec: Use %make_install

2018-08-13 Thread no-reply
Hi, This series was run against 'syntax-check' test by patchew.org, which failed, please find the details below: Type: series Message-id: c690de2ccd5777f163f030bcaf13ec4e69881933.1533051128.git.crobi...@redhat.com Subject: [libvirt] [PATCH] spec: Use %make_install === TEST SCRIPT BEGIN ===

[libvirt] [PATCH v2 0/3] conf: standardize naming

2018-08-13 Thread Anya Harter
on vir*ObjListExport call stack Anya Harter (3): conf: rename structs used by Export function conf: rename Export Callback functions conf: rename Match functions src/conf/virinterfaceobj.c | 16 +--- src/conf/virnetworkobj.c| 24 ---

[libvirt] [PATCH v2 3/3] conf: rename Match functions

2018-08-13 Thread Anya Harter
name match functions to be the vir prefix and interface name followed by ObjMatch ex. for virNetworkObjListExport, the match function is named virNetworkObjMatch Signed-off-by: Anya Harter --- src/conf/virnetworkobj.c| 8 src/conf/virnodedeviceobj.c | 6 +++---

[libvirt] [PATCH v2 2/3] conf: rename Export Callback functions

2018-08-13 Thread Anya Harter
name functions to be the name of the export function followed by Callback ex. for virInterfaceObjListExport, the callback function is named virInterfaceObjListExportCallback Signed-off-by: Anya Harter --- src/conf/virinterfaceobj.c | 8 src/conf/virnetworkobj.c | 8

[libvirt] [PATCH v2 1/3] conf: rename structs used by Export function

2018-08-13 Thread Anya Harter
name structs to be the name of the Export function followed by Data also tweak definitions to follow standard struct definition pattern ex. for virInterfaceObjListExport, the struct is defined as follows: typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;

[libvirt] [PATCHv2 00/62] qemu: Add support for -blockdev

2018-08-13 Thread Peter Krempa
In this version everything except blockjobs should work properly. Similarly to the previous posting, the block job support is not part of this posting yet so blockjobs will not work. Changes to v1: - Added support for floppies via -device so they work with blockdev - fixed return value from the

[libvirt] [PATCHv2 23/62] conf: domain: Format out user provided backing chains in XML

2018-08-13 Thread Peter Krempa
If a user configures the backing chain in the XML we should not ignore it. We already do parse it but don't format it out. As a safety-precaution don't attempt to format detected chain into the inactive XML. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 8

[libvirt] [PATCHv2 29/62] qemu: alias: Generate QDEV name of the block backend for disks

2018-08-13 Thread Peter Krempa
When we stop using -drive qemu stops reporting it in some of the monitor commands. To allow referring the disk frontends and the corresponding block backends we need to know these names. Unfortunately different buses require different names. Signed-off-by: Peter Krempa --- src/qemu/qemu_alias.c

[libvirt] [PATCHv2 37/62] qemu: process: Setup disk io throttling for -blockdev

2018-08-13 Thread Peter Krempa
The proper way to do this would be to use the 'throttle' driver but unfortunately it can't change the 'throttle_group' so we can't provide feature parity. This hack uses the block_set_io_throttle command to do so until we can properly replace it. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 25/62] conf: Implement private data formatting and parsing for disks

2018-08-13 Thread Peter Krempa
Allow storing of private data in the status XML for disks. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 60 ++ src/conf/domain_conf.h | 7 ++ 2 files changed, 67 insertions(+) diff --git a/src/conf/domain_conf.c

[libvirt] [PATCHv2 13/62] qemu: monitor: Add 'nodename' argument for 'block_resize'

2018-08-13 Thread Peter Krempa
Allow referring to individual node name to rezise. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_monitor.c | 12 ++-- src/qemu/qemu_monitor.h | 3 ++- src/qemu/qemu_monitor_json.c | 4 +++- src/qemu/qemu_monitor_json.h | 3 ++-

[libvirt] [PATCHv2 55/62] qemu: Refactor control flow in qemuDomainGetStatsBlockExportDisk

2018-08-13 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 479bf3adfe..e8e8bdbb14 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20194,20

[libvirt] [PATCHv2 50/62] qemu: driver: Don't pass 'virDomainDiskDefPtr' to qemuDomainGetStatsOneBlock

2018-08-13 Thread Peter Krempa
Allow reuse of qemuDomainGetStatsOneBlock to work with nodenames by removing the code that looks up the stats data to the caller. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCHv2 33/62] qemu: block: Add generator for the 'copy-on-read' blockdev driver

2018-08-13 Thread Peter Krempa
The copy on read functionality is done using a separate layer in the backing chain. Add function to generate properties for it. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 22 ++ src/qemu/qemu_block.h | 2 ++ 2 files changed, 24 insertions(+) diff --git

[libvirt] [PATCHv2 44/62] qemu: monitor: Add APIs for cdrom tray handling for -blockdev

2018-08-13 Thread Peter Krempa
With blockdev we can use the full range of commands to manipulate the tray and the medium separately. Implement monitor code for this. Schema testing done in the qemumonitorjsontest allows us to verify that we generate the commands correctly. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 39/62] qemu: driver: Prepare qemuDomainBlockResize for blockdev

2018-08-13 Thread Peter Krempa
Use the nodename to resize the device rather than the drive alias. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index fb09278112..f745a0392a 100644

[libvirt] [PATCHv2 19/62] qemu: caps: Add capability for using the blockdev infrastructure

2018-08-13 Thread Peter Krempa
The capability currently is not enabled so that we can add individual bits first. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt] [PATCHv2 26/62] conf: Allow formatting and parsing of 'index' for disk source image

2018-08-13 Thread Peter Krempa
Similarly to backing store indexes which will become stable eventually we need also to be able to format and store in the status XML for later use the index for the top level of the backing chain. Add XML formatter, parser, schema and docs. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 35/62] qemu: command: format disk source commandline for -blockdev

2018-08-13 Thread Peter Krempa
Format the backing chain onto the commandline using the 'json' syntax with -blockdev. The command line formatter needs only minor tweaks to add the new entries but we now need to initialize the strucutres that are used for every layer of the backing chain. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 17/62] qemu: hotplug: Don't generate alias when detaching disk

2018-08-13 Thread Peter Krempa
It should be impossible to lack an alias in the domain definition. Other disk types don't generate it so remove it here as well. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c

[libvirt] [PATCHv2 22/62] qemu: process: Don't detect nodenames when we support -blockdev

2018-08-13 Thread Peter Krempa
We'll specify them ourselves so it's pointless to attempt to redetect them. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d9acb4bd68..ff4d992ff1 100644 ---

[libvirt] [PATCHv2 32/62] qemu: proces: assign node names for user defined backing chains

2018-08-13 Thread Peter Krempa
Prepare the full backing chain by instantiating authentication and TLS transport secrets and other necessary objects so that we can add the full backing chain explicitly to qemu. This also includes allocation of nodenames for the individual backing chain members. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 48/62] qemu: monitor: Retrieve blockstats also by qdev and node-names

2018-08-13 Thread Peter Krempa
For use with -blockdev we need to be able to retrieve the stats by 'qdev' for the frontend device stats since 'device' will be empty. Note that for non-blockdev case qdev and 'device' with 'drive-' skipped would be the same. Additionally so that we can report the highest written offset we need to

[libvirt] [PATCHv2 31/62] qemu: domain: Add field for storing node name for copy-on-read

2018-08-13 Thread Peter Krempa
The copy-on-read feature is expressed by adding a new node layer in qemu when using -blockdev. Since we will keep these per-disk (as opposed to per storage source) we need to store the appropriate node names in the disk definition. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c

[libvirt] [PATCHv2 36/62] qemu: command: Add helper to check if disk throttling is enabled

2018-08-13 Thread Peter Krempa
Add a helper which will use a collection of other helpers to determine whether a disk requires throttling to be enabled. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 10 ++ src/qemu/qemu_command.h | 3 +++ 2 files changed, 13 insertions(+) diff --git

[libvirt] [PATCHv2 21/62] qemu: domain: Don't redetect backing chain when using -blockdev

2018-08-13 Thread Peter Krempa
We need to load the backing chain from the XML when using -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 38e88404aa..d9acb4bd68 100644 ---

[libvirt] [PATCHv2 34/62] qemu: domain: Prepare qemuDomainDiskGetBackendAlias for -blockdev

2018-08-13 Thread Peter Krempa
Pass in the node name as the backend alias when -blockdev is used. As copy-on-read is expressed by a separate -blockdev backing chain member we need to decide which node name to use here. For empty cdroms when using -blockdev there is no backend at all so NULL is returned. Signed-off-by: Peter

[libvirt] [PATCHv2 38/62] qemu: driver: Use QOM backend name for disk IO throttling APIs

2018-08-13 Thread Peter Krempa
With -blockdev the drive alias can't be used any more so we need to switch to the QOM name. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCHv2 28/62] qemu: Add field to store QDEV path of a disk in private data

2018-08-13 Thread Peter Krempa
When using -blockdev you need to use the qdev path to refer to the disk fronends. Add means for storing the path and getting it after restart. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c| 27 +++ src/qemu/qemu_domain.h|

[libvirt] [PATCHv2 49/62] qemu: monitor: Add APIs for refreshing disk capacity when using -blockdev

2018-08-13 Thread Peter Krempa
Disk image size data are not contained in the reply of query-blockstats but need to be gathered from query-block. For use with -blockdev we really need to call 'query-named-block-nodes' and process it to retrieve the correct data. This patch introduces qemuMonitorBlockStatsUpdateCapacityBlockdev

[libvirt] [PATCHv2 46/62] qemu: driver: Don't copy disk alias in qemuDomainBlocksStatsGather

2018-08-13 Thread Peter Krempa
The string is not modified so it does not make sense to have a copy. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5dee701dc4..f36d4dc37f 100644 ---

[libvirt] [PATCHv2 60/62] qemu: driver: Allow using blockdev with qemuDomainBlocksStatsGather

2018-08-13 Thread Peter Krempa
Use the 'qdev' instead of the disk alias to lookup the stats and transfer the capacity from the appropriate node name so that the function works with -blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 48 +--- 1 file changed, 37

[libvirt] [PATCHv2 52/62] qemu: Extract exporting of disk block statistics

2018-08-13 Thread Peter Krempa
Split out the code which converts the stats gathered in qemuDomainGetStatsBlock into typed parameters so that it will look less ugly when extending it. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 73 +- 1 file changed, 49

[libvirt] [PATCHv2 62/62] DO NOT APPLY: Enable QEMU_CAPS_BLOCKDEV if 'query-blockstats' works with -blockdev

2018-08-13 Thread Peter Krempa
'query-blockstats' did not report the 'qdev' field prior to fixing it so that it works with our setup. Use that as a witness to enable -blockdev Note that the blockjobs were NOT adapted yet so any blockjob will desync the state of qemu. This patch needs to wait until blockjobs are fixed. ---

[libvirt] [PATCHv2 51/62] qemu: monitor: Extract 'write-threshold' automatically for -blockdev

2018-08-13 Thread Peter Krempa
In cases when -blockdev is used we need to use 'query-named-block-nodes' instead of 'query-block'. This means that we can extract the write-threshold variable right away. To keep compatibility with old VMs modify the code which was extracting the value previously so that it updates the stats

[libvirt] [PATCHv2 57/62] qemu: Export stats relevant for the storage backend

2018-08-13 Thread Peter Krempa
Data relevant for the storage of a backing chain member will need to be reported separately when switching to blockdev. Prepare a function that extracts the appropriate data. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 28 +++- 1 file changed, 27

[libvirt] [PATCHv2 45/62] qemu: hotplug: Implement removable media change for -blockdev

2018-08-13 Thread Peter Krempa
Use the new APIs which allow to manipulate the tray and media separately and also allow using a nodename to refer to a media to implement media changing. With the new approach we don't have to call eject twice as the media is removed by calling qemuMonitorBlockdevMediumRemove. Signed-off-by:

[libvirt] [PATCHv2 54/62] qemu: Export stats relevant for the frontend separately

2018-08-13 Thread Peter Krempa
While we report the read and written byte stats for every single layer of the backing chain, qemu in fact reports them only for the frontend. Split out the relevant stats into a separate function so that we can later fix this bug and stop reporting it for backing chain entries where they don't

[libvirt] [PATCHv2 30/62] qemu: command: Setup floppy drives via -device for blockdev

2018-08-13 Thread Peter Krempa
To allow referring to the drives via the QOM id we need to setup the floppy drives with a proper ID. This means that -device should be used for them. There are the following quirks: - FDC needs to be instantiated prior to any floppy device - floppy drive specified via -device does not support

[libvirt] [PATCHv2 56/62] qemu: Report frontend stats only for the frontend entry

2018-08-13 Thread Peter Krempa
When reporting stats for the backing chain some of them make sense only for the topmost entry as they are actually tied to the frontend device. We unfortunately can't change that fact, but we can stop reporting all zero stats for the backing chain members where they don't make any sense.

[libvirt] [PATCHv2 42/62] qemu: monitor: Handle BLOCK_IO_ERROR event properly with -blockdev

2018-08-13 Thread Peter Krempa
Use the 'node-name' provided in the event if 'device' is empty to look up the disk. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 ++- src/qemu/qemu_monitor.h | 2 ++ src/qemu/qemu_monitor_json.c | 5 - src/qemu/qemu_process.c | 12 +++- 4 files

[libvirt] [PATCHv2 40/62] qemu: process: Add lookup via QOM id to qemuProcessFindDomainDiskByAlias

2018-08-13 Thread Peter Krempa
Allow looking up also via QOM id and rename the function accordingly. Also add documentation of the specifics. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 42 +++--- src/qemu/qemu_process.h | 5 +++-- 3 files

[libvirt] [PATCHv2 43/62] qemu: hotplug: Prepare for blockdev-add/blockdev-del with backing chains

2018-08-13 Thread Peter Krempa
Initialize data for the whole backing chain when plugging in or removing disks when a machine supports -blockdev. Similarly to startup we need to prepare the structures for the whole backing chain and take care of the copy-on-read feature. Signed-off-by: Peter Krempa ---

[libvirt] [PATCHv2 53/62] qemu: Extract exporting of the header for block stats

2018-08-13 Thread Peter Krempa
Split out the header so that the loop can be refactored later. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 38 -- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCHv2 59/62] qemu: Use QOM path with query-block when using -blockdev

2018-08-13 Thread Peter Krempa
Switch to using the QOM/qdev handles in all calls to qemuMonitorGetBlockInfo when using -blockdev. The callers also need to make sure to use the correct handle afterwards to extract the data. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 9 - src/qemu/qemu_process.c | 7

[libvirt] [PATCHv2 58/62] qemu: monitor: Report data also for 'qdev' entry in qemuMonitorJSONGetBlockInfo

2018-08-13 Thread Peter Krempa
With -blockdev qemu will not report any useful "device" for the data returned by 'query-block'. We need to start using the 'qdev' field to do so in cases when "device" is empty or it does not match the entry name. This patch adds data for the 'qdev' field into the returned data structure.

[libvirt] [PATCHv2 47/62] qemu: Explicitly find disks for stats totals

2018-08-13 Thread Peter Krempa
Rather than totalling every entry from 'query-block' for stats provided by qemuDomainBlocksStatsGather total only stats for known disks. This will allow to return data for nodenames and qdevs in the same hash so that we can use them with -blockdev. Signed-off-by: Peter Krempa ---

Re: [libvirt] [PATCH] spec: Add libvirt-daemon-driver-storage-iscsi-direct

2018-08-13 Thread Michal Prívozník
On 08/09/2018 01:44 AM, Cole Robinson wrote: > Signed-off-by: Cole Robinson > --- > libvirt.spec.in | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 00/16] Revert Jansson usage

2018-08-13 Thread Ján Tomko
On Mon, Aug 13, 2018 at 01:58:56PM +0100, Daniel P. Berrangé wrote: On Mon, Aug 13, 2018 at 02:54:00PM +0200, Ján Tomko wrote: On Mon, Aug 13, 2018 at 01:55:10PM +0200, Ján Tomko wrote: > For QEMU, we need a JSON parser that is able to handle its non-compliant > JSON usage: >

Re: [libvirt] [PATCH] qemu: Prefer nvdimmPath over hugepages for memory-backend-file

2018-08-13 Thread Pavel Hrdina
On Mon, Aug 13, 2018 at 04:13:31PM +0200, Michal Privoznik wrote: > If a domain has hugepages configured and we're currently building > memory-backend-file for a nvdimm device that domain has we will > put hugepages path onto the command line. It should have been > nvdimm path configured in the

Re: [libvirt] [PATCH 00/16] Revert Jansson usage

2018-08-13 Thread Eric Blake
On 08/13/2018 06:55 AM, Ján Tomko wrote: For QEMU, we need a JSON parser that is able to handle its non-compliant JSON usage: https://bugzilla.redhat.com/show_bug.cgi?id=1614569 QEMU is not non-compliant in its use of JSON. Rather, https://tools.ietf.org/html/rfc7159 states that "This

Re: [libvirt] [PATCH] esx: Fix build when libcurl debug is enabled

2018-08-13 Thread Michal Prívozník
On 08/11/2018 04:39 PM, Marcos Paulo de Souza wrote: > When building libvirt with libcurl debug enabled (with > ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up: > > make[3]: Entering directory '/mnt/data/gitroot/libvirt/src' > CC esx/libvirt_driver_esx_la-esx_vi.lo >

Re: [libvirt] [PATCH] esx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model

2018-08-13 Thread Michal Prívozník
On 08/12/2018 01:05 PM, Marcos Paulo de Souza wrote: > Commit 6c0d0210cbcd5d647f0d882c07f077d444bc707d changed the behavior of > virStr*cpy* functions, so now the nodeGetInfo call fails. Version 4.1.0 > (default for Fedora 28) works: > > Model: Intel Core i7-4500U CPU @ 1.80G > > Current master

Re: [libvirt] [PATCH] virsh: Add missed fields to pool-define-as item entry

2018-08-13 Thread Michal Prívozník
On 08/13/2018 02:25 PM, John Ferlan wrote: > Commit id d45bee449 updated the pool-define-as qualifier descriptions > to add some new fields, but neglected to modify the command item list > in order to add those fields as well. > > Signed-off-by: John Ferlan > --- > > Discovered by QE while

[libvirt] [PATCH] qemu: Prefer nvdimmPath over hugepages for memory-backend-file

2018-08-13 Thread Michal Privoznik
If a domain has hugepages configured and we're currently building memory-backend-file for a nvdimm device that domain has we will put hugepages path onto the command line. It should have been nvdimm path configured in the XML. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c

[libvirt] [PATCH] vircgroup: fix MinGW build

2018-08-13 Thread Pavel Hrdina
Broken by commit <901d2b9c87>. Signed-off-by: Pavel Hrdina --- Pushed under build-breaker rule. src/util/vircgroup.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 0ed83932ac..df38bb77e0 100644 --- a/src/util/vircgroup.c

[libvirt] [PATCH 3/4] apparmor: allow expected /tmp access patterns

2018-08-13 Thread Christian Ehrhardt
Several cases were found needing /tmp, for example ceph will try to list /tmp and the samba feature of qemu will place things in /tmp/qemu-smb.*. This is sort of safe because: - While /tmp could contain anything it is not recommended to put critical data there anyway - We restrict general

[libvirt] [PATCH 0/4] Extend apparmor rules for libvirt 4.6

2018-08-13 Thread Christian Ehrhardt
Hi, this is a summary of things I had to touch recently when working on 4.6. The first two patches are re-submissions and modifications of last year which were never totally challenged, but also not pushed yet (I had no permissions yet back then). The first was lost in a discussion about

[libvirt] [PATCH 2/4] apparmor: add mediation rules for unconfined guests

2018-08-13 Thread Christian Ehrhardt
If a guest runs unconfined , but libvirtd is confined then the peer for signal can only be detected as 'unconfined'. That triggers issues like: apparmor="DENIED" operation="signal" profile="/usr/sbin/libvirtd" pid=22395 comm="libvirtd" requested_mask="send" denied_mask="send" signal=term

[libvirt] [PATCH 4/4] apparmor: allow to preserve /dev mountpoints into qemu namespaces

2018-08-13 Thread Christian Ehrhardt
Libvirt now tries to preserve all mounts under /dev in qemu namespaces. The old rules only listed a set of known paths but those are no more enough. I found some due to containers like /dev/.lxc/* and such but also /dev/console and /dev/net/tun. Libvirt is correct to do so, but we can no more

[libvirt] [PATCH 1/4] apparmor: allow openGraphicsFD for virt manager >1.4

2018-08-13 Thread Christian Ehrhardt
virt-manager's UI connection will need socket access for openGraphicsFD to work - otherwise users will face a failed connection error when opening the UI view. Depending on the exact versions of libvirt and qemu involved this needs either a rule from qemu to libvirt or vice versa. Signed-off-by:

Re: [libvirt] [PATCH v3 04/11] util: netlink: use VIR_AUTOPTR for aggregate types

2018-08-13 Thread Sukrit Bhatnagar
On Mon, 13 Aug 2018 at 18:10, Erik Skultety wrote: > > On Thu, Aug 09, 2018 at 09:42:12AM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOPTR macro for declaring aggregate pointer variables, > > majority of the calls to *Free functions can

Re: [libvirt] [PATCH 1/4] apparmor: allow openGraphicsFD for virt manager >1.4

2018-08-13 Thread Jamie Strandboge
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote: > virt-manager's UI connection will need socket access for > openGraphicsFD > to work - otherwise users will face a failed connection error when > opening the UI view. > > Depending on the exact versions of libvirt and qemu involved

Re: [libvirt] [PATCH 2/4] apparmor: add mediation rules for unconfined guests

2018-08-13 Thread Jamie Strandboge
On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote: > If a guest runs unconfined , but libvirtd is > confined then the peer for signal can only be detected as > 'unconfined'. That triggers issues like: >apparmor="DENIED" operation="signal" >profile="/usr/sbin/libvirtd" pid=22395

Re: [libvirt] [PATCH 4/4] apparmor: allow to preserve /dev mountpoints into qemu namespaces

2018-08-13 Thread Christian Ehrhardt
On Mon, Aug 13, 2018 at 7:11 PM Jamie Strandboge wrote: > On Mon, 2018-08-13 at 16:39 +0200, Christian Ehrhardt wrote: > > Libvirt now tries to preserve all mounts under /dev in qemu > > namespaces. > > The old rules only listed a set of known paths but those are no more > > enough. > > > > I

<    1   2