Re: [libvirt] [PATCH v1 0/4] libxl: channels support

2016-09-19 Thread Michal Privoznik
On 20.09.2016 00:04, Jim Fehlig wrote: > On 09/16/2016 05:43 PM, Joao Martins wrote: >> Hey, >> >> Channels have been on xen toolstack since Xen 4.5 and this small series >> adds support for it, including xenconfig conversion and appropriate tests. > > Cool! Thanks. > >> After this series it's

Re: [libvirt] [PATCH v1 3/4] xenconfig: channels conversion support

2016-09-19 Thread Jim Fehlig
On 09/16/2016 05:43 PM, Joao Martins wrote: > Add support for formating/parsing libxl channels. > > Syntax on xen libxl goes as following: > channel=["connection=pty|socket,path=/path/to/socket,name=XXX",...] > > Signed-off-by: Joao Martins > --- >

Re: [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Tuesday, September 20, 2016 4:36 AM > > > Hi libvirt experts, > > Thanks for valuable input on v1 version of RFC. > > Quick brief, VFIO based mediated device framework provides a way to > virtualize their devices without SR-IOV, like

Re: [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, September 20, 2016 5:36 AM > > > In the above example directory '11' represents a type id of mdev device. > > 'name', 'fb_length', 'resolution', 'heads', 'max_instance' and > > 'requires_group' would be Read-Only files

Re: [libvirt] [PATCH v1 2/4] libxl: channels support

2016-09-19 Thread Jim Fehlig
On 09/16/2016 05:43 PM, Joao Martins wrote: > And allow libxl to handle channel element which creates a Xen > console visible to the guest as a low-bandwitdh communication > channel. If type is PTY we also fetch the tty after boot using > libxl_channel_getinfo to fetch the tty path. Since support

Re: [libvirt] [PATCH v1 1/4] conf: add xen type for channels

2016-09-19 Thread Jim Fehlig
On 09/16/2016 05:43 PM, Joao Martins wrote: > So far only guestfwd and virtio were supported. Add an additional > for Xen as libxl channels create Xen console visible to the guest. > > Signed-off-by: Joao Martins > --- > docs/schemas/domaincommon.rng | 11 +++ >

Re: [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Alex Williamson
On Mon, 19 Sep 2016 23:50:56 +0200 Paolo Bonzini wrote: > On 19/09/2016 23:36, Alex Williamson wrote: > > On Tue, 20 Sep 2016 02:05:52 +0530 > > Kirti Wankhede wrote: > >> 'fb_length': > >> Read-only file. Mandatory. > >> Returns {K,M,G},

Re: [libvirt] [PATCH v1 0/4] libxl: channels support

2016-09-19 Thread Jim Fehlig
On 09/16/2016 05:43 PM, Joao Martins wrote: > Hey, > > Channels have been on xen toolstack since Xen 4.5 and this small series > adds support for it, including xenconfig conversion and appropriate tests. Cool! Thanks. > After this series it's possible to do this: > (assuming correct

Re: [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Paolo Bonzini
On 19/09/2016 23:36, Alex Williamson wrote: > On Tue, 20 Sep 2016 02:05:52 +0530 > Kirti Wankhede wrote: >> 'fb_length': >> Read-only file. Mandatory. >> Returns {K,M,G}, size of framebuffer. > > This can't be mandatory, it's only relevant to vGPU devices, vGPUs

Re: [libvirt] dnsmasq option "dhcp-authoritative" in libvirt virtual networks?

2016-09-19 Thread Laine Stump
On 09/19/2016 05:25 PM, Jim Fehlig wrote: On 09/19/2016 09:48 AM, Martin Wilck wrote: Hello, I am seeing a slightly annoying behavior of libvirt-created networks on my system. Whenever a VM fails to renew its DHCP lease in time (for example because my laptop is suspended), the IP address

Re: [libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Alex Williamson
On Tue, 20 Sep 2016 02:05:52 +0530 Kirti Wankhede wrote: > Hi libvirt experts, > > Thanks for valuable input on v1 version of RFC. > > Quick brief, VFIO based mediated device framework provides a way to > virtualize their devices without SR-IOV, like NVIDIA vGPU, Intel

[libvirt] [RFC v2] libvirt vGPU QEMU integration

2016-09-19 Thread Kirti Wankhede
Hi libvirt experts, Thanks for valuable input on v1 version of RFC. Quick brief, VFIO based mediated device framework provides a way to virtualize their devices without SR-IOV, like NVIDIA vGPU, Intel KVMGT and IBM's channel IO. This framework reuses VFIO APIs for all the functionalities for

Re: [libvirt] [PATCH v3 0/5] Add runnability info to query-cpu-definitions

2016-09-19 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [libvirt] [PATCH v3 0/5] Add runnability info to query-cpu-definitions Message-id:

Re: [libvirt] dnsmasq option "dhcp-authoritative" in libvirt virtual networks?

2016-09-19 Thread Jim Fehlig
On 09/19/2016 09:48 AM, Martin Wilck wrote: > Hello, > > I am seeing a slightly annoying behavior of libvirt-created networks on > my system. Whenever a VM fails to renew its DHCP lease in time (for > example because my laptop is suspended), the IP address changes, > causing various annoyances. If

[libvirt] [PATCH] libxl: support VIR_MIGRATE_PERSIST_DEST migration flag

2016-09-19 Thread Jim Fehlig
By default, virt-manager (and likely other libvirt-based apps) sets the VIR_MIGRATE_PERSIST_DEST flag when invoking the migrate API, which fails in a Xen setup since the libxl driver does not support the flag. Persisting a domain is a trivial task in the grand scheme of migration, so be nice to

[libvirt] [PATCH v3 5/5] target-i386: Return runnability information on query-cpu-definitions

2016-09-19 Thread Eduardo Habkost
Fill the "unavailable-features" field on the x86 implementation of query-cpu-definitions. Cc: Jiri Denemark Cc: libvir-list@redhat.com Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: * Create a x86_cpu_feature_name() function, to isolate the code

[libvirt] [PATCH v3 2/5] target-i386: Move warning code outside x86_cpu_filter_features()

2016-09-19 Thread Eduardo Habkost
x86_cpu_filter_features() will be reused by code that shouldn't print any warning. Move the warning code to a new x86_cpu_report_filtered_features() function, and call it from x86_cpu_realizefn(). Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 28

[libvirt] [PATCH v3 4/5] qmp: Add runnability information to query-cpu-definitions

2016-09-19 Thread Eduardo Habkost
Add a new optional field to query-cpu-definitions schema: "unavailable-features". It will contain a list of QOM properties that prevent the CPU model from running in the current host. Cc: David Hildenbrand Cc: Michael Mueller Cc: Christian

[libvirt] [PATCH v3 3/5] target-i386: Define CPUID filtering functions before x86_cpu_list()

2016-09-19 Thread Eduardo Habkost
Just move code to another place so the it can be reused by the query-cpu-definitions code. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 68 +++ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git

[libvirt] [PATCH v3 1/5] target-i386: List CPU models using subclass list

2016-09-19 Thread Eduardo Habkost
Instead of using the builtin_x86_defs array, use the QOM subclass list to list CPU models on "-cpu ?" and "query-cpu-definitions". Signed-off-by: Andreas Färber [ehabkost: copied code from a patch by Andreas: "target-i386: QOM'ify CPU", from March 2012] Signed-off-by: Eduardo

[libvirt] [PATCH v3 0/5] Add runnability info to query-cpu-definitions

2016-09-19 Thread Eduardo Habkost
This series extends query-cpu-definitions to include an extra field: "unavailable-features". The new field can be used to find out reasons that prevent the CPU model from running in the current host. This will return information based on the current machine and accelerator only. In the future we

Re: [libvirt] [PATCHv5 00/13] qemu: allow disabling certain virtio revisions

2016-09-19 Thread Michael S. Tsirkin
On Wed, Sep 07, 2016 at 09:38:04PM +0200, Sascha Silbe wrote: > Dear Laine, > > Laine Stump writes: > > > On 09/07/2016 02:35 PM, Sascha Silbe wrote: > >> "Daniel P. Berrange" writes: > >> [...] > >>>== QEMU virtio > >>> == QEMU virtio

Re: [libvirt] [PATCH] tests: fix use of fixedcontent variable

2016-09-19 Thread Eric Blake
On 09/19/2016 12:50 PM, Laine Stump wrote: > Commit 8563560026d192c2cf047b550ffd468692245ed6 switched from > hardcoded use of strcontent to hardcoded use of fixedcontent > (fixedcontent is *sometimes* a copy of strcontent with a \n > appended). This was a problem because sometimes fixedcontent is

[libvirt] [PATCH] tests: fix use of fixedcontent variable

2016-09-19 Thread Laine Stump
Commit 8563560026d192c2cf047b550ffd468692245ed6 switched from hardcoded use of strcontent to hardcoded use of fixedcontent (fixedcontent is *sometimes* a copy of strcontent with a \n appended). This was a problem because sometimes fixedcontent is *not* a copy of strcontent, but is instead NULL,

[libvirt] dnsmasq option "dhcp-authoritative" in libvirt virtual networks?

2016-09-19 Thread Martin Wilck
Hello, I am seeing a slightly annoying behavior of libvirt-created networks on my system. Whenever a VM fails to renew its DHCP lease in time (for example because my laptop is suspended), the IP address changes, causing various annoyances. If this happens, the log message "DHCPNAK(virbrX): ...

Re: [libvirt] [PATCH 0/2] Rawhide fix for major() in sys/types.h

2016-09-19 Thread Eric Blake
On 09/16/2016 08:41 AM, Eric Blake wrote: > Now that autoconf and gnulib have worked around the glibc 2.25 > issue, we don't need our hack any more. I'll probably push in > 24 hours under the gnulib-maintenance rule, if I don't get a > review first. Now pushed. > > Eric Blake (2): > build:

Re: [libvirt] [PATCHv5 00/13] qemu: allow disabling certain virtio revisions

2016-09-19 Thread Boris Fiuczynski
On 09/13/2016 05:16 PM, Laine Stump wrote: On 09/13/2016 10:43 AM, Cornelia Huck wrote: What would this do for devices using the virtio-ccw transport? From libvirt's point of view, the option "disable-legacy=on" would be added to the device's commandline argument. Which would break s390x

Re: [libvirt] [PATCH v7 2/5] conf: Introduce {default|chardev}_tls_x509_secret_uuid

2016-09-19 Thread Daniel P. Berrange
On Mon, Sep 19, 2016 at 10:39:21AM -0400, John Ferlan wrote: > Add a new qemu.conf variables to store the UUID for the secret that could > be used to present credentials to access the TLS chardev. Since this will > be a server level and it's possible to use some sort of default, introduce > both

Re: [libvirt] [python PATCH] override: Properly override wrapper for virDomainGetGuestVcpus

2016-09-19 Thread Erik Skultety
On 19/09/16 14:08, Peter Krempa wrote: > Without the change to libvirt-override-api.xml generator.py would > generate the following function header: > > def guestVcpus(self, params, nparams, flags=0): > > Since @params and @nparams are output-only in C and the python C > implementation

[libvirt] [PATCH v7 4/5] qemu: Add a secret object to/for a chardev tcp with secret

2016-09-19 Thread John Ferlan
Add the secret object prior to the chardev tcp so the 'passwordid=' can be added if the domain XML has a for the chardev TLS. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c| 32 ++- src/qemu/qemu_command.h|

[libvirt] [PATCH v7 3/5] qemu: Introduce qemuDomainChardevPrivatePtr

2016-09-19 Thread John Ferlan
Modeled after the qemuDomainHostdevPrivatePtr (commit id '27726d8c'), create a privateData pointer in the _virDomainChardevDef to allow storage of private data for a hypervisor in order to at least temporarily store secret data for usage during qemuBuildCommandLine. NB: Since the

[libvirt] [PATCH v7 5/5] qemu: Add the ability to hotplug a secret object for TCP chardev TLS

2016-09-19 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1300776 Complete the implementation of support for TLS encryption on chardev TCP transports by adding the hotplug ability of a secret to generate the passwordid for the TLS object Likewise, add the ability to hot unplug that secret object as well

[libvirt] [PATCH v7 2/5] conf: Introduce {default|chardev}_tls_x509_secret_uuid

2016-09-19 Thread John Ferlan
Add a new qemu.conf variables to store the UUID for the secret that could be used to present credentials to access the TLS chardev. Since this will be a server level and it's possible to use some sort of default, introduce both the default and chardev logic at the same time making the setting of

[libvirt] [PATCH v7 1/5] domain: Add optional 'tls' attribute for TCP chardev

2016-09-19 Thread John Ferlan
Add an optional "tls='yes'" option for a TCP chardev for the express purpose to enable setting up TLS for the chardev. This will assume that the qemu.conf settings have been adjusted as well as the environment configured properly. Signed-off-by: John Ferlan ---

[libvirt] [PATCH v7 0/5] Add native TLS encrypted chardev TCP support

2016-09-19 Thread John Ferlan
v6: http://www.redhat.com/archives/libvir-list/2016-September/msg00302.html Differences over v6 - rather than disable on specific chardev's, modify the code to be need to enable by setting tls='yes' for the chardev John Ferlan (5): domain: Add optional 'tls' attribute for TCP chardev conf:

Re: [libvirt] ruby-libvirt latest release doesn't work with fog-libvirt

2016-09-19 Thread Chris Lalancette
Eek. I just haven't had time to do it. I'll see if I can get a release out this week. Sorry about that. Chris Lalancette On Mon, Sep 19, 2016 at 9:30 AM, Darragh Bailey wrote: > > A number of months ago it was requested whether a new ruby-libvirt release > could be

[libvirt] [PATCH v2 36/45] cpu: Rework cpuUpdate

2016-09-19 Thread Jiri Denemark
The reworked API is now called virCPUUpdate and it should change the provided CPU definition into a one which can be consumed by the QEMU command line builder: - host-passthrough remains unchanged - host-model is turned into custom CPU with a model and features copied from host

[libvirt] [PATCH v2 10/45] testutilsqemu: Helpers for changing host CPU and arch

2016-09-19 Thread Jiri Denemark
Changing a host architecture or a CPU is not as easy as assigning a new value to the appropriate element in virCaps since there is a relation between the CPU and host architecture (we don't really want to test anything on an AArch64 host with core2duo CPU). This patch introduces

[libvirt] [PATCH v2 05/45] qemuxml2argvtest: Rename "out" labels as "cleanup"

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no changes tests/qemuxml2argvtest.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt] [PATCH v2 28/45] cpu: Drop false support for ARM cpu-model

2016-09-19 Thread Jiri Denemark
The ARM CPU driver wrongly reported host CPU model as "host", which made host-model to be just an alias for host-passthrough. Let's drop this insanity. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_arm.c | 34

[libvirt] [PATCH v2 06/45] qemuxml2argvtest: Get rid of testCompareXMLToArgvHelper

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no changes tests/qemuxml2argvtest.c | 109 --- 1 file changed, 47 insertions(+), 62 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt] [PATCH v2 15/45] qemuxml2argvtest: Reorder CPU features

2016-09-19 Thread Jiri Denemark
The x86 CPU driver translated each CPU definition from domain XML into CPUID data and then back to CPU definition. This effectively sorted the list of CPU features according to their CPUID values. Since this is going to change, we need to reorder CPU features in a few test files to make sure the

[libvirt] [PATCH v2 09/45] qemuxml2argvtest: Properly initialize qemuCaps->arch

2016-09-19 Thread Jiri Denemark
qemuCaps->arch should match the guest architecture from domain XML. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no changes src/qemu/qemu_capabilities.c | 9 + src/qemu/qemu_capspriv.h | 3 +++ tests/qemuxml2argvtest.c | 6 ++ 3 files

[libvirt] [PATCH v2 21/45] domcaps: Add CPU usable flag

2016-09-19 Thread Jiri Denemark
In case a hypervisor is able to tell us a list of supported CPU models and whether each CPU models can be used on the current host, we can propagate this to domain capabilities. This is a better alternative to calling virConnectCompareCPU for each supported CPU model. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 45/45] Move CMT feature filtering to QEMU driver

2016-09-19 Thread Jiri Denemark
It really doesn't belong to the generic CPU driver. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c| 16 ++-- src/qemu/qemu_capabilities.c | 16 +++- 2 files changed, 17 insertions(+), 15

[libvirt] [PATCH v2 34/45] cpu: Report error for unknown features in x86HasFeature

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 904b59c..d0e1a1a 100644 --- a/src/cpu/cpu_x86.c +++

[libvirt] [PATCH v2 19/45] cpu: Don't overwrite errors in cpuGetModels

2016-09-19 Thread Jiri Denemark
cpuGetSubDriver already reports a useful error. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index d2b7ce3..fae3885 100644 ---

[libvirt] [PATCH v2 31/45] qemu: Introduce virQEMUCapsIsCPUModeSupported

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - adapted to changes in previous patches - removed redundant check for qemuCaps->cpuDefinitions != NULL src/qemu/qemu_capabilities.c | 54 ++--

[libvirt] [PATCH v2 01/45] cpuGetModels: Switch to virArch

2016-09-19 Thread Jiri Denemark
Our internal APIs mostly use virArch rather than strings. Switching cpuGetModels to virArch will save us from unnecessary conversions in the future. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu.c | 17 -

[libvirt] [PATCH v2 17/45] qemu: Fill in CPU domain capabilities

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - removed superfluous check for caps != NULL src/qemu/qemu_capabilities.c | 24 +- src/qemu/qemu_capabilities.h | 3 +- src/qemu/qemu_driver.c

[libvirt] [PATCH v2 43/45] cpu: Rework cpuCompare* APIs

2016-09-19 Thread Jiri Denemark
Both cpuCompare* APIs are renamed to virCPUCompare*. And they should now work for any guest CPU definition, i.e., even for host-passthrough (trivial) and host-model CPUs. The implementation in x86 driver is enhanced to provide a hint about -noTSX Broadwell and Haswell models when appropriate.

[libvirt] [PATCH v2 13/45] qemuxml2argvtest: Properly setup CPU models in qemuCaps

2016-09-19 Thread Jiri Denemark
Adding x86 CPU models into a list of supported CPUs for non-x86 architectures is not a very good idea. Each architecture we test needs to maintain its own list of supported CPU models. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change

[libvirt] [PATCH v2 02/45] domcaps: Add support for listing supported CPU models

2016-09-19 Thread Jiri Denemark
The patch adds element to domain capabilities XML: Broadwell Broadwell-noTSX ... Applications can use it to inspect what CPU configuration modes are supported for a specific combination of domain type, emulator

[libvirt] [PATCH v2 37/45] cpu: Set nfeatures_max correctly in x86Decode

2016-09-19 Thread Jiri Denemark
Keeping nfeatures_max set to 0 while nfeatures > 0 and some features are already stored in features array is just asking for problems once we want to add a new feature into the array. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c

[libvirt] [PATCH v2 24/45] conf: Introduce virCPUDefCopyWithoutModel

2016-09-19 Thread Jiri Denemark
Useful for copying a CPU definition without model related parts (i.e., without model name, feature list, vendor). Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/conf/cpu_conf.c | 16 +++- src/conf/cpu_conf.h | 3 +++

[libvirt] [PATCH v2 42/45] cpu: Document missing parameters for cpuCompare*

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch src/cpu/cpu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 2ab61d7..ba5bf1a 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -95,13

[libvirt] [PATCH v2 26/45] conf: Introduce virCPUDefCopyModelFilter

2016-09-19 Thread Jiri Denemark
The function filters all CPU features through a given callback while copying CPU model related parts of a CPU definition. Signed-off-by: Jiri Denemark --- Notes: Version 2: - removed ATTRIBUTE_NONNULL from cpu_conf.c src/conf/cpu_conf.c | 31

[libvirt] [PATCH v2 11/45] testutilsqemu: Add default CPU for PPC64 architectures

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch (separated from patch 10/41) tests/testutilsqemu.c | 16 +++- tests/testutilsqemu.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/testutilsqemu.c

[libvirt] [PATCH v2 38/45] cpu: Introduce virCPUTranslate

2016-09-19 Thread Jiri Denemark
The API is supposed to make sure the provided CPU definition does not use a CPU model which is not supported by the hypervisor (if at all possible, of course). Signed-off-by: Jiri Denemark --- Notes: Version 2: - adapted to changes in previous patches

[libvirt] [PATCH v2 00/45] Enhance guest CPU configuration code

2016-09-19 Thread Jiri Denemark
Version 2: - review comments addressed; see individual patches for details This patch series does several things: - fixes tests to avoid relying on bugs in our code - adds support for advertising supported CPU modes and models in domain capabilities - starts adding better and higher level APIs

[libvirt] [PATCH v2 18/45] cpu: Special case models == NULL in cpuGetModels

2016-09-19 Thread Jiri Denemark
Some CPU drivers (such as arm) do not provide list of CPUs libvirt supports and just pass any CPU model from domain XML directly to QEMU. Such driver need to return models == NULL and success from cpuGetModels. Signed-off-by: Jiri Denemark --- Notes: Version 2: -

[libvirt] [PATCH v2 25/45] conf: Introduce virCPUDefStealModel

2016-09-19 Thread Jiri Denemark
The function moves CPU model related parts from one CPU definition to another. It can be used to avoid unnecessary copies from a temporary CPU definitions which will be freed anyway. Signed-off-by: Jiri Denemark --- Notes: Version 2: -

[libvirt] [PATCH v2 22/45] schema: Separate CPU related definitions into cputypes.rng

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change docs/schemas/cputypes.rng | 135 ++ docs/schemas/domaincommon.rng | 129 +--- 2 files changed, 136 insertions(+), 128

[libvirt] [PATCH v2 23/45] qemu: Propagate virCapsPtr to virQEMUCapsNewForBinaryInternal

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - adapted to changes in previous patches - fix build after rebase src/qemu/qemu_capabilities.c | 25 +++-- src/qemu/qemu_capabilities.h | 6 -- src/qemu/qemu_capspriv.h | 3 ++-

[libvirt] [PATCH v2 35/45] cpu: Add x86FeatureInData

2016-09-19 Thread Jiri Denemark
The function checks CPUID data for a given feature. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 48 +++- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git

[libvirt] [PATCH v2 03/45] qemu: Use virDomainCapsCPUModels for cpuDefinitions

2016-09-19 Thread Jiri Denemark
The list of supported CPU models in domain capabilities is stored in virDomainCapsCPUModels. Let's use the same object for storing CPU models in QEMU capabilities. Signed-off-by: Jiri Denemark --- Notes: Version 2: - removed superfluous ret < 0 - adapted to

[libvirt] [PATCH v2 07/45] qemuxml2argvtest: Reorder functions

2016-09-19 Thread Jiri Denemark
testCompareXMLToArgv will soon need to call a few function which are defined further in the code. Let's move them up a bit. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no changes tests/qemuxml2argvtest.c | 104

[libvirt] [PATCH v2 30/45] qemu: Introduce virQEMUCapsGetHostModel

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - adapted to changes in previous patches src/qemu/qemu_capabilities.c | 7 +++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 20/45] domcaps: Show only CPU models supported by libvirt

2016-09-19 Thread Jiri Denemark
Listing all CPU models supported by QEMU in domain capabilities makes little sense when libvirt will refuse any model it doesn't know about. Signed-off-by: Jiri Denemark --- Notes: Version 2: - adapted to changes in previous patches - fixed compile failure after

[libvirt] [PATCH v2 04/45] qemuxml2argvtest: Rename extraFlags as qemuCaps

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no changes tests/qemuxml2argvtest.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 0b378a7..d606caf

[libvirt] [PATCH v2 40/45] cpu: Rework virCPUDataCheckFeature

2016-09-19 Thread Jiri Denemark
To match our coding style and to provide better debug and error messages. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch (separated from 38/41) src/cpu/cpu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cpu/cpu.c

[libvirt] [PATCH v2 29/45] Show host model in domain capabilities

2016-09-19 Thread Jiri Denemark
The domain capabilities XML is capable of showing whether each guest CPU mode is supported or not with a possibility to provide additional details. This patch enhances host-model capability to advertise the exact CPU model which will be used as a host-model: ...

[libvirt] [PATCH v2 39/45] cpu: Rename cpuHasFeature to virCPUDataCheckFeature

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch (separated from 38/41) src/cpu/cpu.c | 10 +- src/cpu/cpu.h | 10 +- src/cpu/cpu_arm.c | 1 - src/cpu/cpu_ppc64.c | 1 -

[libvirt] [PATCH v2 08/45] qemuxml2argvtest: Update qemuCaps after parsing domain XML

2016-09-19 Thread Jiri Denemark
Some parts of qemuCaps depend on guest architecture, machine type, and possibly other things that we know only once the domain XML has been parsed. Let's move all these updates into a dedicated function. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no

[libvirt] [PATCH v2 14/45] qemuxml2argvtest: Set correct architecture for KVM guests

2016-09-19 Thread Jiri Denemark
Testing PPC64/AArch64 KVM domains on x86_64 host only works because we have a lot of bugs in our code. Since this series is going to fix them, we need to make sure the host architecture matches guest for KVM domains. Signed-off-by: Jiri Denemark --- Notes: Version 2:

[libvirt] [PATCH v2 41/45] cpu: Introduce virCPUCheckFeature

2016-09-19 Thread Jiri Denemark
The function is similar to virCPUDataCheckFeature, but it works directly on CPU definition rather than requiring it to be transformed into CPU data first. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch (separated from 38/41) src/cpu/cpu.c

[libvirt] [PATCH v2 27/45] qemu: Store host-model CPU in qemu capabilities

2016-09-19 Thread Jiri Denemark
Host capabilities provide libvirt's view of the host CPU, but for a useful support for host-model CPUs we really need a hypervisor's view of the CPU. And since the view can be differ with emulator, qemu capabilities is the best place to store the host CPU model. This patch just copies the CPU

[libvirt] [PATCH v2 33/45] cpu: Make x86ModelFromCPU a bit smarter

2016-09-19 Thread Jiri Denemark
x86ModelFromCPU is used to provide CPUID data for features matching @policy. This patch allows callers to set @policy to -1 to get combined CPUID for all CPU features (including those implicitly provided a CPU model) specified in CPU def. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH v2 44/45] qemu: Update guest CPU def in live XML

2016-09-19 Thread Jiri Denemark
Storing the updated CPU definition in the live domain definition saves us from having to update it over and over when we need it. Not to mention that we will soon further update the CPU definition according to QEMU once it's started. A highly wanted side effect of this patch, libvirt will pass

[libvirt] [PATCH v2 16/45] qemu: Introduce virQEMUCapsGuestIsNative

2016-09-19 Thread Jiri Denemark
To have a single place where we decide whether a guest can run natively on a host. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 43 +++ 1 file changed, 27 insertions(+), 16

[libvirt] [PATCH v2 12/45] qemu: Separate guest CPU validation from command line creation

2016-09-19 Thread Jiri Denemark
qemu_command.c should deal with translating our domain definition into a QEMU command line and nothing else. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_command.c | 71 src/qemu/qemu_process.c |

[libvirt] [PATCH v2 32/45] cpu: Make x86ModelFromCPU easier to read

2016-09-19 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index ee5b57d..cf8f17d 100644 --- a/src/cpu/cpu_x86.c

[libvirt] ruby-libvirt latest release doesn't work with fog-libvirt

2016-09-19 Thread Darragh Bailey
A number of months ago it was requested whether a new ruby-libvirt release could be made to include some new functionality that fog-libvirt wished to make use of, see https://www.redhat.com/archives/libvir-list/2016-March/msg00241.html. Any update on this? Currently any attempt to use

[libvirt] [PATCH v4 1/8] vsh: Enforce checking for missing help string

2016-09-19 Thread Erik Skultety
The intention is to move vshCmddefCheckInternals out of vshCmddefOptParse to our test suite. First step to do that is to enforce checking for an existing help string (that also means it's non-empty) in a command because a command without a help is not much of a use. Signed-off-by: Erik Skultety

[libvirt] [python PATCH] override: Properly override wrapper for virDomainGetGuestVcpus

2016-09-19 Thread Peter Krempa
Without the change to libvirt-override-api.xml generator.py would generate the following function header: def guestVcpus(self, params, nparams, flags=0): Since @params and @nparams are output-only in C and the python C implementation actualy creates a dict from them we should not need to

[libvirt] [PATCH v2 3/3] qemu_driver: pass path of compress prog directly to doCoreDump

2016-09-19 Thread Chen Hanxiao
From: Chen Hanxiao This patch delete getCompressionType and qemuCompressProgramName. Use virReportError instead of VIR_WARN, but don't fail and then continue as it used acting. Then pass the path of compress prog to doCoreDump. If config of compression is not available,

[libvirt] [PATCH v2 1/3] qemu_driver: pass path of compress prog directly

2016-09-19 Thread Chen Hanxiao
From: Chen Hanxiao We check compress prog in qemuCompressProgramAvailable, then test it again in virExec again. This path will pass compress prog's path to virExec, avoiding one extra virFindFileInPath call in during virExec. Signed-off-by: Chen Hanxiao

[libvirt] [PATCH v2 2/3] qemu_driver: simplify compress prog check by macros

2016-09-19 Thread Chen Hanxiao
From: Chen Hanxiao We use almost the same codes in checking compress progame for saveImageFormat and snapshotImageFormat. This patch introduce VIR_QEMU_COMPRESS_CHECK to simplify that checking. Signed-off-by: Chen Hanxiao ---

[libvirt] [PATCH v2 0/3] pass the path of compress prog directly

2016-09-19 Thread Chen Hanxiao
From: Chen Hanxiao This series will pass the path of compress programe directly to functions such as doCoreDump, qemuDomainSaveInternal, etc. this can avoid one extra virFindFileInPath call in during virExec. Also reduce code duplication by macros. Chen Hanxiao (3):

Re: [libvirt] [PATCH v2] qemuBuildMemoryBackendStr: Don't crash if no hugetlbfs is mounted

2016-09-19 Thread Peter Krempa
On Mon, Sep 19, 2016 at 11:03:30 +0200, Michal Privoznik wrote: > When trying to migrate a huge page enabled guest, I've noticed > the following crash. Apparently, if no specific hugepages are > requested: > > > > [...] > --- > > diff to v1: > > - added a comment to

Re: [libvirt] [PATCH] qemu_agent|monitor: use different log on hangup event

2016-09-19 Thread Michal Privoznik
On 19.09.2016 08:24, Chen Hanxiao wrote: > From: Chen Hanxiao > > Both qemu monitor and agent print the same > log on HUANGUP event, which woud be confused > when reading libvirtd log. > > This patch will give a different log for them. > > Signed-off-by: Chen Hanxiao

Re: [libvirt] [PATCH 0/5] enforce and simplify qga interactions

2016-09-19 Thread Michal Privoznik
On 16.09.2016 12:35, Nikolay Shirokovskiy wrote: > First 2 patches fix bugs of libvirt - qga communication. > They deal with the channel pecularities described in > http://wiki.qemu.org/Features/QAPI/GuestAgent. First > patch address https://bugzilla.redhat.com/show_bug.cgi?id=1090551 > bug. > >

Re: [libvirt] [PATCH] docs: expand docs on user x509 cert locations

2016-09-19 Thread Michal Privoznik
On 15.09.2016 15:49, Daniel P. Berrange wrote: > The layout in $HOME/.pki is different from that in /etc/pki > but we never tell anyone about this trap. Add docs showing > the required $HOME/.pki layout. > --- > docs/remote.html.in | 41 ++--- > 1 file changed,

[libvirt] [PATCH v2] qemuBuildMemoryBackendStr: Don't crash if no hugetlbfs is mounted

2016-09-19 Thread Michal Privoznik
When trying to migrate a huge page enabled guest, I've noticed the following crash. Apparently, if no specific hugepages are requested: and there are no hugepages configured on the destination, we try to dereference a NULL pointer. Program received signal SIGSEGV, Segmentation fault.

Re: [libvirt] [PATCH v3 1/8] vsh: Fix NULL dereference leading to SIGSEGV if a command is missing '.info'

2016-09-19 Thread Erik Skultety
On 16/09/16 14:19, Ján Tomko wrote: > On Fri, Sep 16, 2016 at 12:50:38PM +0200, Erik Skultety wrote: >> Signed-off-by: Erik Skultety >> --- >> tools/vsh.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> > > Is there a use-case for a command without info? > > I

[libvirt] [PATCH] qemu_process: show shutoff reasons when debug log disabled

2016-09-19 Thread Chen Hanxiao
From: Chen Hanxiao We have a few of senarios that libvirtd would invoke qemuProcessStop and leave a "shutting down" in /var/log/libvirt/qemu/$DOMAIN.log. The shutoff reason showing in debug log is also very important for us to know why VM shutting down in domain log, as

Re: [libvirt] [PATCH RFC] virhook: Adding inotify support to virhook.

2016-09-19 Thread Michal Privoznik
On 13.09.2016 02:21, Julio Faracco wrote: > Libvirtd only support hooks when the daemon is started. Hooks cannot be > loaded when the daemon is already running. So, to load a hook you need to > restart the service everytime. Now, the inotify support enables the option > of create a hook and run it

Re: [libvirt] [PATCH RFC] virhook: Adding inotify support to virhook.

2016-09-19 Thread Michal Privoznik
On 13.09.2016 02:25, Julio Faracco wrote: > Hi guys, > > As I mentioned, we are working in a project that introduces a hook for QEMU. > And when someone installs the RPM/DEB package with this hook, > we need to restart the libvirtd service everytime. It is really > annoying for users. Well, RPM

Re: [libvirt] [PATCH 00/20] 20 crazy IVSHMEM patches you won't believe compile

2016-09-19 Thread Martin Kletzander
On Fri, Sep 16, 2016 at 04:20:55PM +0200, Peter Krempa wrote: On Fri, Sep 16, 2016 at 15:17:34 +0200, Martin Kletzander wrote: On Fri, Sep 16, 2016 at 02:22:19PM +0200, Peter Krempa wrote: >On Thu, Sep 15, 2016 at 18:14:25 +0200, Martin Kletzander wrote: >> Let's see if the subject works if one

Re: [libvirt] [PATCH] qemu-migration: Disallow migration of read only disk

2016-09-19 Thread Daniel P. Berrange
On Fri, Sep 16, 2016 at 04:03:55PM -0400, Jason J. Herne wrote: > On 09/14/2016 10:40 AM, Daniel P. Berrange wrote: > > On Wed, Sep 14, 2016 at 10:37:07AM -0400, Corey S. McQuay wrote: > > > Currently Libvirt allows attempts to migrate read only disks. Qemu cannot > > > handle this as read only >

  1   2   >