Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 6:29 PM, Nir Soffer wrote: > On Tue, Mar 12, 2019 at 11:52 PM Eric Blake wrote: > >> On 3/12/19 4:35 PM, Nir Soffer wrote: >> > We don't have a need to list or define snapshots since we managed snapshots > on oVirt side. > We want an API to list and redefine

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 6:45 PM, Nir Soffer wrote: > > When you plug a disk, you cannot use any of the bitmaps on the disk because > you don't have any guarantee that the user did not attach the disk to > another machine > that modified the data in some way without updating the bitmaps. So we are > going to

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Nir Soffer
On Wed, Mar 13, 2019 at 12:01 AM Eric Blake wrote: > On 3/12/19 4:52 PM, Eric Blake wrote: > > >> vm_checkpoints table > >> > >> - checkpoint_id: UUID > >> - parent: UUID > >> - vm_id: UUID > >> - creation_date: TIMESTAMP > >> > >> vm_checkpoint_disk_map table > >> - disk_id: UUID > >> -

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Nir Soffer
On Tue, Mar 12, 2019 at 11:52 PM Eric Blake wrote: > On 3/12/19 4:35 PM, Nir Soffer wrote: > > >>> We don't have a need to list or define snapshots since we managed > >> snapshots > >>> on oVirt side. > >>> We want an API to list and redefine checkpoints. > >> > >> But the proposed also has a

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 4:52 PM, Eric Blake wrote: >> vm_checkpoints table >> >> - checkpoint_id: UUID >> - parent: UUID >> - vm_id: UUID >> - creation_date: TIMESTAMP >> >> vm_checkpoint_disk_map table >> - disk_id: UUID >> - checkpoint_id: UUID >> > > And no state of the at the time the checkpoint was

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

2019-03-12 Thread Daniel Henrique Barboza
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 needs this information before a QEMU instance is even created, thus

[libvirt] [PATCH v4 0/2] PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough

2019-03-12 Thread Daniel Henrique Barboza
This series adds support for a new QEMU feature for the spapr (PPC64) machine, NVIDIA V100 + P9 passthrough. Refer to [1] for the version 7 of this feature (same version used as a reference for this series). changes in v4: - only 2 patches - previous patches 1 and 2 were applied - the detection

[libvirt] [PATCH v4 2/2] PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough

2019-03-12 Thread Daniel Henrique Barboza
The NVIDIA V100 GPU has an onboard RAM that is mapped into the host memory and accessible as normal RAM via an NVLink2 bridge. When passed through in a guest, QEMU puts the NVIDIA RAM window in a non-contiguous area, above the PCI MMIO area that starts at 32TiB. This means that the NVIDIA RAM

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 4:35 PM, Nir Soffer wrote: >>> We don't have a need to list or define snapshots since we managed >> snapshots >>> on oVirt side. >>> We want an API to list and redefine checkpoints. >> >> But the proposed also has a subelement, so >> it has the same problem (the XML for a bulk

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Nir Soffer
On Tue, Mar 12, 2019 at 11:02 PM Eric Blake wrote: > On 3/12/19 3:29 PM, Nir Soffer wrote: > > >>> snapshots = > >> srcdom.ListAllSnapshots(libvirt.VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL) > >>> for snapshot in snapshts: > >>> xml = snapshot.XMLDesc() > >>>

[libvirt] [PATCH] conf: Add a function virDomainDefCputuneValidate

2019-03-12 Thread Suyang Chen
move all the def->cputune 'period must be in range' errors into virDomainDefCputuneValidate function and have it called from virDomainDefValidateInternal and virDomainDefParseXML function Solve the bitsizedtask: "Move validation checks out of domain XML parsing" Resolves:

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 3:29 PM, Nir Soffer wrote: >>> snapshots = >> srcdom.ListAllSnapshots(libvirt.VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL) >>> for snapshot in snapshts: >>> xml = snapshot.XMLDesc() >>> dstdom.SnapshotCreateXML(xml) >>> >>> I don't really see a reason why this is so hard that

Re: [libvirt] [PATCH 3/4] libxl: Add support for max_grant_frames

2019-03-12 Thread Jim Fehlig
On 3/12/19 8:17 AM, Daniel P. Berrangé wrote: On Fri, Mar 08, 2019 at 04:05:57PM -0700, Jim Fehlig wrote: Add support for setting max_grant_frames in libxl domain config object and include a test to check that it is properly converted from XML to libxl domain config. Signed-off-by: Jim Fehlig

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Nir Soffer
On Tue, Mar 12, 2019 at 9:49 PM Eric Blake wrote: > On 3/12/19 1:10 PM, Daniel P. Berrangé wrote: > > On Mon, Mar 11, 2019 at 09:38:31PM -0500, Eric Blake wrote: > >> While looking at my work on incremental backups, Nir raised a good > >> point: if we want to recreate a set of known checkpoints

Re: [libvirt] [PATCH 1/2] apparmor: Check libvirtd profile status by name

2019-03-12 Thread Jamie Strandboge
On Fri, 01 Mar 2019, Jim Fehlig wrote: > Commit a3ab6d42 changed the libvirtd profile to a named profile, > breaking the apparmor driver's ability to detect if the profile is > active. When the apparmor driver loads it checks the status of the > libvirtd profile using the full binary path, which

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Eric Blake
On 3/12/19 1:10 PM, Daniel P. Berrangé wrote: > On Mon, Mar 11, 2019 at 09:38:31PM -0500, Eric Blake wrote: >> While looking at my work on incremental backups, Nir raised a good >> point: if we want to recreate a set of known checkpoints on one >> machine that will be taking over a domain from

Re: [libvirt] [PATCH v2 15/15] qemuxml2argvtest: Test os.firmware autoselection

2019-03-12 Thread Laszlo Ersek
On 03/12/19 16:15, Michal Privoznik wrote: > On 3/11/19 4:27 PM, Daniel P. Berrangé wrote: >> On Thu, Mar 07, 2019 at 10:29:25AM +0100, Michal Privoznik wrote: >>> Signed-off-by: Michal Privoznik >>> --- >>>   tests/Makefile.am |  4 +- >>>  

Re: [libvirt] [PATCH] conf: Add a function virDomainDefCputuneValidate

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 12:54:05 -0600, Suyang Chen wrote: > Solve the bitsizedtask: > "Move validation checks out of domain XML parsing" The commit message should describe this individual change. > > Resolves: >

Re: [libvirt] [PATCH 5/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 16:41:15 +0100, Peter Krempa wrote: > On Tue, Mar 12, 2019 at 16:13:20 +0100, Michal Privoznik wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1623389 > > > > If a device is detached twice from the same domain the following > > race condition may happen: > > > > 1)

[libvirt] [PATCH] conf: Add a function virDomainDefCputuneValidate

2019-03-12 Thread Suyang Chen
Solve the bitsizedtask: "Move validation checks out of domain XML parsing" Resolves: https://wiki.libvirt.org/page/BiteSizedTasks#Move_validation_checks_out_of_domain_XML_parsing Signed-off-by: Suyang Chen --- src/conf/domain_conf.c | 43 ++ 1 file

Re: [libvirt] [PATCH v4 0/8] bulk snapshot list/redefine (incremental backup saga)

2019-03-12 Thread Daniel P . Berrangé
On Mon, Mar 11, 2019 at 09:38:31PM -0500, Eric Blake wrote: > While looking at my work on incremental backups, Nir raised a good > point: if we want to recreate a set of known checkpoints on one > machine that will be taking over a domain from another machine, > my initial proposal required making

Re: [libvirt] [PATCH v5 04/20] backup: Introduce virDomainCheckpointPtr

2019-03-12 Thread John Ferlan
On 3/7/19 12:47 AM, Eric Blake wrote: > Prepare for introducing a bunch of new public APIs related to > backup checkpoints by first introducing a new internal type > and errors associated with that type. Checkpoints are modeled > heavily after virDomainSnapshotPtr (both represent a point in >

Re: [libvirt] [PULL 00/14] Audio 20190312 patches

2019-03-12 Thread Peter Maydell
in the Git repository at: > > git://git.kraxel.org/qemu tags/audio-20190312-pull-request > > for you to fetch changes up to 05d2f2a64dbcaa50370d344ab12081d776ed0f03: > > audio: -audiodev command line option: cleanup (2019-03-11 10:29:27 +0100) > > ---

Re: [libvirt] [PATCH v5 01/20] domain_conf: Expose virDomainStorageNetworkParseHost

2019-03-12 Thread John Ferlan
On 3/7/19 12:47 AM, Eric Blake wrote: > An upcoming patch wants to reuse XML parsing of both unix and tcp > network host descriptions in the context of setting up a backup > NBD server. Make that easier by refactoring the existing parser. > > Signed-off-by: Eric Blake > --- >

Re: [libvirt] [PATCH v5 03/20] backup: Document nuances between different state capture APIs

2019-03-12 Thread John Ferlan
On 3/7/19 12:47 AM, Eric Blake wrote: > Upcoming patches will add support for incremental backups via > a new API; but first, we need a landing page that gives an > overview of capturing various pieces of guest state, and which > APIs are best suited to which tasks. > > Signed-off-by: Eric

Re: [libvirt] [PATCH v5 02/20] qemu: clean up qemuDomainRemoveInactiveCommon

2019-03-12 Thread John Ferlan
On 3/7/19 12:47 AM, Eric Blake wrote: > Use VIR_AUTOFREE and saner formatting. No semantic change. > > Signed-off-by: Eric Blake > --- > src/qemu/qemu_domain.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > Reviewed-by: John Ferlan John I think this can be

Re: [libvirt] [PATCH 5/5] virsh: Add snapshot-list --topological

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 12:05:12AM -0600, Eric Blake wrote: > To some extent, virsh already has a (shockingly naive [1]) > client-side topological sorter with the --tree option. But > as a series of REDEFINE calls must be presented in topological > order, it's worth letting the server do the work

Re: [libvirt] [PATCH 3/5] test: Support topological visits

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 12:05:10AM -0600, Eric Blake wrote: > snapshot_conf does all the hard work, the test driver just has to > accept the new flag. > > Signed-off-by: Eric Blake > --- > src/test/test_driver.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Daniel P. Berrangé

Re: [libvirt] [PATCH 4/5] qemu: Support topological visits

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 12:05:11AM -0600, Eric Blake wrote: > snapshot_conf does all the hard work, the qemu driver just has to > accept the new flag. > > Signed-off-by: Eric Blake > --- > src/qemu/qemu_driver.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Daniel P. Berrangé

Re: [libvirt] [PATCH 2/5] snapshots: Support topological visits

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 12:05:09AM -0600, Eric Blake wrote: > Wire up support for VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL in the > domain-agnostic support code. > > Clients of snapshot_conf were previously getting a depth-first search > on anything that used virDomainSnapshotForEachDescendant(); but

Re: [libvirt] [PATCH 1/5] snapshots: Add flag to guarantee topological sort

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 12:05:08AM -0600, Eric Blake wrote: > When doing REDEFINE on multiple snapshot metadata XML descriptions, we > require that a child cannot be redefined before its parent. Since > libvirt already tracks a DAG, it is more convenient if we can ensure > that

Re: [libvirt] [PATCH 3/5] test: Support topological visits

2019-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2019 at 05:04:37PM +0100, Ján Tomko wrote: > On Fri, Mar 08, 2019 at 12:05:10AM -0600, Eric Blake wrote: > > snapshot_conf does all the hard work, the test driver just has to > > accept the new flag. > > > > Signed-off-by: Eric Blake > > --- > > src/test/test_driver.c | 6 ++

Re: [libvirt] [PATCH 1/5] snapshots: Add flag to guarantee topological sort

2019-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2019 at 05:03:32PM +0100, Ján Tomko wrote: > On Fri, Mar 08, 2019 at 12:05:08AM -0600, Eric Blake wrote: > > When doing REDEFINE on multiple snapshot metadata XML descriptions, we > > require that a child cannot be redefined before its parent. Since > > libvirt already tracks a

Re: [libvirt] [PATCH v2 10/15] qemufirmwaretest: Test qemuFirmwareFetchConfigs()

2019-03-12 Thread Laszlo Ersek
On 03/12/19 12:20, Daniel P. Berrangé wrote: > On Tue, Mar 12, 2019 at 12:13:46PM +0100, Laszlo Ersek wrote: >> (adding Dan) >> >> On 03/07/19 10:29, Michal Privoznik wrote: >>> Signed-off-by: Michal Privoznik >>> --- >>> tests/Makefile.am | 1 + >>>

Re: [libvirt] [PATCH 1/5] snapshots: Add flag to guarantee topological sort

2019-03-12 Thread Eric Blake
On 3/12/19 11:03 AM, Ján Tomko wrote: > On Fri, Mar 08, 2019 at 12:05:08AM -0600, Eric Blake wrote: >> When doing REDEFINE on multiple snapshot metadata XML descriptions, we >> require that a child cannot be redefined before its parent.  Since >> libvirt already tracks a DAG, it is more convenient

Re: [libvirt] [PATCH 5/5] virsh: Add snapshot-list --topological

2019-03-12 Thread Ján Tomko
On Fri, Mar 08, 2019 at 12:05:12AM -0600, Eric Blake wrote: To some extent, virsh already has a (shockingly naive [1]) client-side topological sorter with the --tree option. But as a series of REDEFINE calls must be presented in topological order, it's worth letting the server do the work for

Re: [libvirt] [PATCH 4/5] qemu: Support topological visits

2019-03-12 Thread Ján Tomko
On Fri, Mar 08, 2019 at 12:05:11AM -0600, Eric Blake wrote: snapshot_conf does all the hard work, the qemu driver just has to accept the new flag. Signed-off-by: Eric Blake --- src/qemu/qemu_driver.c | 6 ++ 1 file changed, 6 insertions(+) Same here. Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 3/5] test: Support topological visits

2019-03-12 Thread Ján Tomko
On Fri, Mar 08, 2019 at 12:05:10AM -0600, Eric Blake wrote: snapshot_conf does all the hard work, the test driver just has to accept the new flag. Signed-off-by: Eric Blake --- src/test/test_driver.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/test/test_driver.c

Re: [libvirt] [PATCH 2/5] snapshots: Support topological visits

2019-03-12 Thread Ján Tomko
On Fri, Mar 08, 2019 at 12:05:09AM -0600, Eric Blake wrote: Wire up support for VIR_DOMAIN_SNAPSHOT_LIST_TOPOLOGICAL in the domain-agnostic support code. Clients of snapshot_conf were previously getting a depth-first search on anything that used virDomainSnapshotForEachDescendant(); but a

Re: [libvirt] [PATCH 1/5] snapshots: Add flag to guarantee topological sort

2019-03-12 Thread Ján Tomko
On Fri, Mar 08, 2019 at 12:05:08AM -0600, Eric Blake wrote: When doing REDEFINE on multiple snapshot metadata XML descriptions, we require that a child cannot be redefined before its parent. Since libvirt already tracks a DAG, it is more convenient if we can ensure that

Re: [libvirt] [PATCH 5/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 16:13:20 +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1623389 > > If a device is detached twice from the same domain the following > race condition may happen: > > 1) The first DetachDevice() call will issue "device_del" on qemu > monitor,

Re: [libvirt] [PATCH 2/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 16:13:17 +0100, Michal Privoznik wrote: > The aim of this function will be to fix return value of > qemuMonitorDelDevice() in one specific case. But that is yet to > come. Right now this is nothing but a plain substitution. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 3/5] DO NOT APPLY: Simple reproducer

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 16:13:18 +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1623389 > > Steps to reproduce: > > 1) cat shmem.xml > > > 4 > > > > 2) virsh attach-device vm1 shmem.xml > > 3) virsh detach-device-alias vm1 ua-123;

Re: [libvirt] [PATCH 0/5] snapshots: topological sorting (incremental backup saga)

2019-03-12 Thread Eric Blake
[resending with widened cc, since Jan reviewed my bulk import patches that are built on top of this] On 3/8/19 12:05 AM, Eric Blake wrote: > While working to add new API for bulk dumpxml/redefine, and turn > virDomainSnapshotObjList into a base class for sharing with > checkpoints, I realized how

Re: [libvirt] [PATCH] tools: vsh: Don't use assert()

2019-03-12 Thread Eric Blake
On 3/12/19 8:25 AM, Peter Krempa wrote: > On Tue, Mar 12, 2019 at 13:18:41 +0100, Peter Krempa wrote: >> It's meant for testing, not for production builds. Also we have a helper >> for reporting OOM errors. Introduced by 23e0bf1c4eb6 >> >> Signed-off-by: Peter Krempa >> --- >> tools/vsh.c | 2 +-

Re: [libvirt] [PATCH 1/5] qemu_hotplug: Properly check for qemuMonitorDelDevice retval

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 16:13:16 +0100, Michal Privoznik wrote: > Luckily, the function returns only 0 or -1 so all the checks work > as expected. Anyway, our rule is that a positive value means > success so if the function ever returns a positive value these > checks will fail. Make them check

Re: [libvirt] [PATCH v2 15/15] qemuxml2argvtest: Test os.firmware autoselection

2019-03-12 Thread Michal Privoznik
On 3/11/19 4:27 PM, Daniel P. Berrangé wrote: On Thu, Mar 07, 2019 at 10:29:25AM +0100, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- tests/Makefile.am | 4 +- ...arch64-os-firmware-efi.aarch64-latest.args | 37 ++

[libvirt] [PATCH 0/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-12 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (5): qemu_hotplug: Properly check for qemuMonitorDelDevice retval qemu_hotplug: Introduce and use qemuDomainDeleteDevice DO NOT APPLY: Simple reproducer DO NOT APPLY: Revert simple reproducer qemu_hotplug: Fix a rare race condition when detaching a

[libvirt] [PATCH 4/5] DO NOT APPLY: Revert simple reproducer

2019-03-12 Thread Michal Privoznik
This reverts previous commit. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0caf75659c..574477e916 100644 --- a/src/qemu/qemu_hotplug.c +++

[libvirt] [PATCH 5/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-12 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1623389 If a device is detached twice from the same domain the following race condition may happen: 1) The first DetachDevice() call will issue "device_del" on qemu monitor, but since the DEVICE_DELETED event did not arrive in time, the API ends

[libvirt] [PATCH 2/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

2019-03-12 Thread Michal Privoznik
The aim of this function will be to fix return value of qemuMonitorDelDevice() in one specific case. But that is yet to come. Right now this is nothing but a plain substitution. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 60 - 1 file

Re: [libvirt] [PATCH v2 08/15] test: Introduce qemufirmwaretest

2019-03-12 Thread Michal Privoznik
On 3/11/19 4:08 PM, Daniel P. Berrangé wrote: On Thu, Mar 07, 2019 at 10:29:18AM +0100, Michal Privoznik wrote: Test firmware description parsing so far. The test files come from three locations: 1) ovmf-sb-keys.json and ovmf-sb.json come from OVMF package from RHEL-7 (with slight name change

Re: [libvirt] [PATCH v2 06/15] conf: Introduce firmware attribute to

2019-03-12 Thread Michal Privoznik
On 3/11/19 4:04 PM, Daniel P. Berrangé wrote: On Thu, Mar 07, 2019 at 10:29:16AM +0100, Michal Privoznik wrote: The idea is that using this attribute users enable libvirt to automagically select firmware image for their domain. For instance: hvm Ah, now I see why you need

[libvirt] [PATCH 3/5] DO NOT APPLY: Simple reproducer

2019-03-12 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1623389 Steps to reproduce: 1) cat shmem.xml 4 2) virsh attach-device vm1 shmem.xml 3) virsh detach-device-alias vm1 ua-123; virsh detach-device vm1 shmem.xml 4) observe that the device is still in the domain: virsh

[libvirt] [PATCH 1/5] qemu_hotplug: Properly check for qemuMonitorDelDevice retval

2019-03-12 Thread Michal Privoznik
Luckily, the function returns only 0 or -1 so all the checks work as expected. Anyway, our rule is that a positive value means success so if the function ever returns a positive value these checks will fail. Make them check for a negative value properly. Signed-off-by: Michal Privoznik ---

Re: [libvirt] [PATCH 1/6] lxc: Introduce method lxcConnectGetAllDomainStats().

2019-03-12 Thread Ján Tomko
Please drop the '.' at the end of the commit message. (Possibly the parentheses as well - you alredy called it a method and having a symbol with 'lxc' prefix and 'Get' in its name should be enough of a hint) Jano On Mon, Mar 11, 2019 at 05:56:13PM -0300, Julio Faracco wrote: This is an

Re: [libvirt] [PATCH v2 1/2] util: add virStringParseYesNo()

2019-03-12 Thread Shotaro Gotanda
Thank you for your feedback and sorry for my bothering you. I’ll fix it, check if there is any other problems and send the patches again. Regards, Shotaro -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 1/2] util: add virStringParseYesNo()

2019-03-12 Thread Peter Krempa
[please do not top-post on technical lists] On Tue, Mar 12, 2019 at 23:22:00 +0900, Shotaro Gotanda wrote: > Thank you for your feedback. > I overlooked my coding style violation, > because I ran "make syntax-check" and > it finished without any error. > > I suppose that you mean the curly

Re: [libvirt] [PATCH v2 1/2] util: add virStringParseYesNo()

2019-03-12 Thread Shotaro Gotanda
Thank you for your feedback. I overlooked my coding style violation, because I ran "make syntax-check" and it finished without any error. I suppose that you mean the curly bracket should be removed from if and else sentence because the body and condition itself occupy a single line. If there is

Re: [libvirt] [PATCH v4 2/8] snapshot: Support topological virDomainSnapshotForEach()

2019-03-12 Thread Eric Blake
On 3/12/19 8:00 AM, Ján Tomko wrote: > On Mon, Mar 11, 2019 at 09:38:33PM -0500, Eric Blake wrote: >> Previous patches added topological sorting only for existing public >> API functions, but it turns out that it will also useful for an >> upcoming API addition that wants to visit all snapshots. 

Re: [libvirt] [PATCH 4/4] xenconfig: Add support for max_grant_frames

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 04:05:58PM -0700, Jim Fehlig wrote: > Add support in the domXML<->native config converter for > max_grant_frames. Include a test for the conversion. > > Signed-off-by: Jim Fehlig > --- > src/xenconfig/xen_xl.c| 56 +++ >

Re: [libvirt] [PATCH v4 1/8] snapshot: Add new API for bulk dumpxml/redefine

2019-03-12 Thread Eric Blake
On 3/12/19 7:57 AM, Ján Tomko wrote: > On Mon, Mar 11, 2019 at 09:38:32PM -0500, Eric Blake wrote: >> Right now, copying the state of a transient domain with snapshots from >> one host to another requires multiple API calls on both machines - on >> the host: get the domain XML, get a list of the

Re: [libvirt] [PATCH 3/4] libxl: Add support for max_grant_frames

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 04:05:57PM -0700, Jim Fehlig wrote: > Add support for setting max_grant_frames in libxl domain config > object and include a test to check that it is properly converted > from XML to libxl domain config. > > Signed-off-by: Jim Fehlig > --- > src/libxl/libxl_conf.c

Re: [libvirt] [PATCH 2/4] libxl: Add implicit xenbus controller

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 04:05:56PM -0700, Jim Fehlig wrote: > All Xen domains have a xenbus device. Implicitly add one if not > already explicitly specified in the domain config. > > Signed-off-by: Jim Fehlig > --- Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com

Re: [libvirt] [PATCH 1/4] conf: Add a new 'xenbus' controller type

2019-03-12 Thread Daniel P . Berrangé
On Fri, Mar 08, 2019 at 04:05:55PM -0700, Jim Fehlig wrote: > xenbus is virtual controller (akin to virtio controllers) for Xen > paravirtual devices. Although all Xen VMs have a xenbus, it has > never been modeled in libvirt, or in Xen native VM config format > for that matter. > > Recently

Re: [libvirt] [PATCH v2 12/15] qemu_process: Call qemuFirmwareFillDomain

2019-03-12 Thread Daniel P . Berrangé
On Thu, Mar 07, 2019 at 10:29:22AM +0100, Michal Privoznik wrote: > When preparing domain call qemuFirmwareFillDomain() to fill in > desired firmware. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_process.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git

Re: [libvirt] [PATCH v4 8/8] qemu: Implement bulk snapshot operations

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:39PM -0500, Eric Blake wrote: Implement the new API calls for bulk snapshot dump and import. This borrows from ideas in the test driver, but import is further complicated by the fact that qemu writes snapshot XML to disk, and thus must do additional validation after

Re: [libvirt] [PATCH v4 3/8] snapshot: Tweaks to support new bulk dumpxml/import API

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:34PM -0500, Eric Blake wrote: Change the return value of virDomainSnapshotObjLisParse() to return also s/ObjLis/ObjList/ Jano the number of snapshots imported, and allow a return of 0 (the original proposal of adding a flag to virDomainSnapshotCreateXML

Re: [libvirt] [PATCH v4 7/8] qemu: Factor out qemuDomainSnapshotValidate() helper

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:38PM -0500, Eric Blake wrote: Straight code motion, coupled with changing goto into return -1 as needed. This change will be important to later patches adding bulk redefinition (where each snapshot in a list has to meet the same constraints). Signed-off-by: Eric

Re: [libvirt] [PATCH v4 5/8] virsh: Expose bulk snapshot dumpxml/import

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:36PM -0500, Eric Blake wrote: Add a new 'snapshot-import' command for bulk import. For bulk XML, it was easier to just add new flags to the existing 'snapshot-dumpxml' than to figure out a new command name. I debated about whether omitting the snapshotname should

Re: [libvirt] [PATCH v4 6/8] test: Implement bulk snapshot operations

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:37PM -0500, Eric Blake wrote: Implement the new API calls for bulk snapshot dump and import. The bulk of the work is already done by the common code. Since each connection to test:///default restarts at the same canned state, this can easily be tested with: $

Re: [libvirt] [PATCH] tools: vsh: Don't use assert()

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 13:18:41 +0100, Peter Krempa wrote: > It's meant for testing, not for production builds. Also we have a helper > for reporting OOM errors. Introduced by 23e0bf1c4eb6 > > Signed-off-by: Peter Krempa > --- > tools/vsh.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [libvirt] [PATCH v4 4/8] remote: Wire up snapshot bulk dumpxml/import

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:35PM -0500, Eric Blake wrote: Typical copy-and-paste addition. Fortunately, the generator handles this one without needing manual overrides. Signed-off-by: Eric Blake --- src/remote/remote_driver.c | 6 -- src/remote/remote_protocol.x | 38

Re: [libvirt] [PATCH v4 3/8] snapshot: Tweaks to support new bulk dumpxml/import API

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:34PM -0500, Eric Blake wrote: Change the return value of virDomainSnapshotObjLisParse() to return the number of snapshots imported, and allow a return of 0 (the original proposal of adding a flag to virDomainSnapshotCreateXML required returning an arbitrary non-NULL

[libvirt] [PATCH] tests: Drop unnecessary variables

2019-03-12 Thread Andrea Bolognani
In qemuxml2xmltest, both activeVcpus and blockjobs members of the testInfo struct have been entirely unused ever since commit d1a7fc8bb303. Signed-off-by: Andrea Bolognani --- Pushed as trivial. tests/qemuxml2xmltest.c | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [libvirt] [PATCH v4 2/8] snapshot: Support topological virDomainSnapshotForEach()

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:33PM -0500, Eric Blake wrote: Previous patches added topological sorting only for existing public API functions, but it turns out that it will also useful for an upcoming API addition that wants to visit all snapshots. Add a parameter, and update all existing

Re: [libvirt] [PATCH v4 1/8] snapshot: Add new API for bulk dumpxml/redefine

2019-03-12 Thread Ján Tomko
On Mon, Mar 11, 2019 at 09:38:32PM -0500, Eric Blake wrote: Right now, copying the state of a transient domain with snapshots from one host to another requires multiple API calls on both machines - on the host: get the domain XML, get a list of the snapshots, and then for each snapshot get the

Re: [libvirt] [PATCH v2 13/15] qemuDomainDefValidate: Don't require SMM if automatic firmware selection enabled

2019-03-12 Thread Laszlo Ersek
On 03/07/19 10:29, Michal Privoznik wrote: > The firmware selection code will enable the feature if needed. > There's no need to require SMM to be enabled in that case. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [libvirt] [jenkins-ci PATCH 0/3] lcitool: tweaks to exception handling

2019-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2019 at 10:49:24AM +, Daniel P. Berrangé wrote: > A few tweaks to exception handling identified in previous discussions > about the use of Exception. > > Daniel P. Berrangé (3): > lcitool: remove Error class for exception handling > lcitool: push exception catching down

Re: [libvirt] [PATCH v2 11/15] qemu_firmware: Introduce qemuFirmwareFillDomain()

2019-03-12 Thread Laszlo Ersek
On 03/07/19 10:29, Michal Privoznik wrote: > And finally the last missing piece. This is what puts it all > together. > > At the beginning, qemuFirmwareFillDomain() loads all possible > firmware description files based on algorithm described earlier. > Then it tries to find description which

[libvirt] [PATCH] tools: vsh: Don't use assert()

2019-03-12 Thread Peter Krempa
It's meant for testing, not for production builds. Also we have a helper for reporting OOM errors. Introduced by 23e0bf1c4eb6 Signed-off-by: Peter Krempa --- tools/vsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/vsh.c b/tools/vsh.c index 5e483a5d26..5903f129c1

Re: [libvirt] [PATCH] virsh: Make self-test failures noisy

2019-03-12 Thread Peter Krempa
On Tue, Mar 12, 2019 at 06:40:42 -0500, Eric Blake wrote: > On 3/12/19 2:50 AM, Erik Skultety wrote: > > On Mon, Mar 11, 2019 at 09:18:44PM -0500, Eric Blake wrote: > >> In local testing, I accidentally introduced a self-test failure, > >> and spent way too much time debugging it. Make sure the

Re: [libvirt] [PATCH 6/6] lxc: Introduce method lxcDomainGetBalloonStats().

2019-03-12 Thread Peter Krempa
On Mon, Mar 11, 2019 at 17:56:18 -0300, Julio Faracco wrote: > This method is responsible to fetch all Balloon Memory Stats and store > data into virDomainStatsRecordPtr structure. > > Signed-off-by: Julio Faracco > --- > src/lxc/lxc_driver.c | 71 >

Re: [libvirt] [PATCH 5/6] lxc: Introduce method lxcDomainGetBlockStats().

2019-03-12 Thread Peter Krempa
On Mon, Mar 11, 2019 at 17:56:17 -0300, Julio Faracco wrote: > This method is responsible to fetch all Block Stats and store data into > virDomainStatsRecordPtr structure. This particular method checks for LXC > filesystem in host disk/partition and check for block disks like > physical disks and

Re: [libvirt] [PATCH 2/6] lxc: Introduce method lxcDomainGetStats().

2019-03-12 Thread Peter Krempa
On Mon, Mar 11, 2019 at 17:56:14 -0300, Julio Faracco wrote: > This method is responsible to fetch data like State, CPU, Disk and > Balloon info (all single domain info) from each domain 'virDomainObjPtr'. > > Signed-off-by: Julio Faracco > --- > src/lxc/lxc_driver.c | 42

Re: [libvirt] [PATCH v5] openvswitch: Add new port VLAN mode "802.1ad"

2019-03-12 Thread Pavel Hrdina
On Fri, Mar 08, 2019 at 11:21:37AM -0500, Laine Stump wrote: > On 3/8/19 8:34 AM, John Ferlan wrote: > > > > On 2/24/19 9:15 AM, ZhiPeng LU wrote: > > > This patch adds functionality to allow libvirt to configure the '802.1ad' > > > modes(802.1ad double-tagged) on openvswitch networks. > > > For

Re: [libvirt] [PATCH] virsh: Make self-test failures noisy

2019-03-12 Thread Eric Blake
On 3/12/19 2:50 AM, Erik Skultety wrote: > On Mon, Mar 11, 2019 at 09:18:44PM -0500, Eric Blake wrote: >> In local testing, I accidentally introduced a self-test failure, >> and spent way too much time debugging it. Make sure the testsuite >> log includes some hint as to why command option

Re: [libvirt] [PATCH] virstoragefile: identify GPFS as cluster FS

2019-03-12 Thread Diego Michelotto
HI all, any news about this patch? All the best. Diego Michelotto ++ - uff: 051 2095493‬ - skype: diego-mikel8 ++ > Il giorno 27 feb 2019, alle ore 15:07, Diego Michelotto > ha scritto: > > GPFS is 'IBM General Parallel

Re: [libvirt] [jenkins-ci PATCH 3/3] lcitool: add support for --debug / -d argument

2019-03-12 Thread Andrea Bolognani
On Tue, 2019-03-12 at 10:49 +, Daniel P. Berrangé wrote: > Introduce a --debug / -d argument that allows the display of information > relevant to developers debugging problems. Initially this just displays > the top level exception catch, so that full stack traces are shown. > >

Re: [libvirt] [jenkins-ci PATCH 2/3] lcitool: push exception catching down into run method

2019-03-12 Thread Andrea Bolognani
On Tue, 2019-03-12 at 10:49 +, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > guests/lcitool | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing

Re: [libvirt] [jenkins-ci PATCH 1/3] lcitool: remove Error class for exception handling

2019-03-12 Thread Andrea Bolognani
On Tue, 2019-03-12 at 10:49 +, Daniel P. Berrangé wrote: [...] > @@ -583,18 +577,18 @@ class Application: > os_full = os_name + os_version > > if package_format not in ["deb", "rpm"]: > -raise Error("Host {} doesn't support Dockerfiles".format(host)) > +

Re: [libvirt] [PATCH v2 10/15] qemufirmwaretest: Test qemuFirmwareFetchConfigs()

2019-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2019 at 12:13:46PM +0100, Laszlo Ersek wrote: > (adding Dan) > > On 03/07/19 10:29, Michal Privoznik wrote: > > Signed-off-by: Michal Privoznik > > --- > > tests/Makefile.am | 1 + > > .../etc/qemu/firmware/40-ovmf-sb-keys.json| 1 + > >

[libvirt] [PATCH v2 3/3] news: update for new class element of PCI nodedev capability

2019-03-12 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- docs/news.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 81466c3d55..786d18d485 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -68,6 +68,11 @@ + + + Report

[libvirt] [PATCH v2 0/3] nodedev: add class info for pci capability

2019-03-12 Thread Nikolay Shirokovskiy
Diff from v1 [1] === - add patch to use/restrict name "klass" in headers instead of class, _class - add news patch [1] https://www.redhat.com/archives/libvir-list/2019-February/msg01036.html Nikolay Shirokovskiy (3): conf: don't use "class" as name in _virNodeDevCapPCIDev xml:

[libvirt] [PATCH v2 1/3] conf: don't use "class" as name in _virNodeDevCapPCIDev

2019-03-12 Thread Nikolay Shirokovskiy
Vim treats *.h files as cpp ones with respect to syntax highlighting. Thus "class" in _virNodeDevCapPCIDev highlighted mistakenly. This can be fixed by filetype detection code tunables but it is more convinient to skip this tuning by every project member. Let's just use "klass" as field name

[libvirt] [PATCH v2 2/3] xml: nodedev: add class info for pci capability

2019-03-12 Thread Nikolay Shirokovskiy
This info can be useful to filter devices visible to mgmt clients so that they won't see devices that unsafe/not meaningful to pass thru. Provide class info the way it is provided by udev or kernel that is as single 6-digit hexadecimal. Class element is not optional. I guess this should not

Re: [libvirt] [PATCH v2 10/15] qemufirmwaretest: Test qemuFirmwareFetchConfigs()

2019-03-12 Thread Laszlo Ersek
(adding Dan) On 03/07/19 10:29, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > tests/Makefile.am | 1 + > .../etc/qemu/firmware/40-ovmf-sb-keys.json| 1 + > .../etc/qemu/firmware/60-ovmf-sb.json | 0 >

Re: [libvirt] [PATCH 1/6] lxc: Introduce method lxcConnectGetAllDomainStats().

2019-03-12 Thread Peter Krempa
On Mon, Mar 11, 2019 at 17:56:13 -0300, Julio Faracco wrote: > This is an implementation of method used by driver to retrieve stats > from all domain. Right now, this is a simple implementation considering > only State, CPU, Disks and Balloon. > > Signed-off-by: Julio Faracco > --- >

Re: [libvirt] [PATCH 0/6] lxc: Add suport to virConnectGetAllDomainStats().

2019-03-12 Thread Peter Krempa
On Mon, Mar 11, 2019 at 17:56:12 -0300, Julio Faracco wrote: > This series has a collection of new methods to enable support for > virConnectGetAllDomainStats() to LXC driver. The only difference is Disk > Stats. It needs to consider only the host file system operations or any > other block

Re: [libvirt] [libvirt-go PATCH] connect: Add the new libvirt API virConnectGetStoragePoolCapabilities

2019-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2019 at 12:03:32PM +0100, Erik Skultety wrote: > On Tue, Mar 12, 2019 at 09:49:08AM +, Daniel P. Berrangé wrote: > > On Tue, Mar 12, 2019 at 09:43:35AM +0100, Erik Skultety wrote: > > > Signed-off-by: Erik Skultety > > > --- > > > connect.go | 17 + > >

  1   2   >