Re: [libvirt] [PATCH 2/2] Add support for preallocated memory - xml2argv

2016-06-23 Thread Safka, JaroslavX
If source is file then -object memory-backend-file,id=mem,size=1024M,mem-path=/var/lib/libvirt/qemu -numa node,memdev=mem should be added to the qemu commandline If allocation is immediate then -mem-prealloc should be added to the qemu commanline. If access is shared then the share=on paramete

Re: [libvirt] [PATCH 2/2] Add support for preallocated memory - xml2argv

2016-06-23 Thread Martin Kletzander
On Thu, Jun 23, 2016 at 01:25:29PM +0100, Jaroslav Safka wrote: Add conversion from xml to argv for subelements source,access and allocation of This change introduces support for preallocated shared file descriptor based memory backing. It allows vhost-user to be used without hugepages. How

[libvirt] [PATCH 2/2] tests: utils: Fail XML file comparison if input file doesn't exist

2016-06-23 Thread Peter Krempa
In cases where we expect parse failure of the test input file the testsuite can't differentiate if the parser failed when parsing or when opening the file. Add a call to virFileExists and error out on missing input files. Missing output files are partially expected when regenerating test output. -

[libvirt] [PATCH 1/2] tests: genericxml2xml: Fix test file name

2016-06-23 Thread Peter Krempa
Commit b1fc6a7b added a test file but used a different name in the actual test. --- tests/genericxml2xmltest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c index 1a7a668..a487727 100644 --- a/tests/genericxml2xmltest.c

[libvirt] [PATCH 0/2] Fix genericxml2xml test and avoid further mistakes

2016-06-23 Thread Peter Krempa
Peter Krempa (2): tests: genericxml2xml: Fix test file name tests: utils: Fail XML file comparison if input file doesn't exist tests/genericxml2xmltest.c | 2 +- tests/testutils.c | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) -- 2.8.3 -- libvir-list mailing list libvi

Re: [libvirt] [PATCH] qemu: match controller index for LIVE+CONFIG when doing hotplug

2016-06-23 Thread Cole Robinson
On 06/23/2016 08:26 AM, Ján Tomko wrote: > > Also, calling virDomainDefPostParse after device coldplug is strange, > we should be adding a device that does not need ajdustments. > I just want to note that in general I don't agree with this (I'd need to look at the actual code though). IMO coldpl

Re: [libvirt] [PATCH] storage: Remove redundant refreshPool check

2016-06-23 Thread John Ferlan
On 06/23/2016 09:03 AM, Cole Robinson wrote: > On 06/23/2016 03:32 AM, Martin Kletzander wrote: >> On Wed, Jun 22, 2016 at 08:29:35PM -0400, Cole Robinson wrote: >>> Every driver provides a refreshPool impl, and many other critical >>> places in the code unconditionally call it without checking i

Re: [libvirt] [PATCH 1/2] devices: filesystems: added volume type

2016-06-23 Thread Olga Krishtal
On 23/06/16 15:31, Ján Tomko wrote: On Fri, Apr 08, 2016 at 07:39:23PM +0300, Olga Krishtal wrote: New type of is introduced. This patch allows to use volumes for storing the filesystem, that is accessed from the guest e.g. root directory for container. To take advantage of volumes as a backe

Re: [libvirt] [PATCH 2/2] vz: support filesystem type volume

2016-06-23 Thread Maxim Nestratov
08.04.2016 19:39, Olga Krishtal пишет: Vz containers are able to use ploop volumes from storage pools to work upon. To use filesystem type volume, pool name and volume name should be specifaed in typo: specified Signed-off-by: Olga Krishtal --- src/storage/storage_driver.c | 3 + sr

Re: [libvirt] [PATCH 14/19] conf: Add new secret type "key"

2016-06-23 Thread John Ferlan
On 06/21/2016 08:08 AM, Peter Krempa wrote: > On Mon, Jun 13, 2016 at 20:27:53 -0400, John Ferlan wrote: >> Add a new secret type known as "key" - it will handle adding the secret >> objects that need a key (or passphrase), such as will soon be the case > > This may be misleading a "key" is not

Re: [libvirt] [PATCH] storage: Remove redundant refreshPool check

2016-06-23 Thread Cole Robinson
On 06/23/2016 03:32 AM, Martin Kletzander wrote: > On Wed, Jun 22, 2016 at 08:29:35PM -0400, Cole Robinson wrote: >> Every driver provides a refreshPool impl, and many other critical >> places in the code unconditionally call it without checking if >> it exists, so this check is pointless > > I'm

Re: [libvirt] [libvirt-test-API] Plans for code update

2016-06-23 Thread Martin Kletzander
On Thu, Jun 23, 2016 at 02:17:22AM -0400, Ruifeng Bian wrote: I am not sure how many of you keep an eye on this project. From what I know, not many. I believe it is used in some CI _somewhere_... by _someone_. The project is for testing libvirt-python APIs, but many test cases are not fully

Re: [libvirt] [PATCH 00/18] Allow domains to start with a dot

2016-06-23 Thread John Ferlan
On 06/21/2016 12:05 PM, Ján Tomko wrote: > Also introduce virDirOpen* and VIR_DIR_CLOSE helpers. > > https://bugzilla.redhat.com/show_bug.cgi?id=1333248 > > Ján Tomko (18): > Do not save errno in virUSBDeviceSearch > Fix error detection in virStorageBackendISCSIGetHostNumber > Do not chec

Re: [libvirt] [PATCH 10/18] Use virDirOpenQuiet

2016-06-23 Thread John Ferlan
On 06/21/2016 12:05 PM, Ján Tomko wrote: > Remove all the remaining usage of opendir. > --- > src/openvz/openvz_conf.c | 3 +-- > src/qemu/qemu_hostdev.c | 2 +- > src/storage/storage_backend.c | 2 +- > src/util/vircgroup.c | 3 +-- > src/util/virhostcpu.c | 2 +- >

Re: [libvirt] [PATCH 07/18] Add virDirOpenIfExists

2016-06-23 Thread John Ferlan
On 06/21/2016 12:05 PM, Ján Tomko wrote: > Just like virDirOpen, but it returns 0 without reporting an error > on ENOENT. > --- > src/libvirt_private.syms | 1 + > src/util/virfile.c | 21 +++-- > src/util/virfile.h | 2 ++ > 3 files changed, 22 insertions(+), 2 del

Re: [libvirt] [PATCH 1/2] devices: filesystems: added volume type

2016-06-23 Thread Ján Tomko
On Fri, Apr 08, 2016 at 07:39:23PM +0300, Olga Krishtal wrote: New type of is introduced. This patch allows to use volumes for storing the filesystem, that is accessed from the guest e.g. root directory for container. To take advantage of volumes as a backend of filesystem volume and pool name

[libvirt] [PATCH 1/2] Add support for preallocated memory - parse xml

2016-06-23 Thread Jaroslav Safka
Add three new elements in memoryBacking and enable their parsing. (without converting to argv yet) --- docs/schemas/domaincommon.rng | 45 + src/conf/domain_conf.c | 59 +- src/conf/domain_conf.h

Re: [libvirt] [PATCH] qemu: match controller index for LIVE+CONFIG when doing hotplug

2016-06-23 Thread Ján Tomko
On Wed, Jun 22, 2016 at 03:00:47PM -0400, Laine Stump wrote: An attempt to attach a new scsi controller with both --live and --config but without specifying an index, e.g.: led to this error: internal error: Cannot parse controller index -1 This was because unspecified indexes are auto-ass

[libvirt] [PATCH 0/2] Add support for preallocated memory

2016-06-23 Thread Jaroslav Safka
This change introduces support for preallocated shared file descriptor based memory backing. It allows vhost-user to be used without hugepages. This is achieved by introducing 3 new sub elements to the memoryBacking element: source, access & allocation which will configure qemu commandline durin

Re: [libvirt] [PATCH 02/18] Fix error detection in virStorageBackendISCSIGetHostNumber

2016-06-23 Thread John Ferlan
On 06/21/2016 12:05 PM, Ján Tomko wrote: > In the unlikely case the iSCSI session path exists, but does not > contain an entry starting with "target", we would silently use > an initialized value. > > Rewrite the function to correctly report errors. > --- > src/storage/storage_backend_iscsi.c |

[libvirt] [PATCH 2/2] Add support for preallocated memory - xml2argv

2016-06-23 Thread Jaroslav Safka
Add conversion from xml to argv for subelements source,access and allocation of This change introduces support for preallocated shared file descriptor based memory backing. It allows vhost-user to be used without hugepages. Configured by these elements: --- src/qemu

Re: [libvirt] [PATCH 06/18] Use virDirOpen

2016-06-23 Thread John Ferlan
On 06/21/2016 12:05 PM, Ján Tomko wrote: > Switch from opendir to virDirOpen everywhere we need to report an error. > --- > src/storage/storage_backend_fs.c| 6 +- > src/storage/storage_backend_iscsi.c | 7 +-- > src/storage/storage_backend_scsi.c | 19 +++ > src/u

[libvirt] [PATCH 1/3] Introduce device

2016-06-23 Thread Ján Tomko
A device with an attribude 'model'. intel-iommu is accepted so far: ... https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- docs/schemas/domaincommon.rng | 11 +++ src/conf/domain_conf.c | 37 ++ src/conf/domain

[libvirt] [PATCH 2/3] Add QEMU_CAPS_DEVICE_INTEL_IOMMU

2016-06-23 Thread Ján Tomko
Check whether QEMU supports -device intel-iommu https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 + tests/qemucapabilitiesda

[libvirt] [PATCH 3/3] qemu: format intel-iommu on the command line

2016-06-23 Thread Ján Tomko
results in: -device intel-iommu https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- src/qemu/qemu_command.c| 30 ++ .../qemuxml2argvdata/qemuxml2argv-intel-iommu.args | 22 tests/qemuxml2argvtest.c

[libvirt] [PATCH 0/3] qemu: add support for intel-iommu

2016-06-23 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1235581 Note that while support for -device intel-iommu has been merged in QEMU for a while, that option is currently broken. A fix is on the way: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg03548.html Ján Tomko (3): Introduce device A

Re: [libvirt] [PATCH 1/1] cpu_map.xml: add cmt/mbm feature to x86

2016-06-23 Thread Daniel P. Berrange
On Fri, Jun 17, 2016 at 11:17:47AM +0200, Jiri Denemark wrote: > On Fri, Jun 17, 2016 at 09:25:14 +0200, Jiri Denemark wrote: > > On Fri, Jun 17, 2016 at 09:23:56 +0800, Qiaowei Ren wrote: > > > Some Intel processor families (e.g. the Intel Xeon processor E5 v3 > > > family) introduced some PQos (P

Re: [libvirt] [PATCH 1/2] tests: mock gnutls_dh_params_generate2

2016-06-23 Thread Daniel P. Berrange
On Fri, Jun 17, 2016 at 01:16:35PM +0200, Peter Krempa wrote: > On Thu, Jun 16, 2016 at 10:46:42 +0200, Ján Tomko wrote: > > This function generates some big random numbers. > > Skip it in tests to save time. > > --- > > tests/virnettlscontexttest.c | 2 +- > > tests/virnettlssessiontest.c | 2 +

[libvirt] [PATCH] vz: fixup: do not touch domain cache on error path on migration finish step

2016-06-23 Thread Nikolay Shirokovskiy
We can not and should not sync domain cache on error path in finish step of migration. We can not as we really don't know what is the reason of cancelling and we should not as user should not make assumptions on state on error path. What we should do is cleaning up temporary migration state that i

Re: [libvirt] [libvirt-python][PATCH] Add support for virDomainGetGuestVcpus

2016-06-23 Thread Michal Privoznik
On 23.06.2016 09:11, Pavel Hrdina wrote: > On Thu, Jun 23, 2016 at 06:57:11AM +0200, Michal Privoznik wrote: >> This function has virTypedParameterPtr as one of the args and our >> generator is unable to deal with that. Therefore we must provide >> implementation. >> >> Signed-off-by: Michal Privoz

Re: [libvirt] [PATCH] qemu: Permit PCI-free aarch64 mach-virt guests

2016-06-23 Thread Andrea Bolognani
On Fri, 2016-06-17 at 18:38 +0200, Andrea Bolognani wrote: > On Fri, 2016-06-17 at 12:01 -0400, Laine Stump wrote: > > On 06/17/2016 11:46 AM, Martin Kletzander wrote: > > > On Fri, Jun 17, 2016 at 11:36:05AM -0400, Laine Stump wrote: > > > > On 06/17/2016 08:43 AM, Andrea Bolognani wrote: > > > >

[libvirt] [PATCH 0/4] Add architecture checks to qemuDomainMachineIs*()

2016-06-23 Thread Andrea Bolognani
The pseries machine type is only available on ppc64/ppc64le, and in the same way the virt machine type is only available on armv7l/aarch64. Until either machine type is introduced on another architecture, we can perform the architecture checks in a single location instead of repeating them all ove

[libvirt] [PATCH 4/4] qemu: Use stricter checks in virQEMUCapsFillDomainDeviceDiskCaps()

2016-06-23 Thread Andrea Bolognani
Unfortunately, we can't just call qemuDomainMachineIsPSeries() here, because we don't have a virDomainDef instance; that said, the open-coded check should match said function as closely as possible. --- src/qemu/qemu_capabilities.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH 3/4] qemu: Introduce qemuDomainMachineIsPSeries()

2016-06-23 Thread Andrea Bolognani
This new function checks for both the architecture and the machine type, so we can use it instead of writing the same checks over and over again. --- src/qemu/qemu_command.c| 13 + src/qemu/qemu_domain.c | 19 --- src/qemu/qemu_domain.h | 1 + s

[libvirt] [PATCH 1/4] qemu: Remove redundant arguments to qemuBuildSerialChrDeviceStr()

2016-06-23 Thread Andrea Bolognani
Since we're already passing the full virDomainDef, it doesn't make sense to also pass def->os.arch and def->os.machine as separate arguments. --- src/qemu/qemu_command.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c

[libvirt] [PATCH 2/4] qemu: Add architecture checks to qemuDomainMachineIsVirt()

2016-06-23 Thread Andrea Bolognani
Remove all external architecture checks that have been made redundant by this change. --- src/qemu/qemu_capabilities.c | 12 +--- src/qemu/qemu_command.c | 4 +--- src/qemu/qemu_domain.c | 12 +--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/qem

[libvirt] [PATCHv3 10/10] Auto-add one hub if there are too many USB devices

2016-06-23 Thread Ján Tomko
When parsing a command line with USB devices that have no address specified, QEMU automatically adds a USB hub if the device would fill up all the available USB ports. To help most of the users, add one hub if there are more USB devices than available ports. For wilder configurations, expect the u

[libvirt] [PATCHv3 09/10] Assign addresses on USB device hotplug

2016-06-23 Thread Ján Tomko
USB disks, redirected devices, host devices and serial devices are supported. --- src/conf/domain_addr.c | 29 ++ src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_do

[libvirt] [PATCHv3 03/10] Introduce virDomainUSBDeviceDefForeach

2016-06-23 Thread Ján Tomko
A helper that will execute a callback on every USB device in the domain definition. With an ability to skip USB hubs, since we will want to treat them differently in some cases. --- src/conf/domain_conf.c | 89 src/conf/domain_conf.h | 7

[libvirt] [PATCHv3 08/10] Assign addresses to USB devices

2016-06-23 Thread Ján Tomko
Automatically assign addresses to USB devices. Just like reserving, this is only done for newly defined domains. https://bugzilla.redhat.com/show_bug.cgi?id=1215968 --- src/conf/domain_addr.c | 98 +- src/conf/domain_addr.h

[libvirt] [PATCHv3 02/10] Store USB port path as an array of integers

2016-06-23 Thread Ján Tomko
In preparation to tracking which USB addresses are occupied. Introduce two helper functions for printing the port path as a string and appending it to a virBuffer. --- src/conf/device_conf.h | 2 +- src/conf/domain_addr.c | 26 ++ src/conf/domain_addr.h | 8

[libvirt] [PATCHv3 04/10] Introduce virDomainUSBAddressSet

2016-06-23 Thread Ján Tomko
A new type to track USB addresses. Every is represented by as a virDomainUSBAddressHub at buses[i]. Each of these hubs has up to 'nports' ports. If a port is occupied, it has the corresponding bit set in the 'ports' bitmap, e.g. port 1 would have the 0th bit set. If there is a hub on this port,

[libvirt] [PATCHv3 01/10] Add USB addresses to qemuhotplug test cases

2016-06-23 Thread Ján Tomko
This test assumes the XML will be the same after formatting. Add USB addresses to it to keep it working when we autoassign them. --- .../qemuhotplug-console-compat-2-live+console-virtio.xml | 1 + tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml | 1 + tests/qemux

[libvirt] [PATCHv3 07/10] Reserve existing USB addresses

2016-06-23 Thread Ján Tomko
Check if they fit on the USB controllers the domain has, and error out if two devices try to use the same address. --- src/conf/domain_addr.c | 39 ++ src/conf/domain_addr.h | 4 +++ src/libvirt_private.syms

[libvirt] [PATCHv3 06/10] Add functions for adding USB hubs to addrs

2016-06-23 Thread Ján Tomko
Walk through all the usb hubs in the domain definition that have a USB address specified, create the corresponding structures in the virDomainUSBAddressSet and mark the port it occupies as used. --- src/conf/domain_addr.c | 114 + 1 file changed, 114

[libvirt] [PATCHv3 05/10] Add functions for adding USB controllers to addrs

2016-06-23 Thread Ján Tomko
Walk through all the usb controllers in the domain definition and create the corresponding structures in the virDomainUSBAddressSet. --- src/conf/domain_addr.c | 121 +++ src/conf/domain_addr.h | 4 ++ src/libvirt_private.syms | 1 + 3 files chan

[libvirt] [PATCHv3 00/10] Assign addresses to USB devices

2016-06-23 Thread Ján Tomko
v3: * drop change of commandline order of ccid controllers and USB hubs (that could possibly break compatibility) * assign addresses to redirdevs too * take custom port= setting of xhci controllers into account * hubs without addresses get one assigned only after we took a look on all

Re: [libvirt] [PATCHv2 0/2] Rewrite prohibit-duplicate-header in perl

2016-06-23 Thread Martin Kletzander
On Thu, Jun 23, 2016 at 06:23:35AM +0200, Ján Tomko wrote: v2: * use minuses instead of underscores in make target * actually call it during syntax-check * output file name and line for ViM integration I think there's still some error because it works in Emacs as well. But that can be resolve

Re: [libvirt] [PATCH] storage: Remove redundant refreshPool check

2016-06-23 Thread Martin Kletzander
On Wed, Jun 22, 2016 at 08:29:35PM -0400, Cole Robinson wrote: Every driver provides a refreshPool impl, and many other critical places in the code unconditionally call it without checking if it exists, so this check is pointless I'm not entirely sure about it, but it'd be nicer if we actually

Re: [libvirt] [PATCH RESEND 0/2] qemu: reject invalid video accel* settings

2016-06-23 Thread Martin Kletzander
On Wed, Jun 22, 2016 at 03:53:48PM -0400, Cole Robinson wrote: This series adds a couple checks for invalid video accel* settings, incase users screw up their XML when trying to enable spice GL No change since last posting, just rebased to master Cole Robinson (2): qemu: command: Error on acce

Re: [libvirt] [PATCH] Do not ignore perl scripts in build-aux

2016-06-23 Thread Andrea Bolognani
On Thu, 2016-06-23 at 06:19 +0200, Ján Tomko wrote: > Also remove the duplicate build-aux entry from .gitignore. > --- >  .gitignore | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/.gitignore b/.gitignore > index 8ce7e18..fba1464 100644 > --- a/.gitignore > +++ b/.gitignor

Re: [libvirt] [libvirt-python][PATCH] Add support for virDomainGetGuestVcpus

2016-06-23 Thread Pavel Hrdina
On Thu, Jun 23, 2016 at 06:57:11AM +0200, Michal Privoznik wrote: > This function has virTypedParameterPtr as one of the args and our > generator is unable to deal with that. Therefore we must provide > implementation. > > Signed-off-by: Michal Privoznik > --- [...] > +static PyObject * > +libv

Re: [libvirt] [Qemu-devel] [PATCH v2 4/6] qmp: Add runnability information to query-cpu-definitions

2016-06-23 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Jun 22, 2016 at 11:00:47AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > Extend query-cpu-definitions schema to allow it to return two new >> > optional fields: "runnable" and "unavailable-features". >> > "runnable" will tell if the CPU mod

Re: [libvirt] [PATCH] Allow virDomain(SG)etGuestVcpus on read-write connection only

2016-06-23 Thread Pavel Hrdina
On Thu, Jun 23, 2016 at 09:05:02AM +0200, Peter Krempa wrote: > Guest agent interaction is considered privileged. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1349272 > --- ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] Allow virDomain(SG)etGuestVcpus on read-write connection only

2016-06-23 Thread Peter Krempa
Guest agent interaction is considered privileged. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1349272 --- src/libvirt-domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 508520e..2ca054a 100644 --- a/src/libvirt-domain.c +++

<    1   2