Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-23 Thread Jiri Denemark
On Thu, Feb 23, 2017 at 08:10:18 -0500, John Ferlan wrote: > > > On 02/21/2017 06:43 AM, Jiri Denemark wrote: > > On Mon, Feb 20, 2017 at 14:28:42 -0500, John Ferlan wrote: > >> On 02/20/2017 11:03 AM, Jiri Denemark wrote: > >>> On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: >

[libvirt] [PATCH v3 27/28] cputest: Drop .new suffix from CPU test data files

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

[libvirt] [PATCH v3 18/28] qemu: Use enum for CPU model expansion type

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change 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

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

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 74dfe9add..355dfa7b7 100644 --- a/docs/news.xml +++

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

2017-02-23 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 v3 21/28] cputest: Rename x86 data files

2017-02-23 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 3: - no change Version 2: - fix file

[libvirt] [PATCH v3 25/28] cputest: Test virQEMUCapsInitCPUModel

2017-02-23 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 v3 13/28] cpu_x86: Make virCPUx86DataAddCPUID work with virCPUDataPtr

2017-02-23 Thread Jiri Denemark
The CPU driver provides APIs to create and free virCPUDataPtr. Thus all APIs exported from the driver should work with that rather than requiring the caller to pass a pointer to an internal part of the structure. In other words virCPUx86DataAddCPUID(cpudata, ) is much better than the

[libvirt] [PATCH v3 19/28] qemu: Use full CPU model expansion on x86

2017-02-23 Thread Jiri Denemark
The static CPU model expansion is designed to return only canonical names of all CPU properties. To maintain backwards compatibility libvirt is stuck with different spelling of some of the features, but we need to use the full expansion to get the additional spellings. In addition to returning all

[libvirt] [PATCH v3 15/28] cpu_x86: Introduce virCPUx86DataSetVendor

2017-02-23 Thread Jiri Denemark
The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark --- Notes: Version 3: - ACKed in v2 - better commit message Version 2: - no change src/cpu/cpu_x86.c

[libvirt] [PATCH v3 09/28] qemu: Probe "max" CPU model in TCG

2017-02-23 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 3: - s/type/virtType/ in

[libvirt] [PATCH v3 12/28] cpu: Rework cpuDataFree

2017-02-23 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 3: - ACKed in v2 - no

[libvirt] [PATCH v3 06/28] qemu: Rename hostCPU/feature element in capabilities cache

2017-02-23 Thread Jiri Denemark
The element will be generalized in the following commits. Signed-off-by: Jiri Denemark --- Notes: Version 3: - s/featureNodes/nodes/ - drop s/supported/boolean/ change Version 2: - no change src/qemu/qemu_capabilities.c | 16

[libvirt] [PATCH v3 17/28] qemu: Get host CPU model from QEMU on x86_64

2017-02-23 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 v3 07/28] qemu: Prepare for more types in qemuMonitorCPUModelInfo

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 14 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++ 3

[libvirt] [PATCH v3 14/28] cpu_x86: Introduce virCPUx86DataSetSignature

2017-02-23 Thread Jiri Denemark
The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark --- Notes: Version 3: - ACKed in v2 - better commit message - #include "cpu/cpu_x86.h" in qemu_capabilities.c moved to

[libvirt] [PATCH v3 20/28] qemu: Make virQEMUCapsInitCPUModel testable

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - s/type/virtType/ in virQEMUCapsLoadHostCPUModelInfo Version 2: - no change src/qemu/qemu_capabilities.c | 19 ++- src/qemu/qemu_capspriv.h | 10 ++ 2 files changed, 24

[libvirt] [PATCH v3 11/28] cpu_x86: Make virCPUx86DataClear static

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - ACKed in v2 - no change 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(-)

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

2017-02-23 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 v3 05/28] docs: Update description of the host-model CPU mode

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - reworded and updated documentation Version 2: - no change docs/formatdomain.html.in | 37 - 1 file changed, 24 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH v3 16/28] cpu_x86: Introduce virCPUx86DataAddFeature

2017-02-23 Thread Jiri Denemark
The API is useful for creating virCPUData in a hypervisor driver from data we got by querying the hypervisor. Signed-off-by: Jiri Denemark --- Notes: Version 3: - ACKed in v2 - better commit message Version 2: - no change src/cpu/cpu_x86.c

[libvirt] [PATCH v3 03/28] qemu: Refactor virQEMUCapsInitHostCPUModel

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

[libvirt] [PATCH v3 01/28] qemucapstest: Update test data for QEMU 2.9.0

2017-02-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Generated from Eduardo's work/x86-query-cpu-expansion-full branch rebased on current QEMU master. Version 3: - regenerated with a rebased QEMU to avoid conflicts with existing caps_2.9.0.x86_64.replies file

[libvirt] [PATCH v3 08/28] qemu: Store more types in qemuMonitorCPUModelInfo

2017-02-23 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 3: - change the XML element to Version 2: -

[libvirt] [PATCH v3 10/28] cpu_x86: Drop virCPUx86MakeData and use virCPUDataNew

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

[libvirt] [PATCH v3 02/28] domaincapstest: Add test data for QEMU 2.9.0

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

[libvirt] [PATCH v3 04/28] qemu: Fix CPU model fallback in domain capabilities

2017-02-23 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

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 23:16:46 -0500, John Ferlan wrote: > > > On 02/15/2017 11:44 AM, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > > > Notes: > > Version 2: > > - no change > > > > src/qemu/qemu_capabilities.c | 19 ++- > >

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 02:25:13PM +0100, Michal Privoznik wrote: > On 02/23/2017 02:16 PM, Daniel P. Berrange wrote: > > On Thu, Feb 23, 2017 at 02:07:27PM +0100, Michal Privoznik wrote: > >> On 02/23/2017 11:48 AM, Daniel P. Berrange wrote: > >>> On Thu, Feb 23, 2017 at 11:16:17AM +0100, Michal

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Michal Privoznik
On 02/23/2017 02:16 PM, Daniel P. Berrange wrote: > On Thu, Feb 23, 2017 at 02:07:27PM +0100, Michal Privoznik wrote: >> On 02/23/2017 11:48 AM, Daniel P. Berrange wrote: >>> On Thu, Feb 23, 2017 at 11:16:17AM +0100, Michal Privoznik wrote: On 02/23/2017 11:02 AM, Daniel P. Berrange wrote:

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 23:11:54 -0500, John Ferlan wrote: > > > On 02/15/2017 11:44 AM, Jiri Denemark wrote: > > The static CPU model expansion is designed to return only canonical > > names of all CPU properties. TO maintain backward compatibility libvirt > > s/TO/To > > > is stuck with

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 02:07:27PM +0100, Michal Privoznik wrote: > On 02/23/2017 11:48 AM, Daniel P. Berrange wrote: > > On Thu, Feb 23, 2017 at 11:16:17AM +0100, Michal Privoznik wrote: > >> On 02/23/2017 11:02 AM, Daniel P. Berrange wrote: > >>> On Thu, Feb 23, 2017 at 10:02:48AM +0100, Michal

Re: [libvirt] [PATCH 02/13] conf: Introduce migrate_tls_x509_cert_dir

2017-02-23 Thread John Ferlan
On 02/21/2017 06:43 AM, Jiri Denemark wrote: > On Mon, Feb 20, 2017 at 14:28:42 -0500, John Ferlan wrote: >> On 02/20/2017 11:03 AM, Jiri Denemark wrote: >>> On Fri, Feb 17, 2017 at 14:39:19 -0500, John Ferlan wrote: +# Enable use of TLS encryption for migration +# +# It is

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Michal Privoznik
On 02/23/2017 11:48 AM, Daniel P. Berrange wrote: > On Thu, Feb 23, 2017 at 11:16:17AM +0100, Michal Privoznik wrote: >> On 02/23/2017 11:02 AM, Daniel P. Berrange wrote: >>> On Thu, Feb 23, 2017 at 10:02:48AM +0100, Michal Privoznik wrote: So, majority of the code is just ready as-is. Well,

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 22:49:37 -0500, John Ferlan wrote: ... > > @@ -5043,8 +5044,14 @@ qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr > > mon, > > if (virJSONValueObjectAppendString(model, "name", model_name) < 0) > > goto cleanup; > > > > +switch (type) { > > +case

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 22:28:25 -0500, John Ferlan wrote: ... > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > > index f115f1e23..bcfb6b694 100644 > > --- a/src/qemu/qemu_capabilities.c > > +++ b/src/qemu/qemu_capabilities.c > > @@ -3128,6 +3128,77 @@

Re: [libvirt] [PATCH 0/6] bhyve UEFI and graphics support

2017-02-23 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: > Fabian Freyer (5): > bhyve: virBhyveProbeCaps: BHYVE_CAP_LPC_BOOTROM > bhyve: add support for booting from UEFI > bhyve: test cases for UEFI bhyvexml2argvtest > bhyve: enumerate UEFI firmwares > bhyve: add video support > > Roman Bogorodskiy (1): > bhyve:

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 22:23:30 -0500, John Ferlan wrote: ... > > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c > > index 6ca6ea702..f115f1e23 100644 > > --- a/src/qemu/qemu_capabilities.c > > +++ b/src/qemu/qemu_capabilities.c > > @@ -33,6 +33,7 @@ > > #include

Re: [libvirt] [PATCH v2] doc: Correct the default werror policy

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 12:30:02PM +0100, Philipp Hahn wrote: The documentation is plain wrong about the default write_error policy, as its only implemented by QEMU (src/vz/vz_utils.c is the only other case, which simply explodes, is anything except other then

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 01:15:50PM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 10:46:14AM +, Daniel P. Berrange wrote: > > On Thu, Feb 23, 2017 at 11:38:40AM +0100, Martin Kletzander wrote: > > > On Thu, Feb 23, 2017 at 09:48:48AM +, Daniel P. Berrange wrote: > > > > On Wed,

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 10:46:14AM +, Daniel P. Berrange wrote: On Thu, Feb 23, 2017 at 11:38:40AM +0100, Martin Kletzander wrote: On Thu, Feb 23, 2017 at 09:48:48AM +, Daniel P. Berrange wrote: > On Wed, Feb 22, 2017 at 09:19:15PM +0100, Martin Kletzander wrote: > > On Wed, Feb 22,

Re: [libvirt] [PATCH 00/14] Introduce NVDIMM support

2017-02-23 Thread Andrea Bolognani
On Thu, 2017-02-23 at 10:02 +0100, Michal Privoznik wrote: > NVDIMMs are new type of ultra fast storage that's plugged into DIMM slot and > can hold the stored info throughout reboots. After all, NV stands for > non-volatile. In virtualization world, this has an awesome advantage - less > VM_EXITs

[libvirt] [PATCH 4/4] Test virSystemd APIs twice to check the cache effects

2017-02-23 Thread Ján Tomko
Test virSystemd APIs twice to check the cache effects. --- tests/virsystemdtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c index eca6e84..6ba532d 100644 --- a/tests/virsystemdtest.c +++ b/tests/virsystemdtest.c @@ -525,6 +525,8 @@

[libvirt] [PATCH 2/4] Use macros for testing virSystemd APIs

2017-02-23 Thread Ján Tomko
This hides the unused third parameter from every line and prepares for resetting the environment after each test case in the future. --- tests/virsystemdtest.c | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/virsystemdtest.c

[libvirt] [PATCH 1/4] Unify checking for machine1 systemd service

2017-02-23 Thread Ján Tomko
Both virSystemdTerminateMachine and virSystemdCreateMachine propagate the error to tell between a non-systemd system and a hard error. In virSystemdGetMachineNameByPID both are treated the same, but an error is ignored by the callers. Split out the checks into a separate function. ---

[libvirt] [PATCH 0/4] Cache systemd presence

2017-02-23 Thread Ján Tomko
Reduce the number of DBus calls required, and possibly the number of timeouts. Ján Tomko (4): Unify checking for machine1 systemd service Use macros for testing virSystemd APIs Cache the presence of machine1 service Test virSystemd APIs twice to check the cache effects

[libvirt] [PATCH 3/4] Cache the presence of machine1 service

2017-02-23 Thread Ján Tomko
After the system has been booted, it should not change. Cache the return value of virSystemdHasCreateMachine. Allow starting and terminating machines with just one DBus call, instead of three, reducing the chance of the call timing out. Also introduce a small function for resetting the cache to

Re: [libvirt] [PATCH] doc: fix writing of QEMU

2017-02-23 Thread Peter Krempa
On Thu, Feb 23, 2017 at 12:30:03 +0100, Philipp Hahn wrote: > QEMU should be written all upper or all lower case. > > Signed-off-by: Philipp Hahn > --- > ChangeLog-old | 4 ++-- > docs/formatnwfilter.html.in | 6 +++--- > docs/news-2009.html.in|

[libvirt] [PATCH] doc: fix writing of QEMU

2017-02-23 Thread Philipp Hahn
QEMU should be written all upper or all lower case. Signed-off-by: Philipp Hahn --- ChangeLog-old | 4 ++-- docs/formatnwfilter.html.in | 6 +++--- docs/news-2009.html.in| 6 +++--- docs/news-2010.html.in| 12 ++--

[libvirt] [PATCH v2] doc: Correct the default werror policy

2017-02-23 Thread Philipp Hahn
The documentation is plain wrong about the default write_error policy, as its only implemented by QEMU (src/vz/vz_utils.c is the only other case, which simply explodes, is anything except other then VIR_DOMAIN_DISK_ERROR_POLICY_DEFAULT is used). And QEMUs default is

[libvirt] [PATCH v2] doc: add storage format entries

2017-02-23 Thread Philipp Hahn
Add format/@type entries to examples to show what the text is talking about. Add missing blank. Signed-off-by: Philipp Hahn --- docs/storage.html.in | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) --- This is a re-post from 2013-02-07, as ist still is unclear

[libvirt] [PATCH] doc updates

2017-02-23 Thread Philipp Hahn
Hi, here are 3 patches to improve the documentation: the 1st one is a re-sent from 2013, the 2nd one is my version of a patch proposed 2011, the 3rd is probably most controversal, so drop it if you don't like it. The QEMU homepage spellts it "QEMU" and "qemu" is used a lot for the binary, but

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 11:16:17AM +0100, Michal Privoznik wrote: > On 02/23/2017 11:02 AM, Daniel P. Berrange wrote: > > On Thu, Feb 23, 2017 at 10:02:48AM +0100, Michal Privoznik wrote: > >> So, majority of the code is just ready as-is. Well, with one > >> slight change: differentiate between

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 11:38:40AM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 09:48:48AM +, Daniel P. Berrange wrote: > > On Wed, Feb 22, 2017 at 09:19:15PM +0100, Martin Kletzander wrote: > > > On Wed, Feb 22, 2017 at 02:44:01PM -0500, Laine Stump wrote: > > > > On 02/22/2017

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 14:42:39 -0500, John Ferlan wrote: ... > > @@ -131,20 +130,23 @@ libxlCapsNodeData(virCPUDefPtr cpu, libxl_hwcap hwcap, > > { .eax_in = 0x8007, .ecx_in = 0U, .edx = hwcap[7] }, > > }; > > > > +if (!(cpudata = virCPUDataNew(cpu->arch))) > > +

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 09:48:48AM +, Daniel P. Berrange wrote: On Wed, Feb 22, 2017 at 09:19:15PM +0100, Martin Kletzander wrote: On Wed, Feb 22, 2017 at 02:44:01PM -0500, Laine Stump wrote: > On 02/22/2017 12:52 PM, Daniel P. Berrange wrote: > > One of the conditions in

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

2017-02-23 Thread Jiri Denemark
On Tue, Feb 21, 2017 at 12:24:19 -0500, John Ferlan wrote: > > > On 02/15/2017 11:44 AM, Jiri Denemark wrote: > > 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

[libvirt] [PATCH v2] qemu_capabilities: introduce QEMU_CAPS_SD_CARD to probe sd-card drivers

2017-02-23 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces QEMU_CAPS_SD_CARD for probing whether qemu support SD card by: {"execute": "device-list-properties", "arguments":{"typename":"sd-card"}} It will be helpful for apps which used cmd 'virsh domcaps` etc. Also helpful for:

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Michal Privoznik
On 02/23/2017 11:02 AM, Daniel P. Berrange wrote: > On Thu, Feb 23, 2017 at 10:02:48AM +0100, Michal Privoznik wrote: >> So, majority of the code is just ready as-is. Well, with one >> slight change: differentiate between dimm and nvdimm in places >> like device alias generation, generating the

Re: [libvirt] [PATCH] qemu_cgroup: Only try to allow devices if devices CGroup's available

2017-02-23 Thread Ján Tomko
On Wed, Feb 22, 2017 at 04:38:59PM +0100, Michal Privoznik wrote: When a domain needs an access to some device (be it a disk, RNG, chardev, whatever), we have to allow it in the devices CGroup (if it is available), because by default we disallow all the devices. But some of the functions that

Re: [libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 10:02:48AM +0100, Michal Privoznik wrote: > So, majority of the code is just ready as-is. Well, with one > slight change: differentiate between dimm and nvdimm in places > like device alias generation, generating the command line and so > on. > > Speaking of the command

[libvirt] [PATCH resend v2 1/2] qemu: Allow saving QEMU libvirt state to a pipe

2017-02-23 Thread Chen Hanxiao
From: Chen Hanxiao Base upon patches from Roy Keene Currently qemuDomainSaveMemory can save vm's config and memory to fd. It write a magic QEMU_SAVE_PARTIAL firstly, then re-open it to change QEMU_SAVE_PARTIAL as QEMU_SAVE_MAGIC. For pipes this

[libvirt] [PATCH resend v2 0/2] Allow saving QEMU libvirt state to a pipe

2017-02-23 Thread Chen Hanxiao
This series introduce flag VIR_DOMAIN_SAVE_DIRECT to enable command 'save' to write to PIPE. Base upon patches from Roy Keene with some fixes. Change from original patch: 1) Check whether the specified path is a PIPE. 2) Rebase on upstream. 3) Add doc for virsh command

[libvirt] [PATCH resend v2 2/2] virsh: introduce flage --direct for save command

2017-02-23 Thread Chen Hanxiao
From: Chen Hanxiao Base upon patches from Roy Keene This patch introduces --direct flag for save command. We could use this flag to save vm to a PIPE. We could saving a VM state directly to Ceph RBD images without having an intermediate file.

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Daniel P. Berrange
On Wed, Feb 22, 2017 at 09:19:15PM +0100, Martin Kletzander wrote: > On Wed, Feb 22, 2017 at 02:44:01PM -0500, Laine Stump wrote: > > On 02/22/2017 12:52 PM, Daniel P. Berrange wrote: > > > One of the conditions in qemuDomainDeviceCalculatePCIConnectFlags > > > was missing a break that could

Re: [libvirt] [PATCH 4/4] Add ATTRIBUTE_FALLTHROUGH for switch cases without break

2017-02-23 Thread Daniel P. Berrange
On Wed, Feb 22, 2017 at 02:49:12PM -0600, Eric Blake wrote: > On 02/22/2017 11:52 AM, Daniel P. Berrange wrote: > > In GCC 7 there is a new warning triggered when a switch > > case has a conditional statement (eg if ... else...) and > > some of the code paths fallthrough to the next switch > >

[libvirt] [PATCH 0/2] qemu: Small fix and validate the domain that actually will be started

2017-02-23 Thread Marc Hartmayer
Marc Hartmayer (2): qemu: Fix incorrect jump labels in error paths qemu: Validate the domain after marking the current domain as transient src/qemu/qemu_process.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) -- 2.5.5 -- libvir-list mailing list

[libvirt] [PATCH 1/2] qemu: Fix incorrect jump labels in error paths

2017-02-23 Thread Marc Hartmayer
Fix incorrect jump labels in error paths as the stop jump is only needed if the driver has already changed the state. For example 'virAtomicIntInc(>nactive)' will be 'reverted' in the qemuProcessStop call. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski

[libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-23 Thread Marc Hartmayer
Validate the domain that actually will be started. It's semantically more clear and also it can detect failures that may have happened in virDomainObjSetDefTransient(). Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by:

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Daniel P. Berrange
On Wed, Feb 22, 2017 at 02:52:08PM -0600, Eric Blake wrote: > On 02/22/2017 11:52 AM, Daniel P. Berrange wrote: > > One of the conditions in qemuDomainDeviceCalculatePCIConnectFlags > > was missing a break that could result it in falling through to > > an incorrect codepath. > > > >

Re: [libvirt] [PATCH 3/4] qemu: add missing break in qemuDomainDeviceCalculatePCIConnectFlags

2017-02-23 Thread Daniel P. Berrange
On Wed, Feb 22, 2017 at 03:00:41PM -0600, Eric Blake wrote: > On 02/22/2017 01:44 PM, Laine Stump wrote: > > On 02/22/2017 12:52 PM, Daniel P. Berrange wrote: > >> One of the conditions in qemuDomainDeviceCalculatePCIConnectFlags > >> was missing a break that could result it in falling through to

Re: [libvirt] [PATCH 1/4] Use explicit boolean comparison in OOM check

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 09:41:12AM +0100, Michal Privoznik wrote: > On 02/22/2017 06:52 PM, Daniel P. Berrange wrote: > > GCC 7 gets upset by > > > >if (!tmp && (size * count)) > > > > warning > > > > util/viralloc.c: In function 'virReallocN': > > util/viralloc.c:246:23: error: '*' in

[libvirt] [PATCH] qemu: Don't update physical storage size of empty drives

2017-02-23 Thread Peter Krempa
Previously the code called virStorageSourceUpdateBlockPhysicalSize which did not do anything on empty drives since it worked only on block devices. After the refactor in c5f6151390 it's called for all devices and thus attempts to deref the NULL path of empty drives. Add a check that skips the

Re: [libvirt] [PATCH RESEND] vz: make more accurate closing connection to sdk

2017-02-23 Thread Michal Privoznik
On 02/03/2017 08:01 AM, Nikolay Shirokovskiy wrote: > Current code for example can call unsubscribe if connection > succeeds but subscribing fails. This will probabaly lead > only to spurious error messages without any actual inconsistencies > but nevertheless. > --- > src/vz/vz_driver.c | 9

[libvirt] [PATCH 12/14] qemu_hotplug: Relabel memdev

2017-02-23 Thread Michal Privoznik
Now that we have APIs for relabel memdevs on hotplug, fill in the missing implementation in qemu hotplug code. The qemuSecurity wrappers might look like overkill for now, because qemu namespace code does not deal with the nvdimms yet. Nor does our cgroup code. But hey, there's cgroup_device_acl

[libvirt] [PATCH 10/14] security: Introduce internal APIs for memdev labelling

2017-02-23 Thread Michal Privoznik
These APIs will be used whenever we are hot (un-)plugging a memdev. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms| 2 ++ src/security/security_driver.h | 9 +++ src/security/security_manager.c | 56 +

[libvirt] [PATCH 13/14] qemu: Allow nvdimm in devices CGroups

2017-02-23 Thread Michal Privoznik
Some users might want to pass a blockdev or a chardev as a backend for NVDIMM. In fact, this is expected to be the mostly used configuration. Therefore libvirt should allow the device in devices CGroup then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_cgroup.c | 49

[libvirt] [PATCH 08/14] security_dac: Label host side of NVDIMM

2017-02-23 Thread Michal Privoznik
When domain is being started up, we ought to relabel the host side of NVDIMM so qemu has access to it. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 73 + 1 file changed, 73 insertions(+) diff --git

[libvirt] [PATCH 09/14] security_selinux: Label host side of NVDIMM

2017-02-23 Thread Michal Privoznik
When domain is being started up, we ought to relabel the host side of NVDIMM so qemu has access to it. Signed-off-by: Michal Privoznik --- src/security/security_selinux.c | 66 + 1 file changed, 66 insertions(+) diff --git

[libvirt] [PATCH 11/14] secdrivers: Implement memdev relabel APIs

2017-02-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 3 +++ src/security/security_nop.c | 19 +++ src/security/security_selinux.c | 3 +++ 3 files changed, 25 insertions(+) diff --git a/src/security/security_dac.c

[libvirt] [PATCH 05/14] qemu: Implement NVDIMM

2017-02-23 Thread Michal Privoznik
So, majority of the code is just ready as-is. Well, with one slight change: differentiate between dimm and nvdimm in places like device alias generation, generating the command line and so on. Speaking of the command line, we also need to append 'nvdimm=on' to the '-machine' argument so that the

[libvirt] [PATCH 07/14] qemu: Implement @access for banks

2017-02-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c| 11 +++-- src/qemu/qemu_command.h| 1 + src/qemu/qemu_hotplug.c| 2 +- .../qemuxml2argv-memory-hotplug-nvdimm-access.args |

[libvirt] [PATCH 03/14] Introduce NVDIMM memory model

2017-02-23 Thread Michal Privoznik
NVDIMM is new type of memory introduced into QEMU 2.6. The idea is that we have a Non-Volatile memory module that keeps the data persistent across domain reboots. At the domain XML level, we already have some representation of 'dimm' modules. Long story short, we have element that lives under .

[libvirt] [PATCH 04/14] qemu: Introduce QEMU_CAPS_DEVICE_NVDIMM

2017-02-23 Thread Michal Privoznik
Introduce a qemu capability for -device nvdimm. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +

[libvirt] [PATCH 02/14] qemuBuildMemoryBackendStr: Reorder args and update comment

2017-02-23 Thread Michal Privoznik
Frankly, this function is one big mess. A lot of arguments, complicated behaviour. It's really surprising that arguments were in random order (input and output arguments were mixed together), the documentation was outdated, the description of return values was bogus. Signed-off-by: Michal

[libvirt] [PATCH 01/14] qemu_cgroup: Only try to allow devices if devices CGroup's available

2017-02-23 Thread Michal Privoznik
When a domain needs an access to some device (be it a disk, RNG, chardev, whatever), we have to allow it in the devices CGroup (if it is available), because by default we disallow all the devices. But some of the functions that are responsible for setting up devices CGroup are lacking check

[libvirt] [PATCH 14/14] qemu: Namespaces for NVDIMM

2017-02-23 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 76 + src/qemu/qemu_domain.h | 8 ++ src/qemu/qemu_hotplug.c | 11 +++ 3 files changed, 95 insertions(+) diff --git a/src/qemu/qemu_domain.c

[libvirt] [PATCH 06/14] conf: Introduce @access to

2017-02-23 Thread Michal Privoznik
Now that NVDIMM has found its way into libvirt, users might want to fine tune some settings for each module separately. One such setting is 'share=on|off' for the memory-backend-file object. This setting - just like its name suggest already - enables sharing the nvdimm module with other

[libvirt] [PATCH 00/14] Introduce NVDIMM support

2017-02-23 Thread Michal Privoznik
NVDIMMs are new type of ultra fast storage that's plugged into DIMM slot and can hold the stored info throughout reboots. After all, NV stands for non-volatile. In virtualization world, this has an awesome advantage - less VM_EXITs on 'disk' IO. https://nvdimm.wiki.kernel.org/ Currently, there

Re: [libvirt] [PATCH] test: fix pcie-root-port-too-many test

2017-02-23 Thread Andrea Bolognani
On Wed, 2017-02-22 at 12:43 -0500, Laine Stump wrote: > While reviewing a patch from Andrea that modified this test case, I > realized that although it was "properly failing" (it's a negative > test), that it was failing for the wrong reason (the MULTIFUNCTION cap > wasn't set in the test case, so

Re: [libvirt] [PATCH 1/4] Use explicit boolean comparison in OOM check

2017-02-23 Thread Michal Privoznik
On 02/22/2017 06:52 PM, Daniel P. Berrange wrote: > GCC 7 gets upset by > >if (!tmp && (size * count)) > > warning > > util/viralloc.c: In function 'virReallocN': > util/viralloc.c:246:23: error: '*' in boolean context, suggest '&&' instead > [-Werror=int-in-bool-context] > if

<    1   2