[libvirt] [PATCH perl v2] Add constants for new perf event support

2017-02-23 Thread Nitesh Konkar
Signed-off-by: Nitesh Konkar --- Changes| 9 + Virt.xs| 9 + lib/Sys/Virt/Domain.pm | 54 ++ 3 files changed, 72 insertions(+) diff --git a/Changes b/Changes index

Re: [libvirt] [Qemu-ppc] Proposal PCI/PCIe device placement on PAPR guests

2017-02-23 Thread David Gibson
On Thu, Feb 23, 2017 at 08:23:50AM +0100, Greg Kurz wrote: > On Thu, 23 Feb 2017 13:11:52 +1100 > David Gibson wrote: > > > On Wed, Feb 22, 2017 at 12:08:25PM +0100, Greg Kurz wrote: > > > David, > > > > > > I don't see the "spapr_pci: Allow PCI-Express devices"

Re: [libvirt] [RFC PATCH 05/12] qemu: domain: Add helper to lookup disk by node name

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > Looks up a disk and it's corresponding backing chain element by node > name. > --- > src/qemu/qemu_domain.c | 44 > src/qemu/qemu_domain.h | 6 ++ > 2 files changed, 50 insertions(+) > >

Re: [libvirt] [RFC PATCH 04/12] qemu: monitor: Add support for BLOCK_WRITE_THRESHOLD event

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > The event is fired when a given block backend node (identified by the > node name) experiences a write beyond the bound set via > block-set-write-threshold QMP command. This wires up the monitor code to > extract the data and allow us receiving the

Re: [libvirt] [RFC PATCH 03/12] lib: Introduce event for tracking disk backing file write threshold

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > When using thin provisioning, management tools need to resize the disk > in certain cases. To avoid having them to poll disk fillng introduce an Typo, but a different word sounds better: s/fillng/usage/ > event whic will be fired when a given offset

Re: [libvirt] [RFC PATCH 02/12] util: storage: Add preliminary storage for node names into virStorageSource

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > --- > src/libvirt_private.syms | 1 + > src/util/virstoragefile.c | 37 + > src/util/virstoragefile.h | 9 + > 3 files changed, 47 insertions(+) > ACK -- Eric Blake eblake redhat com

[libvirt] [PATCH v2 3/3] qemu: properly escape socket path for graphics

2017-02-23 Thread Pavel Hrdina
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1352529 Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 6 -- tests/qemuxml2argvdata/qemuxml2argv-name-escape.args | 5 +++-- tests/qemuxml2argvdata/qemuxml2argv-name-escape.xml

[libvirt] [PATCH v2 1/3] util: virbuffer: introduce virBufferEscapeN

2017-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/util/virbuffer.c | 101 +++ src/util/virbuffer.h | 2 + tests/virbuftest.c | 41 +++ 4 files changed, 145 insertions(+) diff

Re: [libvirt] [RFC PATCH 01/12] util: storage: Split out useful bits of virStorageFileParseChainIndex

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > The function has very specific semantics. Split out the part that parses > the backing store specification string into a separate helper so that it > can be reused later while keeping the wrapper with existing semantics. > > Note that

[libvirt] [PATCH v2 2/3] util: virqemu: introduce virQEMUBuildBufferEscape

2017-02-23 Thread Pavel Hrdina
This will eventually replace virQEMUBuildBufferEscapeComma, however it's not possible right now. Some parts of the code that uses the old function needs to be refactored. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/util/virqemu.c | 17

[libvirt] [PATCH v2 0/3] introduce virBufferEscapeN and fix escape bug

2017-02-23 Thread Pavel Hrdina
I've dropped the STRCAT patches in v2. The whole purpose of the STRCAT was to avoid calling *strcspn* several times but it was probably a bad call. Now we call that function for each pair but if no escaping is required we at least don't allocate the structure for that pair and later in the

Re: [libvirt] [PATCH v3 0/3] target-i386: Implement query-cpu-model-expansion

2017-02-23 Thread Eduardo Habkost
On Wed, Feb 22, 2017 at 04:00:26PM -0300, Eduardo Habkost wrote: > This series implements query-cpu-model-expansion on target-i386. > > Changes v2 -> v3: > - > > * Rebased on top of my x86-next branch: > https://github.com/ehabkost/qemu x86-next > * Added new patch that will

Re: [libvirt] [RFC PATCH 00/12] Add block write threshold event

2017-02-23 Thread Eric Blake
On 02/23/2017 01:21 PM, Peter Krempa wrote: > Since I'm a procrastinator and I wanted to do this after full node-name > support > is added I'm kind of late for this release here. Since oVirt is asking for > this > feature for a very long time I would like to deliver it ASAP though. Thanks for

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:15PM +0100, Jiri Denemark wrote: > 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

[libvirt] [RFC PATCH 12/12] qemu: WIP: lookup nodenames

2017-02-23 Thread Peter Krempa
--- src/qemu/qemu_domain.h | 1 + src/qemu/qemu_monitor.c | 11 ++- src/qemu/qemu_monitor_json.c | 8 +++- src/qemu/qemu_process.c | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index

[libvirt] [RFC PATCH 11/12] qemu: implement qemuDomainSetBlockThreshold

2017-02-23 Thread Peter Krempa
Add code to call the appropriate monitor command and code to lookup the given disk backing chain member. --- src/qemu/qemu_driver.c | 64 src/qemu/qemu_monitor.c | 13 + src/qemu/qemu_monitor.h | 5

[libvirt] [RFC PATCH 08/12] lib: Add API for setting the threshold size for VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD

2017-02-23 Thread Peter Krempa
The new API can be used to configure the threshold when VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD should be fired. --- include/libvirt/libvirt-domain.h | 5 src/driver-hypervisor.h | 8 +++ src/libvirt-domain.c | 51

[libvirt] [RFC PATCH 09/12] virsh: Implement 'blockthreshold' command to call virDomainSetBlockThreshold

2017-02-23 Thread Peter Krempa
Add a simple wrapper which will allow to set the threshold for delivering the event. --- tools/virsh-domain.c | 63 tools/virsh.pod | 8 +++ 2 files changed, 71 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c

[libvirt] [RFC PATCH 10/12] qemu: domain: Add helper to look up disk soruce by the backing store string

2017-02-23 Thread Peter Krempa
--- src/qemu/qemu_domain.c | 37 + src/qemu/qemu_domain.h | 3 +++ 2 files changed, 40 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b8a65cfd5..1740a9d80 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@

[libvirt] [RFC PATCH 07/12] qemu: process: Wire up firing of the VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event

2017-02-23 Thread Peter Krempa
Bind it to qemus BLOCK_WRITE_THRESHOLD event. Look up the disk by nodename and construct the string to return. --- src/qemu/qemu_process.c | 40 1 file changed, 40 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt] [RFC PATCH 06/12] qemu: domain: Add helper to generate indexed backing store names

2017-02-23 Thread Peter Krempa
The code is currently simple, but if we later add node names, it will be necessary to generate the names based on the node name. Add a helper so that there's a central point to fix once we add self-generated node names. --- src/qemu/qemu_domain.c | 22 ++

[libvirt] [RFC PATCH 05/12] qemu: domain: Add helper to lookup disk by node name

2017-02-23 Thread Peter Krempa
Looks up a disk and it's corresponding backing chain element by node name. --- src/qemu/qemu_domain.c | 44 src/qemu/qemu_domain.h | 6 ++ 2 files changed, 50 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [RFC PATCH 04/12] qemu: monitor: Add support for BLOCK_WRITE_THRESHOLD event

2017-02-23 Thread Peter Krempa
The event is fired when a given block backend node (identified by the node name) experiences a write beyond the bound set via block-set-write-threshold QMP command. This wires up the monitor code to extract the data and allow us receiving the events and the capability. ---

[libvirt] [RFC PATCH 03/12] lib: Introduce event for tracking disk backing file write threshold

2017-02-23 Thread Peter Krempa
When using thin provisioning, management tools need to resize the disk in certain cases. To avoid having them to poll disk fillng introduce an event whic will be fired when a given offset of the storage is written by the hypervisor. Together with the API which will be added later, it will allow to

[libvirt] [RFC PATCH 00/12] Add block write threshold event

2017-02-23 Thread Peter Krempa
Since I'm a procrastinator and I wanted to do this after full node-name support is added I'm kind of late for this release here. Since oVirt is asking for this feature for a very long time I would like to deliver it ASAP though. This series adds a event which is fired once a guest writes beyond a

[libvirt] [RFC PATCH 02/12] util: storage: Add preliminary storage for node names into virStorageSource

2017-02-23 Thread Peter Krempa
--- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 37 + src/util/virstoragefile.h | 9 + 3 files changed, 47 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 69d1bc860..078cca001 100644 ---

[libvirt] [RFC PATCH 01/12] util: storage: Split out useful bits of virStorageFileParseChainIndex

2017-02-23 Thread Peter Krempa
The function has very specific semantics. Split out the part that parses the backing store specification string into a separate helper so that it can be reused later while keeping the wrapper with existing semantics. Note that virStorageFileParseChainIndex is pretty well covered by the test

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:08PM +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > > Notes: > Version 3: > - no change > > Version 2: > - no change > > src/cpu/cpu_x86.c | 147 > ++---

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:07PM +0100, 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 TCG domain is. > > Signed-off-by: Jiri Denemark

[libvirt] [PATCH v2 13/14] qemu: Set up the migrate TLS objects for target

2017-02-23 Thread John Ferlan
Support TLS for a migration is a multistep process. The target guest must be started using the "-object tls-creds-x509,endpoint=server,...". If that TLS object requires a passphrase an addition "-object security..." would also be created. The alias/id used for the TLS object is "objmigrate_tls0",

[libvirt] [PATCH v2 10/14] Add new migration flag VIR_MIGRATE_TLS

2017-02-23 Thread John Ferlan
Signed-off-by: John Ferlan --- include/libvirt/libvirt-domain.h | 8 src/qemu/qemu_migration.h| 3 ++- tools/virsh-domain.c | 7 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 11/14] qemu: Create #define for TLS configuration setup.

2017-02-23 Thread John Ferlan
Create GET_CONFIG_TLS_CERT to set up the TLS for 'chardev' TLS setting. Soon to be reused. Signed-off-by: John Ferlan --- src/qemu/qemu_conf.c | 43 +++ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git

[libvirt] [PATCH v2 08/14] qemu: Introduce qemuDomainGetTLSObjects

2017-02-23 Thread John Ferlan
Split apart and rename qemuDomainGetChardevTLSObjects in order to make a more generic API that can create the TLS JSON prop objects (secret and tls-creds-x509) to be used to create the objects Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 55

[libvirt] [PATCH v2 09/14] qemu: Add TLS params to _qemuMonitorMigrationParams

2017-02-23 Thread John Ferlan
Add the fields to support setting tls-creds and tls-hostname during a migration (either source or target) Signed-off-by: John Ferlan --- src/qemu/qemu_monitor.c | 11 --- src/qemu/qemu_monitor.h | 3 +++ src/qemu/qemu_monitor_json.c | 10 ++ 3

[libvirt] [PATCH v2 14/14] qemu: Set up the migration TLS objects for source

2017-02-23 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1300769 Modify the Begin phase to add the checks to determine whether a migration wishes to use TLS and whether it's configured including adding the secret into the priv->migSecinfo for the source domain. Modify the Perform phase in qemuMigrationRun in

[libvirt] [PATCH v2 05/14] qemu: Refactor qemuDomainGetChardevTLSObjects to converge code

2017-02-23 Thread John Ferlan
Create a qemuDomainAddChardevTLSObjects which will encapsulate the qemuDomainGetChardevTLSObjects and qemuDomainAddTLSObjects so that the callers don't need to worry about the props. Move the dev->type and haveTLS checks in to the Add function to avoid an unnecessary call to

[libvirt] [PATCH v2 02/14] qemu: Introduce qemuDomainSecretMigratePrepare

2017-02-23 Thread John Ferlan
Introduce API to Prepare a qemuDomainSecretInfoPtr to be used with a migrate or nbd TLS object Also alter the error message in ChardevPrepare when UUIDParse fails to be consistent with the message for MigratePrepare Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 48

[libvirt] [PATCH v2 06/14] qemu: Move qemuDomainSecretChardevPrepare call

2017-02-23 Thread John Ferlan
Move the call to inside the qemuDomainAddChardevTLSObjects in order to further converge the code. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git

[libvirt] [PATCH v2 12/14] conf: Introduce migrate_tls_x509_cert_dir

2017-02-23 Thread John Ferlan
Add a new TLS X.509 certificate type - "migrate". This will handle the creation of a TLS certificate capability (and possibly repository) to be used for migrations. Similar to chardev's, credentials will be handled via a libvirt secrets. Signed-off-by: John Ferlan ---

[libvirt] [PATCH v2 07/14] qemu: Move qemuDomainPrepareChardevSourceTLS call

2017-02-23 Thread John Ferlan
Move the call to inside the qemuDomainAddChardevTLSObjects in order to further converge the code. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git

[libvirt] [PATCH v2 03/14] qemu: Move exit monitor calls in failure paths

2017-02-23 Thread John Ferlan
Since qemuDomainObjExitMonitor can also generate error messages, let's move it inside any error message saving code on error paths for various hotplug add activities. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 33 - 1 file

[libvirt] [PATCH v2 00/14] Add TLS support for migration

2017-02-23 Thread John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2017-February/msg00897.html v1 cover letter reiterated: Patches 1, 3 -> 9 are primarily quite a bit of code motion in order to allow reuse of the "core" of the chardev TLS code. Theoretically speaking of course, these patches should work - I don't

[libvirt] [PATCH v2 01/14] qemu: Introduce qemuDomainSecretInfoNew

2017-02-23 Thread John Ferlan
Create a helper which will create the secinfo used for disks, hostdevs, and chardevs. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 140 ++--- 1 file changed, 74 insertions(+), 66 deletions(-) diff --git

[libvirt] [PATCH v2 04/14] qemu: Refactor hotplug to introduce qemuDomain{Add|Del}TLSObjects

2017-02-23 Thread John Ferlan
Refactor the TLS object adding code to make two separate API's that will handle the add/remove of the "secret" and "tls-creds-x509" objects including the Enter/Exit monitor commands. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 165

[libvirt] [PATCH v2 1/2] tests: Sync tests between qemuxml2argv and qemuxml2xml

2017-02-23 Thread Andrea Bolognani
In some cases, only one of the two transformations was checked; in other cases, the capabilities set differed. --- Note that the input file for the "pci-bridge" test case had to be changed to make it usable for qemuxml2argv. .../qemuxml2argvdata/qemuxml2argv-pci-bridge.args | 90 +

[libvirt] [PATCH v2 2/2] tests: Reduce QEMU_CAPS_DEVICE_{DMI_TO_, }PCI_BRIDGE usage

2017-02-23 Thread Andrea Bolognani
Now that QEMU_CAPS_DEVICE_PCI_BRIDGE is no longer checked unless a pci-bridge is really part of the configuration, and most uses of the legacy PCI controller combo have been dropped from tests that use PCIe machine types, we can drop the corresponding capabilities from a lot of test cases. ---

[libvirt] [PATCH v2 0/2] tests: Reduce QEMU_CAPS_DEVICE_{DMI_TO_, }PCI_BRIDGE usage

2017-02-23 Thread Andrea Bolognani
Changes from v1: * don't drop capabilities for a bunch of test cases, so that potential regressions will be still caught. Andrea Bolognani (2): tests: Sync tests between qemuxml2argv and qemuxml2xml tests: Reduce QEMU_CAPS_DEVICE_{DMI_TO_, }PCI_BRIDGE usage

Re: [libvirt] [PATCH 3/5] util: virbuffer: introduce virBufferEscapeN

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 05:51:21PM +0100, Pavel Hrdina wrote: > On Thu, Feb 23, 2017 at 04:32:32PM +, Daniel P. Berrange wrote: > > On Thu, Feb 23, 2017 at 04:26:58PM +0100, Pavel Hrdina wrote: > > > Signed-off-by: Pavel Hrdina > > > --- > > > src/libvirt_private.syms |

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

2017-02-23 Thread Peter Krempa
On Thu, Feb 23, 2017 at 17:22:44 +0100, Marc Hartmayer wrote: > On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik > wrote: > > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: > >> Validate the domain that actually will be started. It's semantically > >> more clear and

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:06PM +0100, Jiri Denemark wrote: > 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: >

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

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 09:07:59PM +0400, Roman Bogorodskiy wrote: > Daniel P. Berrange wrote: > > > On Wed, Feb 22, 2017 at 05:52:05PM +, 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 >

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

2017-02-23 Thread John Ferlan
On 02/23/2017 09:19 AM, Jiri Denemark wrote: > 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,

Re: [libvirt] [PATCH v3 07/28] qemu: Prepare for more types in qemuMonitorCPUModelInfo

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:05PM +0100, Jiri Denemark wrote: > 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 +-- >

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:04PM +0100, Jiri Denemark wrote: > 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 > >

Re: [libvirt] [PATCH v3 05/28] docs: Update description of the host-model CPU mode

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:03PM +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > > Notes: > Version 3: > - reworded and updated documentation > > Version 2: > - no change > > docs/formatdomain.html.in | 37

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

2017-02-23 Thread Roman Bogorodskiy
Daniel P. Berrange wrote: > On Wed, Feb 22, 2017 at 05:52:05PM +, 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 > > statement. e.g.

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:01PM +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > > Notes: > Version 3: > - no change > > Version 2: > - no change > > src/qemu/qemu_capabilities.c | 109 > ++-

Re: [libvirt] [PATCH] qemuProcessInit: Jump onto correct label in case of error

2017-02-23 Thread Michal Privoznik
On 02/23/2017 05:40 PM, Marc Hartmayer wrote: > On Thu, Feb 23, 2017 at 05:15 PM +0100, Michal Privoznik > wrote: >> After eca76884ea in case of error in qemuDomainSetPrivatePaths() >> in pretended start we jump to stop. I've changed this during >> review from 'cleanup'

Re: [libvirt] [PATCH 3/5] util: virbuffer: introduce virBufferEscapeN

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 04:32:32PM +, Daniel P. Berrange wrote: > On Thu, Feb 23, 2017 at 04:26:58PM +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/libvirt_private.syms | 1 + > > src/util/virbuffer.c | 104 > >

Re: [libvirt] [PATCH] qemuProcessInit: Jump onto correct label in case of error

2017-02-23 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 05:15 PM +0100, Michal Privoznik wrote: > After eca76884ea in case of error in qemuDomainSetPrivatePaths() > in pretended start we jump to stop. I've changed this during > review from 'cleanup' which turned out to be correct. Well, sort > of. We can't

Re: [libvirt] [PATCH 1/5] util: virstring: introduce virStrcat and VIR_STRCAT

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 05:25:38PM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 05:15:12PM +0100, Pavel Hrdina wrote: > >On Thu, Feb 23, 2017 at 05:06:53PM +0100, Martin Kletzander wrote: > >> On Thu, Feb 23, 2017 at 04:26:56PM +0100, Pavel Hrdina wrote: > >> >Signed-off-by: Pavel

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

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 05:22:44PM +0100, Marc Hartmayer wrote: > On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik > wrote: > > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: > >> Validate the domain that actually will be started. It's semantically > >> more clear and

Re: [libvirt] [PATCH 3/5] util: virbuffer: introduce virBufferEscapeN

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 04:26:58PM +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/libvirt_private.syms | 1 + > src/util/virbuffer.c | 104 > +++ > src/util/virbuffer.h | 2 + > tests/virbuftest.c

Re: [libvirt] [PATCH 2/5] util: use VIR_STRCAT instead of strcat

2017-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2017 at 05:15:37PM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 04:26:57PM +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > cfg.mk| 14 -- > > src/storage/storage_backend_logical.c |

Re: [libvirt] [PATCH 1/5] util: virstring: introduce virStrcat and VIR_STRCAT

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 05:15:12PM +0100, Pavel Hrdina wrote: On Thu, Feb 23, 2017 at 05:06:53PM +0100, Martin Kletzander wrote: On Thu, Feb 23, 2017 at 04:26:56PM +0100, Pavel Hrdina wrote: >Signed-off-by: Pavel Hrdina >--- > cfg.mk | 2 +- >

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

2017-02-23 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik wrote: > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >> Validate the domain that actually will be started. It's semantically >> more clear and also it can detect failures that may have happened in >>

Re: [libvirt] [PATCH 2/5] util: use VIR_STRCAT instead of strcat

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 05:15:37PM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 04:26:57PM +0100, Pavel Hrdina wrote: > >Signed-off-by: Pavel Hrdina > >--- > > cfg.mk| 14 -- > > src/storage/storage_backend_logical.c | 6

[libvirt] [PATCH] qemuProcessInit: Jump onto correct label in case of error

2017-02-23 Thread Michal Privoznik
After eca76884ea in case of error in qemuDomainSetPrivatePaths() in pretended start we jump to stop. I've changed this during review from 'cleanup' which turned out to be correct. Well, sort of. We can't call qemuProcessStop() as it decrements driver->nactive and we did not increment it. However,

Re: [libvirt] [PATCH 1/5] util: virstring: introduce virStrcat and VIR_STRCAT

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 05:06:53PM +0100, Martin Kletzander wrote: > On Thu, Feb 23, 2017 at 04:26:56PM +0100, Pavel Hrdina wrote: > >Signed-off-by: Pavel Hrdina > >--- > > cfg.mk | 2 +- > > src/libvirt_private.syms | 2 ++ > > src/util/virstring.c | 70

Re: [libvirt] [PATCH 2/5] util: use VIR_STRCAT instead of strcat

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 04:26:57PM +0100, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- cfg.mk| 14 -- src/storage/storage_backend_logical.c | 6 +++--- src/test/test_driver.c| 2 +- src/util/vircgroup.c

Re: [libvirt] [PATCH 1/5] util: virstring: introduce virStrcat and VIR_STRCAT

2017-02-23 Thread Martin Kletzander
On Thu, Feb 23, 2017 at 04:26:56PM +0100, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- cfg.mk | 2 +- src/libvirt_private.syms | 2 ++ src/util/virstring.c | 70 src/util/virstring.h | 27

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

2017-02-23 Thread Michal Privoznik
On 02/23/2017 04:57 PM, Marc Hartmayer wrote: > On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik > wrote: >> On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >>> Fix incorrect jump labels in error paths as the stop jump is only >>> needed if the driver has already

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

2017-02-23 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik wrote: > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >> Fix incorrect jump labels in error paths as the stop jump is only >> needed if the driver has already changed the state. For example >>

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:15:00PM +0100, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > > Notes: > Version 3: > - no change > > Version 2: > - no change > > .../domaincapsschemadata/qemu_2.9.0-tcg.x86_64.xml | 116 > +

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

2017-02-23 Thread Pavel Hrdina
On Thu, Feb 23, 2017 at 03:14:59PM +0100, Jiri Denemark wrote: > 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

Re: [libvirt] 1GB huge pages and incompatible VM memory size

2017-02-23 Thread Michal Privoznik
On 02/23/2017 03:26 PM, Matt Fleming wrote: > On Tue, 21 Feb, at 11:23:52AM, Michal Privoznik wrote: >> >> Jim, >> >> what is the actual problem? I've tried to reproduce this by running vm >> with 3.5G RAM backed by 1GB huge pages and the guest runs just fine. I >> mean kvm guest. This is because

[libvirt] [PATCH 4/5] util: virqemu: introduce virQEMUBuildBufferEscape

2017-02-23 Thread Pavel Hrdina
This will eventually replace virQEMUBuildBufferEscapeComma, however it's not possible right now. Some parts of the code that uses the old function needs to be refactored. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/util/virqemu.c | 17

[libvirt] [PATCH 5/5] qemu: properly escape socket path for graphics

2017-02-23 Thread Pavel Hrdina
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1352529 Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c | 6 -- tests/qemuxml2argvdata/qemuxml2argv-name-escape.args | 5 +++-- tests/qemuxml2argvdata/qemuxml2argv-name-escape.xml

[libvirt] [PATCH 2/5] util: use VIR_STRCAT instead of strcat

2017-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- cfg.mk| 14 -- src/storage/storage_backend_logical.c | 6 +++--- src/test/test_driver.c| 2 +- src/util/vircgroup.c | 4 +--- src/xen/xend_internal.c

[libvirt] [PATCH 3/5] util: virbuffer: introduce virBufferEscapeN

2017-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/util/virbuffer.c | 104 +++ src/util/virbuffer.h | 2 + tests/virbuftest.c | 41 +++ 4 files changed, 148 insertions(+) diff

[libvirt] [PATCH 1/5] util: virstring: introduce virStrcat and VIR_STRCAT

2017-02-23 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- cfg.mk | 2 +- src/libvirt_private.syms | 2 ++ src/util/virstring.c | 70 src/util/virstring.h | 27 +++ tests/virstringtest.c| 49

[libvirt] [PATCH 0/5] virstring and virbuffer improvements and bug fix

2017-02-23 Thread Pavel Hrdina
Pavel Hrdina (5): util: virstring: introduce virStrcat and VIR_STRCAT util: use VIR_STRCAT instead of strcat util: virbuffer: introduce virBufferEscapeN util: virqemu: introduce virQEMUBuildBufferEscape qemu: properly escape socket path for graphics cfg.mk

Re: [libvirt] 1GB huge pages and incompatible VM memory size

2017-02-23 Thread Matt Fleming
On Tue, 21 Feb, at 11:23:52AM, Michal Privoznik wrote: > > Jim, > > what is the actual problem? I've tried to reproduce this by running vm > with 3.5G RAM backed by 1GB huge pages and the guest runs just fine. I > mean kvm guest. This is because at the cmd line level there is aligned > value: >

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

2017-02-23 Thread Michal Privoznik
On 02/23/2017 10:02 AM, Michal Privoznik wrote: > Introduce a qemu capability for -device nvdimm. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_capabilities.c | 2 ++ > src/qemu/qemu_capabilities.h | 1 + >

[libvirt] [PATCH 10/10] news: Update the news.xml about perf events added

2017-02-23 Thread Nitesh Konkar
Signed-off-by: Nitesh Konkar --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 74dfe9a..9a5f4c5 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -130,6 +130,17 @@ driver with all

[libvirt] [PATCH v2 08/10] perf: add alignment_faults software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the alignment_faults perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 07/10] perf: add page_faults_maj software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the page_faults_maj perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 06/10] perf: add page_faults_min software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the page_faults_min perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 09/10] perf: add emulation_faults software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the emulation_faults perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 9 + docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 05/10] perf: add cpu_migrations software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the cpu_migrations perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h| 9

[libvirt] [PATCH v2 04/10] perf: add context_switches software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the context_switches perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 7 +++ docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h

[libvirt] [PATCH v2 03/10] perf: add page_faults software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the page_faults perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h| 11

[libvirt] [PATCH v2 02/10] perf: add task_clock software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the task_clock perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h| 11

[libvirt] [PATCH v2 01/10] perf: add cpu_clock software perf event support

2017-02-23 Thread Nitesh Konkar
This patch adds support and documentation for the cpu_clock perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 8 docs/schemas/domaincommon.rng | 1 + include/libvirt/libvirt-domain.h| 11

[libvirt] [PATCH v2 00/10] perf: Add software perf events

2017-02-23 Thread Nitesh Konkar
This patch series adds software perf events. The perl and go patches shall follow shortly. Nitesh Konkar (10): perf: add cpu_clock software perf event support perf: add task_clock software perf event support perf: add page_faults software perf event support perf: add context_switches

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

2017-02-23 Thread Michal Privoznik
On 02/23/2017 10:44 AM, Marc Hartmayer wrote: > 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

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

2017-02-23 Thread Michal Privoznik
On 02/23/2017 10:44 AM, Marc Hartmayer wrote: > 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 >

[libvirt] [PATCH v3 24/28] cputest: Convert all json data files to query-cpu-model-expansion

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

[libvirt] [PATCH v3 26/28] cputest: Drop obsolete 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/cputestdata/x86_64-cpuid-A10-5800K.json | 77 --- tests/cputestdata/x86_64-cpuid-Core-i5-2500.json | 88 --

[libvirt] [PATCH v3 22/28] cputest: Use virArch enum rather then strings

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

  1   2   >