[libvirt] [PATCH] news: add entries for libxl driver improvements and bug fixes

2017-02-15 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- Since news changes are not candidates for backport I assume it is fine to include recent libxl improvements and bug fixes in a single commit. I can break this up if that assumption is wrong. docs/news.xml | 29 + 1

Re: [libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Jim Fehlig
On 02/15/2017 06:35 PM, Chris Lalancette wrote: On Wed, Feb 15, 2017 at 8:24 PM, Jim Fehlig > wrote: Heh, as a native speaker I'm not sure which spelling is correct, but seem to recall a prior discussion on the list proclaiming 'tunneled'. If

[libvirt] [PATCH] Revert "news: fix spelling of tunneled"

2017-02-15 Thread Jim Fehlig
Use of 'tunnelled' is over 100x that of 'tunneled' throughout the code. Also, the commit providing this news item used 'tunnelled'. This reverts commit b5ac475f506cd13adab773cebd125a45d3f2ba8d. Signed-off-by: Jim Fehlig --- Heh, so much for the trivial rule. I'll wait for an

Re: [libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Chris Lalancette
On Wed, Feb 15, 2017 at 8:24 PM, Jim Fehlig wrote: > > Heh, as a native speaker I'm not sure which spelling is correct, but seem > to recall a prior discussion on the list proclaiming 'tunneled'. If folks > prefer I can revert the s/tunnelled/tunneled/ commit. > > I think you

Re: [libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Jim Fehlig
On 02/15/2017 05:06 PM, Joao Martins wrote: On 02/15/2017 11:41 PM, Jim Fehlig wrote: Joao Martins wrote: Signed-off-by: Joao Martins --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index

Re: [libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Joao Martins
On 02/15/2017 11:41 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Signed-off-by: Joao Martins >> --- >> docs/news.xml | 10 ++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/docs/news.xml b/docs/news.xml >> index b756a97..b0629b5 100644 >> ---

Re: [libvirt] [PATCH v3 0/2] libxl: tunnelled migration support

2017-02-15 Thread Jim Fehlig
Joao Martins wrote: > On 02/15/2017 10:14 PM, Joao Martins wrote: >> On 02/15/2017 09:53 PM, Jim Fehlig wrote: >>> Joao Martins wrote: Hey! Presented herewith is take 4 from tunnelled migration addressing all previous comments. No functional changes from v2, only revert

Re: [libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Jim Fehlig
Joao Martins wrote: > Signed-off-by: Joao Martins > --- > docs/news.xml | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/news.xml b/docs/news.xml > index b756a97..b0629b5 100644 > --- a/docs/news.xml > +++ b/docs/news.xml > @@ -53,6 +53,16 @@

Re: [libvirt] [PATCH] libxl: fix potential double free in libxlDriverGetDom0MaxmemConf

2017-02-15 Thread John Ferlan
On 02/15/2017 12:49 PM, Jim Fehlig wrote: > Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf > but introduced a potential double free of mem_tokens > > *** Error in `/usr/sbin/libvirtd': double free or corruption (out): > 0x7fffc808cfd0 *** > > Avoid double free by

[libvirt] [PATCH] news: fix spelling of tunneled

2017-02-15 Thread Jim Fehlig
s/tunnelled/tunneled/ in news for the libxl tunneled migration feature. Signed-off-by: Jim Fehlig --- Pushed under trivial rule. docs/news.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/news.xml b/docs/news.xml index b0629b523..5bca75ea1

Re: [libvirt] [PATCH v3 0/2] libxl: tunnelled migration support

2017-02-15 Thread Joao Martins
On 02/15/2017 10:14 PM, Joao Martins wrote: > On 02/15/2017 09:53 PM, Jim Fehlig wrote: >> Joao Martins wrote: >>> Hey! >>> >>> Presented herewith is take 4 from tunnelled migration addressing all >>> previous >>> comments. No functional changes from v2, only revert to v1 on the top level >>>

[libvirt] [PATCH] news: document libxl tunnelled migration support

2017-02-15 Thread Joao Martins
Signed-off-by: Joao Martins --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b756a97..b0629b5 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -53,6 +53,16 @@ was virtio-net.

Re: [libvirt] [RFC PATCH v2 00/18] Introduce vGPU mdev framework to libvirt

2017-02-15 Thread Alex Williamson
Hi Erik, On Wed, 15 Feb 2017 22:32:17 +0100 Erik Skultety wrote: > since v1: > - new attribute model introduced which tells libvirt which device > API > should be considered when auto-assigning guest address > - device_api is properly checked, thus taking the 'model'

Re: [libvirt] [PATCH v3 0/2] libxl: tunnelled migration support

2017-02-15 Thread Joao Martins
On 02/15/2017 09:53 PM, Jim Fehlig wrote: > Joao Martins wrote: >> Hey! >> >> Presented herewith is take 4 from tunnelled migration addressing all previous >> comments. No functional changes from v2, only revert to v1 on the top level >> migration functions and removing unnecessary usage of

Re: [libvirt] [PATCH v3 0/2] libxl: tunnelled migration support

2017-02-15 Thread Jim Fehlig
Joao Martins wrote: > Hey! > > Presented herewith is take 4 from tunnelled migration addressing all previous > comments. No functional changes from v2, only revert to v1 on the top level > migration functions and removing unnecessary usage of virReportError. > > Thanks, > Joao > > Bob Liu (1):

[libvirt] [RFC PATCH v2 16/18] test: Add some test cases for our test suite regarding the mdevs

2017-02-15 Thread Erik Skultety
For now, these only cover the unmanaged, i.e. user pre-created devices. Signed-off-by: Erik Skultety --- .../qemuxml2argv-hostdev-mdev-unmanaged.args | 25 ++ .../qemuxml2argv-hostdev-mdev-unmanaged.xml| 37

[libvirt] [RFC PATCH v2 06/18] conf: Add post parse code for mdevs to virDomainHostdevDefPostParse

2017-02-15 Thread Erik Skultety
We need to make sure that if user explicitly provides a guest address for a mdev device, the address type will be matching the device API supported on that specific mediated device and error out with an incorrect XML message. Signed-off-by: Erik Skultety ---

[libvirt] [RFC PATCH v2 04/18] conf: Update XML parser, formatter, and RNG schema to support mdev

2017-02-15 Thread Erik Skultety
To keep the domain XML as much platform agnostic as possible, do not expose an element/attribute which would contain path directly to the syfs filesystem which the mediated devices are build upon. Instead, identify each mediated device by a UUID attribute as well as specifying the device API (e.g.

[libvirt] [RFC PATCH v2 07/18] security: dac: Enable labeling of vfio mediated devices

2017-02-15 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_dac.c | 57

[libvirt] [RFC PATCH v2 10/18] qemu: Assign PCI addresses for mediated devices as well

2017-02-15 Thread Erik Skultety
So far, the official support is for x86_64 arch guests so unless a different device API than vfio-pci is available let's only turn on support for PCI address assignment. Once a different device API is introduced, we can enable another address type easily. Signed-off-by: Erik Skultety

[libvirt] [RFC PATCH v2 08/18] security: selinux: Enable labeling of vfio mediated devices

2017-02-15 Thread Erik Skultety
Label the VFIO IOMMU devices under /dev/vfio/ referenced by the symlinks in the sysfs (e.g. /sys/class/mdev_bus//iommu_group) which what qemu actually gets formatted on the command line. Signed-off-by: Erik Skultety --- src/security/security_selinux.c | 56

[libvirt] [RFC PATCH v2 02/18] conf: Introduce new hostdev device type mdev

2017-02-15 Thread Erik Skultety
A mediated device will be identified by a UUID of the user pre-created mediated device. The data necessary to identify a mediated device can be easily extended in the future, e.g. when auto-creation of mediated devices should be enabled. Signed-off-by: Erik Skultety ---

[libvirt] [RFC PATCH v2 12/18] hostdev: Introduce a reattach method for mediated devices

2017-02-15 Thread Erik Skultety
The name "reattach" does not really reflect the truth behind mediated devices, since these are purely software devices that do not need to be plugged back into the host in any way, however this patch pushes for naming consistency for methods where the logic behind the underlying operation stays

[libvirt] [RFC PATCH v2 00/18] Introduce vGPU mdev framework to libvirt

2017-02-15 Thread Erik Skultety
since v1: - new attribute model introduced which tells libvirt which device API should be considered when auto-assigning guest address - device_api is properly checked, thus taking the 'model' attribute only as a hint to assign "some" address - new address type 'mdev' is introduced rather than

[libvirt] [RFC PATCH v2 15/18] qemu: Format mdevs on the qemu command line

2017-02-15 Thread Erik Skultety
Format the mediated devices on the qemu command line as -device vfio-pci,sysfsdev='/path/to/device/in/syfs'. Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 49 + src/qemu/qemu_command.h | 5 + 2 files changed,

[libvirt] [RFC PATCH v2 14/18] qemu: namespace: Hook up the discovery of mdevs into the namespace code

2017-02-15 Thread Erik Skultety
Again, as for all the other hostdev device types, make sure that the /dev/vfio/ device will be added to the qemu namespace. Signed-off-by: Erik Skultety --- src/qemu/qemu_domain.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/qemu/qemu_domain.c

[libvirt] [RFC PATCH v2 03/18] conf: Introduce new address type mdev

2017-02-15 Thread Erik Skultety
Since the address element is much easier extendible by attributes adding more and more elements, starting with , to the element once we find out we need more data to identify a mediated device. By introducing a new address type rather than using plain elements, we also remain consistent with all

[libvirt] [RFC PATCH v2 05/18] conf: Introduce virDomainHostdevDefPostParse

2017-02-15 Thread Erik Skultety
Just to make the code a bit cleaner, move hostdev specific post parse code to its own function just in case it grows in the future. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 76 +++--- 1 file changed, 48

[libvirt] [RFC PATCH v2 13/18] qemu: cgroup: Adjust cgroups' logic to allow mediated devices

2017-02-15 Thread Erik Skultety
As goes for all the other hostdev device types, grant the qemu process access to /dev/vfio/. Signed-off-by: Erik Skultety --- src/qemu/qemu_cgroup.c | 29 + 1 file changed, 29 insertions(+) diff --git a/src/qemu/qemu_cgroup.c

[libvirt] [RFC PATCH v2 09/18] conf: Enable cold-plug of a mediated device

2017-02-15 Thread Erik Skultety
This merely introduces virDomainHostdevMatchSubsysMediatedDev method that is supposed to check whether device being cold-plugged does not already exist in the domain configuration. Signed-off-by: Erik Skultety --- src/conf/domain_conf.c | 14 ++ 1 file changed,

[libvirt] [RFC PATCH v2 11/18] hostdev: Maintain a driver list of active mediated devices

2017-02-15 Thread Erik Skultety
Keep track of the assigned mediated devices the same way we do it for the rest of hostdevs. Signed-off-by: Erik Skultety --- src/libvirt_private.syms | 1 + src/qemu/qemu_hostdev.c | 22 ++ src/qemu/qemu_hostdev.h | 4 ++ src/util/virhostdev.c| 176

[libvirt] [RFC PATCH v2 18/18] news: Update the NEWS.xml about the new mdev feature

2017-02-15 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b756a97..55fa5ed 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -53,6 +53,17 @@ was virtio-net.

[libvirt] [RFC PATCH v2 01/18] util: Introduce new module virmdev

2017-02-15 Thread Erik Skultety
Beside creation, disposal, getter, and setter methods the module exports methods to work with lists of mediated devices. Signed-off-by: Erik Skultety --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 18 +++

[libvirt] [RFC PATCH v2 17/18] docs: Document the new hostdev and address type 'mdev'

2017-02-15 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 0a115f5..8f21436 100644 ---

Re: [libvirt] [v6 09/10] Resctrl: concurrence support

2017-02-15 Thread Marcelo Tosatti
On Wed, Feb 15, 2017 at 01:41:52PM +0800, Eli Qiao wrote: > The internal struct list domainall is a list which are resctral domain > status shared by all VMs, especiall the default domain, each VM should > access it concomitantly. Ues a mutex to control it. > > Each bank's cache_left field is

[libvirt] [PATCH] libxl: fix potential double free in libxlDriverGetDom0MaxmemConf

2017-02-15 Thread Jim Fehlig
Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf but introduced a potential double free of mem_tokens *** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x7fffc808cfd0 *** Avoid double free by setting mem_tokens to NULL after calling virStringListFree.

Re: [libvirt] Introduce vGPU mdev framework to libvirt

2017-02-15 Thread Alex Williamson
On Wed, 15 Feb 2017 14:43:22 +0100 Erik Skultety wrote: > On Wed, Feb 15, 2017 at 09:50:03AM +0100, Martin Polednik wrote: > > On 14/02/17 09:58 -0700, Alex Williamson wrote: > > > On Tue, 14 Feb 2017 16:50:14 +0100 > > > Martin Polednik wrote: > > >

[libvirt] [PATCH v2 25/33] qemu: Make virQEMUCapsInitCPUModel testable

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 19 ++- src/qemu/qemu_capspriv.h | 10 ++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 29/33] cputest: Convert all json data files to query-cpu-model-expansion

2017-02-15 Thread Jiri Denemark
Converted by running the following command, renaming the files as *.new, and committing only the *.new files. (cd tests/cputestdata; ./cpu-convert.py *.json) Signed-off-by: Jiri Denemark --- Notes: Version 2: - reconverted to contain "vendor" properties

[libvirt] [PATCH v2 07/33] qemu: Fix CPU model fallback in domain capabilities

2017-02-15 Thread Jiri Denemark
Our documentation of the domain capabilities XML says that the fallback attribute of a CPU model is used to indicate whether the CPU model was detected by libvirt itself (fallback="allow") or by asking the hypervisor (fallback="forbid"). We need to properly set fallback="forbid" when CPU model

[libvirt] [PATCH v2 26/33] cputest: Rename x86 data files

2017-02-15 Thread Jiri Denemark
While "x86" is a CPU sub driver name, it is not a recognized name of any architecture known to libvirt. Let's use "x86_64" prefix which can be used with virArch APIs. Signed-off-by: Jiri Denemark --- Notes: Version 2: - fix file names created by cpu-parse.sh

[libvirt] [PATCH v2 18/33] cpu_x86: Introduce virCPUx86DataSetSignature

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c| 11 +++ src/cpu/cpu_x86.h| 4 src/libvirt_private.syms | 1 + src/qemu/qemu_capabilities.c | 1 + 4 files changed, 17 insertions(+) diff

[libvirt] [PATCH v2 32/33] cputest: Drop .new suffix from CPU test data files

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change tests/cputest.c | 2 +- .../{x86_64-cpuid-A10-5800K.json.new => x86_64-cpuid-A10-5800K.json}| 0 ...86_64-cpuid-Core-i5-2500.json.new =>

[libvirt] [PATCH v2 20/33] cpu_x86: Introduce virCPUx86DataAddFeature

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c| 22 ++ src/cpu/cpu_x86.h| 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 26 insertions(+) diff --git a/src/cpu/cpu_x86.c

[libvirt] [PATCH v2 31/33] cputest: Drop obsolete CPU test data files

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change tests/cputestdata/x86_64-cpuid-A10-5800K.json | 77 --- tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 88 --

[libvirt] [PATCH v2 11/33] qemu: Store more types in qemuMonitorCPUModelInfo

2017-02-15 Thread Jiri Denemark
While query-cpu-model-expansion returns only boolean features on s390, but x86_64 reports some integer and string properties which we are interested in. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 30/33] cputest: Test virQEMUCapsInitCPUModel

2017-02-15 Thread Jiri Denemark
The original test didn't use family/model numbers to make better decisions about the CPU model and thus mis-detected the model in the two cases which are modified in this commit. The detected CPU models now match those obtained from raw CPUID data. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 02/33] docs: Fix since statement in host-model documentation

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change docs/formatdomain.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index bc125ed63..294d3c467 100644 ---

[libvirt] [PATCH v2 21/33] cpu: Use virCPUData.arch in cpuDecode

2017-02-15 Thread Jiri Denemark
virCPUDef.arch is not required to be filled in for guest CPU definitions. It doesn't make sense to artificially mandate it to be set when cpuDecode is called especially when virCPUData.arch passed to cpuDecode already contains the architecture. Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 05/33] qemu: Refactor virQEMUCapsInitHostCPUModel

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 109 ++- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH v2 33/33] news: Detect host CPU model by asking QEMU on x86_64

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b756a970f..798687407 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -73,6 +73,17 @@

[libvirt] [PATCH v2 01/33] docs: Drop obsolete statement about CPU modes and migration

2017-02-15 Thread Jiri Denemark
The guest CPU definition has always been updated automatically during migration. And currently we just transform any host-model CPU into a custom one when a domain starts. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change docs/formatdomain.html.in |

[libvirt] [PATCH v2 00/33] qemu: Detect host CPU model by asking QEMU on x86_64

2017-02-15 Thread Jiri Denemark
Until now host-model CPU mode tried to enable all CPU features supported by the host CPU even if QEMU/KVM did not support them. This caused a number of issues and made host-model quite unreliable. Asking QEMU for the CPU it can provide and the current host makes host-model much more robust. This

[libvirt] [PATCH v2 10/33] qemu: Rename hostCPU/feature element in capabilities cache

2017-02-15 Thread Jiri Denemark
The element will be generalized in the following commit. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 14 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +--

[libvirt] [PATCH v2 28/33] cputest: Switch host CPU data scripts to model expansion

2017-02-15 Thread Jiri Denemark
Instantiating "host" CPU and querying it using qom-get has been the only way of probing host CPU via QEMU until 2.9.0 implemented query-cpu-model-expansion for x86_64. Even though libvirt never really used the old way its result can be easily converted into the one produced by

[libvirt] [PATCH v2 06/33] qemu: Skip virQEMUCapsCPUFilterFeatures on non-x86 CPUs

2017-02-15 Thread Jiri Denemark
All features the function is currently supposed to filter out are specific to x86_64. We should avoid removing them on other architectures. It seems to be quite unlikely other achitectures would use the same names, but one can never be sure. Signed-off-by: Jiri Denemark ---

[libvirt] [PATCH v2 14/33] cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 147 ++--- src/cpu/cpu_x86.h | 3 - src/libvirt_private.syms | 1 - src/libxl/libxl_capabilities.c | 18 ++---

[libvirt] [PATCH v2 09/33] qemu: Introduce virQEMUCapsFormatHostCPUModelInfo

2017-02-15 Thread Jiri Denemark
The CPU model info formating code in virQEMUCapsFormatCache will get more complicated soon. Separating the code in virQEMUCapsFormatHostCPUModelInfo will make the result easier to read. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change

[libvirt] [PATCH v2 17/33] cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c | 57 -- src/cpu/cpu_x86.h | 2 +- src/libxl/libxl_capabilities.c | 2 +- src/qemu/qemu_monitor_json.c | 2 +- 4

[libvirt] [PATCH v2 04/33] domaincapstest: Add test data for QEMU 2.9.0

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 116 + tests/domaincapsschemadata/qemu_2.9.0.x86_64.xml | 116 + tests/domaincapstest.c

[libvirt] [PATCH v2 22/33] qemu: Get host CPU model from QEMU on x86_64

2017-02-15 Thread Jiri Denemark
Until now host-model CPU mode tried to enable all CPU features supported by the host CPU even if QEMU/KVM did not support them. This caused a number of issues and made host-model quite unreliable. Asking QEMU for the CPU it can provide and the current host makes host-model much more robust. This

[libvirt] [PATCH v2 13/33] cpu: Introduce virCPUDataNew

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu.c| 19 +++ src/cpu/cpu.h| 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 23 insertions(+) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index

[libvirt] [PATCH v2 27/33] cputest: Use virArch enum rather then strings

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change tests/cputest.c | 294 1 file changed, 148 insertions(+), 146 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index

[libvirt] [PATCH v2 24/33] qemu: Use full CPU model expansion on x86

2017-02-15 Thread Jiri Denemark
The static CPU model expansion is designed to return only canonical names of all CPU properties. TO maintain backward compatibility libvirt is stuck with different spelling of some of the features, which is only returned by the full expansion. But in addition to returned all spelling variants for

[libvirt] [PATCH v2 15/33] cpu_x86: Make virCPUx86DataClear static

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c| 2 +- src/cpu/cpu_x86.h| 2 -- src/libvirt_private.syms | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c

[libvirt] [PATCH v2 16/33] cpu: Rework cpuDataFree

2017-02-15 Thread Jiri Denemark
The new API is called virCPUDataFree. Individual CPU drivers are no longer required to implement their own freeing function unless they need to free architecture specific data from virCPUData. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change

[libvirt] [PATCH v2 12/33] qemu: Probe "max" CPU model in TCG

2017-02-15 Thread Jiri Denemark
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change

[libvirt] [PATCH v2 08/33] docs: Update description of the host-model CPU mode

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change docs/formatdomain.html.in | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index

[libvirt] [PATCH v2 19/33] cpu_x86: Introduce virCPUx86DataSetVendor

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/cpu/cpu_x86.c| 45 +++-- src/cpu/cpu_x86.h| 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 39 insertions(+), 10 deletions(-) diff

[libvirt] [PATCH v2 23/33] qemu: Use enum for CPU model expansion type

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 6 +- src/qemu/qemu_monitor_json.c | 11 +-- src/qemu/qemu_monitor_json.h | 4

Re: [libvirt] [PATCH 2/2] apparmor: don't fail on non-apparmor

2017-02-15 Thread Jim Fehlig
Michal Privoznik wrote: > On 02/03/2017 06:32 PM, Jim Fehlig wrote: >> If the apparmor security driver is loaded/enabled and domain config >> contains a element whose type attribute is not 'apparmor', >> starting the domain fails when attempting to label resources such >> as tap FDs. >> >> Many

Re: [libvirt] [PATCH 00/33] qemu: Detect host CPU model by asking QEMU on x86_64

2017-02-15 Thread Jiri Denemark
Self-NACK. While working on an additional fix, I noticed the cpu-convert.py script does not set "vendor" property. Since no review has started yet, I'll send a v2 of this series with required changes to several patches. Jirka -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] Introduce vGPU mdev framework to libvirt

2017-02-15 Thread Erik Skultety
On Wed, Feb 15, 2017 at 09:50:03AM +0100, Martin Polednik wrote: > On 14/02/17 09:58 -0700, Alex Williamson wrote: > > On Tue, 14 Feb 2017 16:50:14 +0100 > > Martin Polednik wrote: > > > > > On 07/02/17 12:29 -0700, Alex Williamson wrote: > > > >On Tue, 7 Feb 2017 17:26:51

Re: [libvirt] [v6 00/10] Support cache tune in libvirt

2017-02-15 Thread Martin Kletzander
On Wed, Feb 15, 2017 at 01:41:43PM +0800, Eli Qiao wrote: Addressed comment from v6 -> v5 Marcelo: * Support other APPs to operate /sys/fs/resctrl at same time Libvirt will scan /sys/fs/resctrl again before doing cache allocation. patch 10 will address this. Addressed

Re: [libvirt] [PATCH 2/2] util: storage: add JSON backing volume parser 'raw' block driver

2017-02-15 Thread Richard W.M. Jones
On Wed, Feb 15, 2017 at 12:53:39PM +0100, Tomáš Golembiovský wrote: > On Wed, 15 Feb 2017 10:55:24 + > "Richard W.M. Jones" wrote: > > > On Tue, Feb 14, 2017 at 10:03:54PM +0100, Tomáš Golembiovský wrote: > > > Hi, > > > > > > On Tue, 14 Feb 2017 15:58:45 + > > >

Re: [libvirt] [PATCH 2/2] util: storage: add JSON backing volume parser 'raw' block driver

2017-02-15 Thread Tomáš Golembiovský
On Wed, 15 Feb 2017 10:55:24 + "Richard W.M. Jones" wrote: > On Tue, Feb 14, 2017 at 10:03:54PM +0100, Tomáš Golembiovský wrote: > > Hi, > > > > On Tue, 14 Feb 2017 15:58:45 + > > "Richard W.M. Jones" wrote: > > > > > The patches compile. > > >

Re: [libvirt] [PATCH v3 2/2] libxl: add tunnelled migration support

2017-02-15 Thread Joao Martins
On 02/15/2017 11:17 AM, Joao Martins wrote: > From: Bob Liu > > Tunnelled migration doesn't require any extra network connections > beside the libvirt daemon. It's capable of strong encryption and the > default option of openstack-nova. > > This patch adds the tunnelled

[libvirt] [PATCH v3 2/2] libxl: add tunnelled migration support

2017-02-15 Thread Joao Martins
From: Bob Liu Tunnelled migration doesn't require any extra network connections beside the libvirt daemon. It's capable of strong encryption and the default option of openstack-nova. This patch adds the tunnelled migration(Tunnel3params) support to libxl. On the source

[libvirt] [PATCH v3 0/2] libxl: tunnelled migration support

2017-02-15 Thread Joao Martins
Hey! Presented herewith is take 4 from tunnelled migration addressing all previous comments. No functional changes from v2, only revert to v1 on the top level migration functions and removing unnecessary usage of virReportError. Thanks, Joao Bob Liu (1): libxl: add tunnelled migration support

[libvirt] [PATCH v2] Ensure disk names follow the disk name regex

2017-02-15 Thread Nitesh Konkar
Currently disk names do not follow the (regex) /^[fhv]d[a-z]+[0-9]*$/ completely and hence one can assign disk names like vd2 etc. This patch ensures that the disk names follow the regex mentioned. This patch also adds a testcase. Signed-off-by: Nitesh Konkar ---

[libvirt] [PATCH v3 1/2] libxl: refactor libxlDomainMigrationPrepare

2017-02-15 Thread Joao Martins
The newly introduced function libxlDomainMigrationPrepareAny will be shared between P2P and tunnelled variations. Signed-off-by: Joao Martins --- src/libxl/libxl_migration.c | 92 +++-- 1 file changed, 56 insertions(+), 36

Re: [libvirt] [PATCH 2/2] util: storage: add JSON backing volume parser 'raw' block driver

2017-02-15 Thread Richard W.M. Jones
On Tue, Feb 14, 2017 at 10:03:54PM +0100, Tomáš Golembiovský wrote: > Hi, > > On Tue, 14 Feb 2017 15:58:45 + > "Richard W.M. Jones" wrote: > > > The patches compile. > > > > I looked at both commits and they at least superficially seem > > sensible. I'm not intimately

Re: [libvirt] [PATCH] qemu_conf: Check for namespaces availability more wisely

2017-02-15 Thread Daniel P. Berrange
On Wed, Feb 15, 2017 at 11:19:24AM +0100, Michal Privoznik wrote: > On 02/15/2017 10:43 AM, Daniel P. Berrange wrote: > > On Wed, Feb 15, 2017 at 10:20:27AM +0100, Michal Privoznik wrote: > >> The bare fact that mnt namespace is available is not enough for > >> us to allow/enable qemu namespaces

Re: [libvirt] [PATCH] qemu_conf: Check for namespaces availability more wisely

2017-02-15 Thread Michal Privoznik
On 02/15/2017 10:43 AM, Daniel P. Berrange wrote: > On Wed, Feb 15, 2017 at 10:20:27AM +0100, Michal Privoznik wrote: >> The bare fact that mnt namespace is available is not enough for >> us to allow/enable qemu namespaces feature. There are other >> requirements: we must copy all the ACL &

[libvirt] [PATCH 26/33] cputest: Rename x86 data files

2017-02-15 Thread Jiri Denemark
While "x86" is a CPU sub driver name, it is not a recognized name of any architecture known to libvirt. Let's use "x86_64" prefix which can be used with virArch APIs. Signed-off-by: Jiri Denemark --- tests/cputest.c| 204

[libvirt] [PATCH 23/33] qemu: Use enum for CPU model expansion type

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 4 +++- src/qemu/qemu_monitor.c | 4 ++-- src/qemu/qemu_monitor.h | 6 +- src/qemu/qemu_monitor_json.c | 11 +-- src/qemu/qemu_monitor_json.h | 4 ++-- 5 files changed, 21

[libvirt] [PATCH 25/33] qemu: Make virQEMUCapsInitCPUModel testable

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 19 ++- src/qemu/qemu_capspriv.h | 10 ++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 30/33] cputest: Test virQEMUCapsInitCPUModel

2017-02-15 Thread Jiri Denemark
The original test didn't use family/model numbers to make better decisions about the CPU model and thus mis-detected the model in the two cases which are modified in this commit. The detected CPU models now match those obtained from raw CPUID data. Signed-off-by: Jiri Denemark

[libvirt] [PATCH 09/33] qemu: Introduce virQEMUCapsFormatHostCPUModelInfo

2017-02-15 Thread Jiri Denemark
The CPU model info formating code in virQEMUCapsFormatCache will get more complicated soon. Separating the code in virQEMUCapsFormatHostCPUModelInfo will make the result easier to read. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 36

[libvirt] [PATCH 32/33] cputest: Drop .new suffix from CPU test data files

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputest.c | 2 +- .../{x86_64-cpuid-A10-5800K.json.new => x86_64-cpuid-A10-5800K.json}| 0 ...86_64-cpuid-Core-i5-2500.json.new => x86_64-cpuid-Core-i5-2500.json} | 0

[libvirt] [PATCH 27/33] cputest: Use virArch enum rather then strings

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputest.c | 294 1 file changed, 148 insertions(+), 146 deletions(-) diff --git a/tests/cputest.c b/tests/cputest.c index 406b40dfe..c0a816b60 100644 --- a/tests/cputest.c +++

[libvirt] [PATCH 31/33] cputest: Drop obsolete CPU test data files

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/cputestdata/x86_64-cpuid-A10-5800K.json | 77 --- tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 88 -- tests/cputestdata/x86_64-cpuid-Core-i5-2540M.json | 82

[libvirt] [PATCH 11/33] qemu: Store more types in qemuMonitorCPUModelInfo

2017-02-15 Thread Jiri Denemark
While query-cpu-model-expansion returns only boolean features on s390, but x86_64 reports some integer and string properties which we are interested in. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 84

[libvirt] [PATCH 24/33] qemu: Use full CPU model expansion on x86

2017-02-15 Thread Jiri Denemark
The static CPU model expansion is designed to return only canonical names of all CPU properties. TO maintain backward compatibility libvirt is stuck with different spelling of some of the features, which is only returned by the full expansion. But in addition to returned all spelling variants for

[libvirt] [PATCH 29/33] cputest: Convert all json data files to query-cpu-model-expansion

2017-02-15 Thread Jiri Denemark
Converted by running the following command, renaming the files as *.new, and committing only the *.new files. (cd tests/cputestdata; ./cpu-convert.py *.json) Signed-off-by: Jiri Denemark --- tests/cputestdata/x86_64-cpuid-A10-5800K.json.new | 202 +

[libvirt] [PATCH 33/33] news: Detect host CPU model by asking QEMU on x86_64

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index b756a970f..798687407 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -73,6 +73,17 @@ and network.

[libvirt] [PATCH 12/33] qemu: Probe "max" CPU model in TCG

2017-02-15 Thread Jiri Denemark
Querying "host" CPU model expansion only makes sense for KVM. QEMU 2.9.0 introduces a new "max" CPU model which can be used to ask QEMU what the best CPU it can provide to a TCG domain is. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c |

[libvirt] [PATCH 28/33] cputest: Switch host CPU data scripts to model expansion

2017-02-15 Thread Jiri Denemark
Instantiating "host" CPU and querying it using qom-get has been the only way of probing host CPU via QEMU until 2.9.0 implemented query-cpu-model-expansion for x86_64. Even though libvirt never really used the old way its result can be easily converted into the one produced by

[libvirt] [PATCH 05/33] qemu: Refactor virQEMUCapsInitHostCPUModel

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 109 ++- 1 file changed, 55 insertions(+), 54 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 399e31447..c5e57b4ab 100644 ---

[libvirt] [PATCH 14/33] cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew

2017-02-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c | 147 ++--- src/cpu/cpu_x86.h | 3 - src/libvirt_private.syms | 1 - src/libxl/libxl_capabilities.c | 18 ++--- src/qemu/qemu_monitor_json.c | 33

  1   2   >