Re: [libvirt] [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

2019-04-11 Thread Cole Robinson
On 4/11/19 12:33 PM, Daniel P. Berrangé wrote: > On Thu, Apr 11, 2019 at 12:27:56PM -0400, Cole Robinson wrote: >> On 4/11/19 6:57 AM, Daniel P. Berrangé wrote: >>> On Mon, Apr 08, 2019 at 11:48:18AM -0400, Cole Robinson wrote: This allows us to raise error messages from virEnum*String functio

Re: [libvirt] [PATCH 0/3] vz: fixes after commits refactoring common snapshot code

2019-04-11 Thread Maxim Nestratov
08-Apr-19 11:42, Nikolay Shirokovskiy пишет: > Nikolay Shirokovskiy (3): >vz: fix for tracking current snapshot >vz: fixes: snapshot: Switch type of virDomainSnapshotObj.def >vz: fixes: snapshot: Factor out virDomainMomentDef class > > src/vz/vz_driver.c | 36 +++-

Re: [libvirt] [PATCH 0/4] qemu_hotplug: Check for duplicate drive addresses

2019-04-11 Thread Daniel Henrique Barboza
On 4/11/19 11:34 AM, Michal Privoznik wrote: This is an alternative approach to: https://www.redhat.com/archives/libvir-list/2019-March/msg0.html which caused regression to which a proposed fix is here: https://www.redhat.com/archives/libvir-list/2019-April/msg00756.html One of the sell

Re: [libvirt] [PATCH for-QEMU-4.1] Declare -realtime as deprecated

2019-04-11 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 07:53:45PM +0200, Thomas Huth wrote: > The old -realtime mlock=on|off parameter does exactly the same as the > new -overcommit mem-lock=on|off parameter. Additionally, "-realtime" > does not activate any additional "realtime" capabilities as the name > might indicate. We sho

[libvirt] [PATCH for-QEMU-4.1] Declare -realtime as deprecated

2019-04-11 Thread Thomas Huth
The old -realtime mlock=on|off parameter does exactly the same as the new -overcommit mem-lock=on|off parameter. Additionally, "-realtime" does not activate any additional "realtime" capabilities as the name might indicate. We should avoid to confuse the users this way, so let's deprecate the old -

Re: [libvirt] [PATCH 2/2] m4: sasl: Use pkg-config

2019-04-11 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 06:35:04PM +0200, Andrea Bolognani wrote: > Since commit 4e75b0a00fb4 we support SASL 2.1.26 and newer > releases only, all of which ship a .pc file. Using pkg-config > allows FreeBSD builds to pick up the dependency automatically. > > Signed-off-by: Andrea Bolognani > ---

Re: [libvirt] [PATCH 1/2] src: Include SASL_CFLAGS where appropriate

2019-04-11 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 06:35:03PM +0200, Andrea Bolognani wrote: > A bunch of files include src/rpc/virnetsaslcontext.h, which > in turn includes , and without the corresponding > CFLAGS the compiler can't locate the latter if it happens to > be installed outside of the default include path as is

[libvirt] [PATCH v5] tests: perform cross compiler builds on GitLab CI

2019-04-11 Thread Daniel P . Berrangé
GitLab CI provides some shared build runners that use Docker containers. This resource can usefully run cross-compiled builds since all other CI build testing is currently x86 only, and Travis CI is already very busy testing native builds. Signed-off-by: Daniel P. Berrangé --- Changed in v4: -

Re: [libvirt] [PATCH] build: set --without-firewalld-zone in configure commandline for Fedora 30

2019-04-11 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 01:03:19PM -0400, Laine Stump wrote: > The firewalld package in Fedora 30 didn't get support for rich rule > priorities, which is required by the libvirt zonefile that's installed > when the build is configured with --with-firewalld-zone, so we need to > set --without-firewa

Re: [libvirt] [PATCH v2 0/2] qemu: Honor memory mode='strict'

2019-04-11 Thread Daniel Henrique Barboza
On 4/11/19 11:56 AM, Michal Privoznik wrote: On 4/11/19 4:23 PM, Daniel Henrique Barboza wrote: Hi, I've tested these patches again, twice, in similar setups like I tested the first version (first in a Power8, then in a Power9 server). Same results, though. Libvirt will not avoid the launch

Re: [libvirt] [PATCH] build: set --without-firewalld-zone in configure commandline for Fedora 30

2019-04-11 Thread Eric Garver
On Thu, Apr 11, 2019 at 01:03:19PM -0400, Laine Stump wrote: > The firewalld package in Fedora 30 didn't get support for rich rule > priorities, which is required by the libvirt zonefile that's installed > when the build is configured with --with-firewalld-zone, so we need to > set --without-firewa

[libvirt] [PATCH] build: set --without-firewalld-zone in configure commandline for Fedora 30

2019-04-11 Thread Laine Stump
The firewalld package in Fedora 30 didn't get support for rich rule priorities, which is required by the libvirt zonefile that's installed when the build is configured with --with-firewalld-zone, so we need to set --without-firewalld-zone for that version of Fedora. The needed feature is already up

Re: [libvirt] [PATCH 4/4] Add string labels to all VIR_ENUM_IMPL calls

2019-04-11 Thread Cole Robinson
On 4/11/19 6:58 AM, Daniel P. Berrangé wrote: > On Mon, Apr 08, 2019 at 11:48:19AM -0400, Cole Robinson wrote: >> Add string labels to all VIR_ENUM_IMPL calls, which will be used >> to eventually raise errors from virEnum*String functions. >> >> I roughly tried to follow these rules: >> >> 1) If it

[libvirt] [PATCH 2/2] m4: sasl: Use pkg-config

2019-04-11 Thread Andrea Bolognani
Since commit 4e75b0a00fb4 we support SASL 2.1.26 and newer releases only, all of which ship a .pc file. Using pkg-config allows FreeBSD builds to pick up the dependency automatically. Signed-off-by: Andrea Bolognani --- m4/virt-sasl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt] [PATCH 1/2] src: Include SASL_CFLAGS where appropriate

2019-04-11 Thread Andrea Bolognani
A bunch of files include src/rpc/virnetsaslcontext.h, which in turn includes , and without the corresponding CFLAGS the compiler can't locate the latter if it happens to be installed outside of the default include path as is the case, for example, on FreeBSD. Signed-off-by: Andrea Bolognani ---

[libvirt] [PATCH 0/2] sasl: Fix CFLAGS use, switch to pkg-config

2019-04-11 Thread Andrea Bolognani
Andrea Bolognani (2): src: Include SASL_CFLAGS where appropriate m4: sasl: Use pkg-config m4/virt-sasl.m4 | 2 +- src/admin/Makefile.inc.am | 6 ++ src/locking/Makefile.inc.am | 12 src/logging/Makefile.inc.am | 6 ++ src/remote/Makefile.inc.am | 6

Re: [libvirt] [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

2019-04-11 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 12:27:56PM -0400, Cole Robinson wrote: > On 4/11/19 6:57 AM, Daniel P. Berrangé wrote: > > On Mon, Apr 08, 2019 at 11:48:18AM -0400, Cole Robinson wrote: > >> This allows us to raise error messages from virEnum*String functions. > >> > >> FromString failure will report this

Re: [libvirt] [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

2019-04-11 Thread Cole Robinson
On 4/11/19 6:57 AM, Daniel P. Berrangé wrote: > On Mon, Apr 08, 2019 at 11:48:18AM -0400, Cole Robinson wrote: >> This allows us to raise error messages from virEnum*String functions. >> >> FromString failure will report this error for value '' >> >> invalid argument: Unknown 'domain type' va

Re: [libvirt] [PATCH 34/36] vircpuhost: Add support for reading MSRs

2019-04-11 Thread Daniel P . Berrangé
On Mon, Apr 08, 2019 at 10:42:38AM +0200, Jiri Denemark wrote: > The new virHostCPUGetMSR internal API will try to read the MSR from > /dev/cpu/0/msr and if it is not possible (the device does not exist or > libvirt is running unprivileged), it will fallback to asking KVM for the > MSR using KVM_GE

Re: [libvirt] [PATCH v4 7/7] tests: perform cross compiler builds on GitLab CI

2019-04-11 Thread Daniel P . Berrangé
On Wed, Apr 10, 2019 at 02:15:44PM +0200, Andrea Bolognani wrote: > On Wed, 2019-04-03 at 11:41 +0100, Daniel P. Berrangé wrote: > > GitLab CI provides some shared build runners that use Docker containers. > > This resource can usefully run cross-compiled builds since all other CI > > build testing

Re: [libvirt] [PATCH v5 1/2] qemu_domain: NVLink2 bridge detection function for PPC64

2019-04-11 Thread Erik Skultety
On Thu, Apr 04, 2019 at 10:40:38AM -0300, Daniel Henrique Barboza wrote: > The NVLink2 support in QEMU implements the detection of NVLink2 > capable devices by verifying the attributes of the VFIO mem region > QEMU allocates for the NVIDIA GPUs. To properly allocate an > adequate amount of memLock,

[libvirt] [PATCH] virresctrl: fix MBA memory leak

2019-04-11 Thread Pavel Hrdina
The 'bandwidths' variable is allocated using VIR_RESIZE_N so it has to be freed as well. ==118315== 8 bytes in 1 blocks are definitely lost in loss record 299 of 2,401 ==118315==at 0x4C29DAD: malloc (vg_replace_malloc.c:308) ==118315==by 0x4C2C100: realloc (vg_replace_malloc.c:836) ==11831

Re: [libvirt] [PATCH v4 4/7] travis: remove display of test-suite.log from macOS

2019-04-11 Thread Andrea Bolognani
On Thu, 2019-04-11 at 15:59 +0100, Daniel P. Berrangé wrote: > On Wed, Apr 10, 2019 at 01:03:32PM +0200, Andrea Bolognani wrote: > > On Wed, 2019-04-03 at 11:41 +0100, Daniel P. Berrangé wrote: > > [...] > > > ./autogen.sh --prefix=\$(pwd)/install-root && > > > make -j3 && > > >

Re: [libvirt] [PATCH v4 4/7] travis: remove display of test-suite.log from macOS

2019-04-11 Thread Daniel P . Berrangé
On Wed, Apr 10, 2019 at 01:03:32PM +0200, Andrea Bolognani wrote: > On Wed, 2019-04-03 at 11:41 +0100, Daniel P. Berrangé wrote: > [...] > > ./autogen.sh --prefix=\$(pwd)/install-root && > > make -j3 && > > make -j3 install && > > -make -j3 dist || > > -(

Re: [libvirt] [PATCH v2 0/2] qemu: Honor memory mode='strict'

2019-04-11 Thread Michal Privoznik
On 4/11/19 4:23 PM, Daniel Henrique Barboza wrote: Hi, I've tested these patches again, twice, in similar setups like I tested the first version (first in a Power8, then in a Power9 server). Same results, though. Libvirt will not avoid the launch of a pseries guest, with numanode=strict, even i

Re: [libvirt] [PATCH v4 1/7] tests: add targets for building libvirt inside Docker containers

2019-04-11 Thread Daniel P . Berrangé
On Wed, Apr 10, 2019 at 12:52:12PM +0200, Andrea Bolognani wrote: > On Wed, 2019-04-03 at 11:41 +0100, Daniel P. Berrangé wrote: > [...] > > It is also possible to do cross compiled builds via the Debian containers > > > >make ci-build@debian-9-cross-s390x > > You're not advertising cross-com

[libvirt] [PATCH 4/4] Revert "domain_conf: check device address before attach"

2019-04-11 Thread Michal Privoznik
This reverts commit f1d658531c7b23b8796a0faa4411c3531996. Turns out, this caused a regression. There is this (perhaps less known) semantic of virDomainAttachDevice() where if the device the API is trying to attach is a CDROM/floppy that is already in the domain the attach request is handled as

[libvirt] [PATCH 2/4] qemuhotplugtest: Don't plug a SCSI disk at unit 7

2019-04-11 Thread Michal Privoznik
Unit number 7 is kind of special. It's reserved for SCSI controller. The comment in virDomainSCSIDriveAddressIsUsed() summarizes that pretty nicely. Libvirt would never generate such address. Signed-off-by: Michal Privoznik --- tests/qemuhotplugtest.c | 2 +-

[libvirt] [PATCH 0/4] qemu_hotplug: Check for duplicate drive addresses

2019-04-11 Thread Michal Privoznik
This is an alternative approach to: https://www.redhat.com/archives/libvir-list/2019-March/msg0.html which caused regression to which a proposed fix is here: https://www.redhat.com/archives/libvir-list/2019-April/msg00756.html One of the selling points was that having this check in virDomai

[libvirt] [PATCH 3/4] qemu_hotplug: Check for duplicate drive addresses

2019-04-11 Thread Michal Privoznik
This tries to fix the same problem as f1d65853000 but it's doing so in a less invasive way. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index ef14b1977c..5b6afe5c2b 100644

[libvirt] [PATCH 1/4] conf: Expose virDomainSCSIDriveAddressIsUsed

2019-04-11 Thread Michal Privoznik
This function checks if given drive address is already present in passed domain definition. Expose the function as it will be used shortly. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed, 6 i

Re: [libvirt] [PATCH v2 0/2] qemu: Honor memory mode='strict'

2019-04-11 Thread Daniel Henrique Barboza
Hi, I've tested these patches again, twice, in similar setups like I tested the first version (first in a Power8, then in a Power9 server). Same results, though. Libvirt will not avoid the launch of a pseries guest, with numanode=strict, even if the numa node does not have available RAM. If I st

Re: [libvirt] [PATCH v2 3/3] docs: add advanced search capabilities

2019-04-11 Thread Daniel P . Berrangé
On Fri, Apr 05, 2019 at 05:54:41PM +0200, Andrea Bolognani wrote: > On Fri, 2019-04-05 at 16:12 +0100, Daniel P. Berrangé wrote: > [...] > > +} else if (what == "devs") { > > +form.setAttribute("action", "https://google.com/search";); > > +newq.setAttribute("name", "q"); > > +

Re: [libvirt] [PATCH] domaincapstest: Call virFileWrapperClearPrefixes only on non-WIN32

2019-04-11 Thread Andrea Bolognani
On Thu, 2019-04-11 at 12:33 +0100, Daniel P. Berrangé wrote: > On Wed, Apr 10, 2019 at 03:12:18PM +0200, Michal Privoznik wrote: > > The virFileWrapperClearPrefixes() function is defined only when > > building for non-WIN32. > > > > Signed-off-by: Michal Privoznik > > --- > > > > Technically a b

Re: [libvirt] [PATCH 2/2] domain_conf: allow CDROM/Floppy media change with attach-device

2019-04-11 Thread Michal Privoznik
On 4/10/19 11:49 PM, Daniel Henrique Barboza wrote: Commit f1d6585300 ("domain_conf: check device address before attach") added an address verification for all devices, avoiding calling the driver attach() for a case in which we know that the device would have duplicated address. That commit fai

Re: [libvirt] [PATCH v2 3/3] docs: add advanced search capabilities

2019-04-11 Thread Andrea Bolognani
On Thu, 2019-04-11 at 12:24 +0100, Daniel P. Berrangé wrote: > On Fri, Apr 05, 2019 at 05:54:41PM +0200, Andrea Bolognani wrote: > > On Fri, 2019-04-05 at 16:12 +0100, Daniel P. Berrangé wrote: > > > @@ -91,4 +92,10 @@ > > > float: none; > > > margin-bottom: 2em; > > > } > > > +#advanc

Re: [libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-11 Thread Andrea Bolognani
On Thu, 2019-04-11 at 14:15 +0200, Ján Tomko wrote: > On Thu, Apr 11, 2019 at 12:44:16PM +0200, Andrea Bolognani wrote: > > On Mon, 2019-04-01 at 12:47 -0400, Cole Robinson wrote: > > > if (virAsprintf(&info->outfile, > > > -"%s/qemuxml2xmloutdata/%s-%s.xml", > > > +

[libvirt] [PATCH] libvirtd.conf: remove extra # after log_outputs line

2019-04-11 Thread Pavel Hrdina
The only place where we have extra empty comment line. Signed-off-by: Pavel Hrdina --- This annoys me every time I like to change log_outputs. Let's fix it finally. Pushed under trivial rule. src/remote/libvirtd.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/src/remote/libvirtd.conf

Re: [libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-11 Thread Ján Tomko
On Thu, Apr 11, 2019 at 12:44:16PM +0200, Andrea Bolognani wrote: On Mon, 2019-04-01 at 12:47 -0400, Cole Robinson wrote: Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Use it on a few recently added xml2xml tests that use DO_TEST_CAPS in the argv test case. The firmware examples requir

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Peter Krempa
On Thu, Apr 11, 2019 at 13:49:03 +0200, Michal Privoznik wrote: > On 4/11/19 12:19 PM, Peter Krempa wrote: > > On Thu, Apr 11, 2019 at 11:58:04 +0200, Michal Privoznik wrote: > > > On 4/11/19 10:39 AM, Peter Krempa wrote: > > > > On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: [...

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/11/19 12:19 PM, Peter Krempa wrote: On Thu, Apr 11, 2019 at 11:58:04 +0200, Michal Privoznik wrote: On 4/11/19 10:39 AM, Peter Krempa wrote: On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: This capability tells whether qemu is capable of waking up the guest from PM suspend

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Peter Krempa
On Thu, Apr 11, 2019 at 13:37:49 +0200, Michal Privoznik wrote: > On 4/11/19 12:12 PM, Daniel Henrique Barboza wrote: > > > > > > All that said, I think a good solution would be (2). dompmsuspend isn't a > > performance sensitive command, thus the extra time to execute the API > > can be ignored.

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/11/19 12:12 PM, Daniel Henrique Barboza wrote: > All that said, I think a good solution would be (2). dompmsuspend isn't a performance sensitive command, thus the extra time to execute the API can be ignored. Also, we can still check for QEMU_CAPS_QUERY_CURRENT_MACHINE inside qemuDomain

Re: [libvirt] New libvirt-tck failure with libvirt 5.2.0

2019-04-11 Thread Daniel P . Berrangé
On Wed, Apr 10, 2019 at 01:33:11PM -0600, Jim Fehlig wrote: > On 4/10/19 1:17 PM, Daniel Henrique Barboza wrote: > > > > > > On 4/10/19 3:33 PM, Jim Fehlig wrote: > > > On 4/10/19 12:25 PM, Daniel Henrique Barboza wrote: > > > > > > > > > > > > On 4/10/19 3:08 PM, Jim Fehlig wrote: > > > > > I

Re: [libvirt] [PATCH] domaincapstest: Call virFileWrapperClearPrefixes only on non-WIN32

2019-04-11 Thread Daniel P . Berrangé
On Wed, Apr 10, 2019 at 03:12:18PM +0200, Michal Privoznik wrote: > The virFileWrapperClearPrefixes() function is defined only when > building for non-WIN32. > > Signed-off-by: Michal Privoznik > --- > > Technically a build breaker fix, but I can't decide if ifdef is better > or removing the cal

Re: [libvirt] [PATCH v2 3/3] docs: add advanced search capabilities

2019-04-11 Thread Daniel P . Berrangé
On Fri, Apr 05, 2019 at 05:54:41PM +0200, Andrea Bolognani wrote: > On Fri, 2019-04-05 at 16:12 +0100, Daniel P. Berrangé wrote: > [...] > > +} else if (what == "devs") { > > +form.setAttribute("action", "https://google.com/search";); > > +newq.setAttribute("name", "q"); > > +

Re: [libvirt] [PATCH 4/4] Add string labels to all VIR_ENUM_IMPL calls

2019-04-11 Thread Daniel P . Berrangé
On Mon, Apr 08, 2019 at 11:48:19AM -0400, Cole Robinson wrote: > Add string labels to all VIR_ENUM_IMPL calls, which will be used > to eventually raise errors from virEnum*String functions. > > I roughly tried to follow these rules: > > 1) If it's an internal only enum, try to uniquely describe i

Re: [libvirt] [PATCH 3/4] util: Add 'label' field to VIR_ENUM_IMPL

2019-04-11 Thread Daniel P . Berrangé
On Mon, Apr 08, 2019 at 11:48:18AM -0400, Cole Robinson wrote: > This allows us to raise error messages from virEnum*String functions. > > FromString failure will report this error for value '' > > invalid argument: Unknown 'domain type' value '' > > ToString failure will report this e

Re: [libvirt] [PATCH 2/4] cfg.mk: Only force _LAST enum on VIR_ENUM_IMPL second line

2019-04-11 Thread Daniel P . Berrangé
On Mon, Apr 08, 2019 at 11:48:17AM -0400, Cole Robinson wrote: > Drop the checking for _LAST optionally on the first line, previous > patch removed all those instances > > Signed-off-by: Cole Robinson > --- > cfg.mk | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Dani

Re: [libvirt] [PATCH 1/4] Always put _LAST enums on second line of VIR_ENUM_IMPL

2019-04-11 Thread Daniel P . Berrangé
On Mon, Apr 08, 2019 at 11:48:16AM -0400, Cole Robinson wrote: > Standardize on putting the _LAST enum value on the second line > of VIR_ENUM_IMPL invocations. Later patches that add string labels > to VIR_ENUM_IMPL will push most of these to the second line anyways, > so this saves some noise. >

Re: [libvirt] [PATCH 12/12] tests: qemuxml2xml: Add DO_TEST_CAPS*

2019-04-11 Thread Andrea Bolognani
On Mon, 2019-04-01 at 12:47 -0400, Cole Robinson wrote: > Add DO_TEST_CAPS* macros, lifted from qemuxml2argvtest. Use it on > a few recently added xml2xml tests that use DO_TEST_CAPS in the argv > test case. The firmware examples require breaking the symlink and > creating our own test file. Also a

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Peter Krempa
On Thu, Apr 11, 2019 at 11:58:04 +0200, Michal Privoznik wrote: > On 4/11/19 10:39 AM, Peter Krempa wrote: > > On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: > > > This capability tells whether qemu is capable of waking up the > > > guest from PM suspend. > > > > > > Based-on-work

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Daniel Henrique Barboza
On 4/11/19 6:58 AM, Michal Privoznik wrote: On 4/11/19 10:39 AM, Peter Krempa wrote: On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: This capability tells whether qemu is capable of waking up the guest from PM suspend. Based-on-work-of: Daniel Henrique Barboza Signed-off-by

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/11/19 10:39 AM, Peter Krempa wrote: On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: This capability tells whether qemu is capable of waking up the guest from PM suspend. Based-on-work-of: Daniel Henrique Barboza Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabili

Re: [libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Peter Krempa
On Thu, Apr 11, 2019 at 10:25:11 +0200, Michal Privoznik wrote: > This capability tells whether qemu is capable of waking up the > guest from PM suspend. > > Based-on-work-of: Daniel Henrique Barboza > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_capabilities.c | 24 ++

[libvirt] [PATCH v3 4/4] qemuDomainPMSuspendForDuration: check for QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
From: Daniel Henrique Barboza If the current QEMU guest can't wake up from suspend properly, avoid suspending the guest at all. This is done by checking the QEMU_CAPS_PM_WAKEUP_SUPPORT cap. The absence of the cap indicates that we're dealing with a QEMU version older than 4.0 (which implements t

[libvirt] [PATCH v3 3/4] qemu_capabilities: Introduce QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
This capability tells whether qemu is capable of waking up the guest from PM suspend. Based-on-work-of: Daniel Henrique Barboza Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 24 +++ src/qemu/qemu_capabilities.h | 3 +++ ...

[libvirt] [PATCH v3 2/4] qemu_monitor: Introduce handler for 'query-current-machine' command

2019-04-11 Thread Michal Privoznik
So far, this command returns a structure with only one member: 'wakeup-suspend-support'. But that's okay. It's what we are after anyway. Based-on-work-of: Daniel Henrique Barboza Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 10 src/qemu/qemu_monitor.h | 9 ++

[libvirt] [PATCH v3 1/4] qemu_capabilities: Add QEMU_CAPS_QUERY_CURRENT_MACHINE

2019-04-11 Thread Michal Privoznik
From: Daniel Henrique Barboza QEMU commit 46ea94ca9cf ("qmp: query-current-machine with wakeup-suspend-support") added a new QMP command called 'query-current-machine' that retrieves guest parameters that can vary in the same machine model (e.g. ACPI support for x86 VMs depends on the '--no-acpi'

[libvirt] [PATCH v3 0/4] Don't pm suspend guest if it's unable to wake up

2019-04-11 Thread Michal Privoznik
This is v3 of: https://www.redhat.com/archives/libvir-list/2019-April/msg00690.html I've taken Daniel's patches and reworked them. Diff to v2: - Patches 1-2/3 are split into three patches - Capability is checked for when querying other capabilities - Fixed a small security issue in 3/3 Daniel H

Re: [libvirt] [PATCH v2 1/3] adding QEMU_CAPS_QUERY_CURRENT_MACHINE and QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/9/19 6:18 PM, Daniel Henrique Barboza wrote: QEMU commit 46ea94ca9cf ("qmp: query-current-machine with wakeup-suspend-support") added a new QMP command called 'query-current-machine' that retrieves guest parameters that can vary in the same machine model (e.g. ACPI support for x86 VMs depend

Re: [libvirt] [PATCH v2 2/3] qemu_process: setting QEMU_CAPS_QUERY_CURRENT_MACHINE caps

2019-04-11 Thread Michal Privoznik
On 4/9/19 6:18 PM, Daniel Henrique Barboza wrote: The new QMP API query-current-machine reports VM capabilities that can vary depending on the VM configuration, in contrast to most QEMU caps that can be set once during libvirtd init as exposed in qemu_capabilities.c. As such, to properly set the

Re: [libvirt] [PATCH v2 3/3] qemuDomainPMSuspendForDuration: check for QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/9/19 6:18 PM, Daniel Henrique Barboza wrote: If the current QEMU guest can't wake up from suspend properly, avoid suspending the guest at all. This is done by checking the QEMU_CAPS_PM_WAKEUP_SUPPORT cap. The absence of the cap indicates that we're dealing with a QEMU version older than 4.0

Re: [libvirt] [PATCH v2 0/3] introducing QEMU_CAPS_QUERY_CURRENT_MACHINE and QEMU_CAPS_PM_WAKEUP_SUPPORT

2019-04-11 Thread Michal Privoznik
On 4/9/19 6:18 PM, Daniel Henrique Barboza wrote: v2: Fixed review problems found by Peter Krempa, most notably: - changed the cap name - made the code generic to be easier to add other caps from the query-current-machine API - changed unit tests accordingly Previous version can be foun

Re: [libvirt] [jenkins-ci PATCH] guests: Remove YAJL symlink kludge

2019-04-11 Thread Erik Skultety
On Wed, Apr 10, 2019 at 05:20:10PM +0200, Andrea Bolognani wrote: > It's no longer needed as of libvirt commit 105756660f94. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 10/12] tests: qemuxml2xml: Use testQemuInfoSetArgs

2019-04-11 Thread Andrea Bolognani
On Wed, 2019-04-10 at 18:53 -0400, Cole Robinson wrote: > On 4/10/19 12:53 PM, Andrea Bolognani wrote: > > I haven't really spent any time digging, but that call to > > qemuTestCapsCacheInsert() looks odd to me. What exactly is the point > > in caching if we're going to be using a different set of