[libvirt] [PATCH v3 04/18] snapshot: Give virDomainSnapshotDefFormat its own flags

2019-03-04 Thread Eric Blake
virDomainSnapshotDefFormat currently takes two sets of knobs: an 'unsigned int flags' argument that can currently just be VIR_DOMAIN_DEF_FORMAT_SECURE, and an 'int internal' argument used as a bool to determine whether to output an additional element. It then reuses the 'flags' knob to call into

[libvirt] [PATCH v3 14/18] virsh: Expose bulk snapshot dumpxml/redefine

2019-03-04 Thread Eric Blake
Add flags to the 'dumpxml' and 'snapshot-create' commands to pass the newly-added bulk snapshot flags through. For command-line convenience, I intentionally made --redefine-list imply --redefine, even though the counterpart C flags are distinct (and you get an error if you pass _REDEFINE_LIST

[libvirt] [PATCH v3 09/18] domain: Expand virDomainDefFormatInternal with snapshots

2019-03-04 Thread Eric Blake
Make it possible to grab all snapshot XMLs via a single API call, by adding a new internal flag, and expanding the struct used to pass extra data for formatting. Signed-off-by: Eric Blake --- src/conf/domain_conf.h | 3 +++ src/conf/domain_conf.c | 23 --- 2 files changed,

[libvirt] [PATCH v3 15/18] test: Implement bulk snapshot operations

2019-03-04 Thread Eric Blake
Implement the new flags for bulk snapshot dump and redefine. 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: $ virsh -c test:///default " snapshot-create-as test s1

[libvirt] [PATCH v3 05/18] snapshot: Refactor virDomainSnapshotDefFormat

2019-03-04 Thread Eric Blake
Split out an internal helper that produces format into a virBuffer, similar to what domain_conf.c does, and making the next patch easier to write. Signed-off-by: Eric Blake Reviewed-by: John Ferlan --- src/conf/snapshot_conf.c | 106 +++ 1 file changed, 62

[libvirt] [PATCH v3 07/18] domain: Add struct for future domain format parameters

2019-03-04 Thread Eric Blake
Upcoming patches will add new flags for increasing the amount of information present in dumpxml, but where the source of that information is tied to somewhere other than the active or offline domain sub-definition. Make those extensions easier by updating internal callers to pass in a struct,

[libvirt] [PATCH v3 12/18] domain: Add VIR_DOMAIN_XML_SNAPSHOTS flag

2019-03-04 Thread Eric Blake
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 snapshot's XML; then on the destination: create the domain,

[libvirt] [PATCH v3 00/18] bulk snapshot list/redefine (incremental backup saga)

2019-03-04 Thread Eric Blake
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 multiple API calls to list the XML for each checkpoint on the

[libvirt] [PATCH v3 11/18] snapshot: Add virDomainSnapshotObjListParse

2019-03-04 Thread Eric Blake
Add a new function to make it possible to parse a list of snapshots at once. This is a counterpart to an earlier patch making it possible to produce all snapshots in a single XML string, and intentionally parses the same top-level element with an optional attribute current='name'. Note that

[libvirt] [PATCH v3 06/18] snapshot: Add virDomainSnapshotObjListFormat

2019-03-04 Thread Eric Blake
Add a new function to output all of the domain's snapshots in one buffer. Signed-off-by: Eric Blake Reviewed-by: John Ferlan --- src/conf/snapshot_conf.h | 9 +- src/conf/snapshot_conf.c | 61 src/libvirt_private.syms | 1 + 3 files changed, 70

[libvirt] [PATCH v3 18/18] qemu: Implement bulk snapshot operations

2019-03-04 Thread Eric Blake
Implement the new flags for bulk snapshot dump and redefine. This borrows from ideas in the test driver, but is further complicated by the fact that qemu must write snapshot XML to disk, and thus must do additional validation after the initial parse to ensure the user didn't attempt to rename a

[libvirt] [PATCH v3 17/18] qemu: Const-correct snapshot directory name

2019-03-04 Thread Eric Blake
qemuDomainSnapshotWriteMetadata does not modify the directory name, and making it const-correct aids in writing an upcoming patch. Signed-off-by: Eric Blake --- src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v3 10/18] snapshot: Split out virDomainSnapshotRedefineValidate helper

2019-03-04 Thread Eric Blake
Pull out the portion of virDomainSnapshotRefinePrep() that deals with definition sanity into a separate helper routine that can be reused with bulk redefine, leaving behind only the code specific to loop checking and in-place updates that are only needed in single-definition handling.

[libvirt] [PATCH v3 01/18] qemu: Refactor snapshot check for _LIVE vs. _REDEFINE

2019-03-04 Thread Eric Blake
The current qemu code rejects the combination of the two flags VIR_DOMAIN_SNAPSHOT_CREATE_LIVE in tandem with VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE, but rather late in the cycle (after the snapshot was already parsed), and with a rather confusing message (complaining that live snapshots require

[libvirt] [PATCH v3 03/18] qemu: Use virDomainSnapshotState for switch statements

2019-03-04 Thread Eric Blake
Clean up the previous patch which abused switch on virDomainState while working with a variable containing virDomainSnapshotState, by converting the two affected switch statements to now use the right enum. Signed-off-by: Eric Blake --- src/qemu/qemu_driver.c | 67

[libvirt] [PATCH v3 02/18] snapshot: Rework virDomainSnapshotState enum

2019-03-04 Thread Eric Blake
The existing virDomainSnapshotState is a superset of virDomainState, adding one more state (disk-snapshot) on top of valid domain states. But as written, the enum cannot be used for gcc validation that all enum values are covered in a strongly-typed switch condition, because the enum does not

[libvirt] [PATCH v3 08/18] snapshot: Avoid latent use-after-free when cleaning snapshots

2019-03-04 Thread Eric Blake
Right now, the only callers of qemuDomainSnapshotDiscardAllMetadata() are right before freeing the virDomainSnapshotObjList, so it did not matter if the list's metaroot (which points to all the defined root snapshots) is left inconsistent. But an upcoming patch will want to clear all snapshots if

[libvirt] [PATCH v3 13/18] snapshot: Add VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE_LIST flag

2019-03-04 Thread Eric Blake
Continue the work of the previous patch in making it possible to copy the state of a transient domain with snapshots from one host to another, by allowing the destination to perform bulk redefines. Note that the destination still has to do separate calls for creating/defining the domain first,

[libvirt] [PATCH v3 16/18] qemu: Factor out qemuDomainSnapshotValidate() helper

2019-03-04 Thread Eric Blake
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 Blake --- src/qemu/qemu_driver.c | 120

[libvirt] [PATCH 3/4] virsh-network: Introduce virshNetworkEventCallback to handle network events

2019-03-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-network.c | 17 ++--- tools/virsh-network.h | 8 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 9b86ef8071..d5b3649050 100644 --- a/tools/virsh-network.c +++

[libvirt] [PATCH 2/4] virsh: Add device name completion for target option of detach-disk command

2019-03-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c8c4db1b2b..911727cde6 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -12548,6 +12548,7 @@ static const vshCmdOptDef

[libvirt] [PATCH 1/4] virsh: Only return active domain names for detach-device-alias

2019-03-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 5699018dcc..c8c4db1b2b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11939,7 +11939,7 @@ static const vshCmdInfo

[libvirt] [PATCH 0/4] Couple of patches about virsh completion

2019-03-04 Thread Lin Ma
Lin Ma (4): virsh: Only return active domain names for detach-device-alias virsh: Add device name completion for target option of detach-disk command virsh-network: Introduce virshNetworkEventCallback to handle network events virsh: Add event name completion to 'network-event'

[libvirt] [PATCH 4/4] virsh: Add event name completion to 'network-event' command

2019-03-04 Thread Lin Ma
Signed-off-by: Lin Ma --- tools/virsh-completer.c | 27 +++ tools/virsh-completer.h | 4 tools/virsh-network.c | 1 + 3 files changed, 32 insertions(+) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index 7c68e2e832..c4adbb70d0 100644 ---

[libvirt] [PATCH v2 3/6] lxc: Introduce lxcNetworkGetParseDataLegacy() method.

2019-03-04 Thread Julio Faracco
This function was introduced to fetch/alloc new data for legacy entries inside config file: 'lxc.network.foo'. Libvirt still need to support both versions. So, this function can be easy to remove in the future. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 37

[libvirt] [PATCH v2 5/6] tests: Change network settings of V3 testcase set.

2019-03-04 Thread Julio Faracco
Now, it is time to use the new pattern for LXC 3.X inside config test cases. In the past, we kept the old style to keep all functionalities. Now, it is possible to use indexes properly. Signed-off-by: Julio Faracco --- .../lxcconf2xml-ethernet-v3.config| 16

[libvirt] [PATCH v2 6/6] tests: Introduce random network settings to test indexes.

2019-03-04 Thread Julio Faracco
This is the same test of miscnetwork. The XML output needs to be the same. It contains random networks entries separated by indexes and it needs to produce the order XML definition. Signed-off-by: Julio Faracco --- .../lxcconf2xml-randomnetwork-v3.config | 21 +

[libvirt] [PATCH v2 4/6] lxc: Introduce lxcNetworkGetParseData() for 'lxc.net.' entry.

2019-03-04 Thread Julio Faracco
This commit moves old lxcNetworkGetParseData() to lxcNetworkGetParseDataLegacy() and create a new method for LXC version 3.X called lxcNetworkGetParseData(). This is same idea of method lxcNetworkGetParseDataLegacy(). In the future, it can be easy to remove or rebase, in case of deprecate

[libvirt] [PATCH v2 2/6] lxc: Rebase lxcNetworkParseData pointers to use new structures.

2019-03-04 Thread Julio Faracco
This commit refactor the code logic to introduce new array structures instead of single lxcNetworkParseData struct. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 94 +++- 1 file changed, 32 insertions(+), 62 deletions(-) diff --git

[libvirt] [PATCH v2 1/6] lxc: Rebase lxcNetworkParseData struct to support indexes.

2019-03-04 Thread Julio Faracco
The current logic of lxcNetworkParseData uses one single structure to record data over the network definitions inside config files. The logic consider the entry 'type' as a new network definition, every time that algorithm find this tag. This new structure was designed to consider network

[libvirt] [PATCH v2 0/6] lxc: Add suport to network indexes for LXC 3.X.

2019-03-04 Thread Julio Faracco
This series implement support for network syntax settings for LXC 3.X. Now, indexes are part of the settings to define network interfaces. Each interface has its own index. The old style uses 'type' tag to differentiate each interface. Old: lxc.network.type = veth lxc.network.flags = up

[libvirt] [PATCH 6/6] tests: Introduce random network settings to test indexes.

2019-03-04 Thread Julio Faracco
This is the same test of miscnetwork. The XML output needs to be the same. It contains random networks entries separated by indexes and it needs to produce the order XML definition. Signed-off-by: Julio Faracco --- .../lxcconf2xml-randomnetwork-v3.config | 21 +

[libvirt] [PATCH 5/6] tests: Change network settings of V3 testcase set.

2019-03-04 Thread Julio Faracco
Now, it is time to use the new pattern for LXC 3.X inside config test cases. In the past, we kept the old style to keep all functionalities. Now, it is possible to use indexes properly. Signed-off-by: Julio Faracco --- .../lxcconf2xml-ethernet-v3.config| 16

[libvirt] [PATCH 1/6] lxc: Rebase lxcNetworkParseData struct to support indexes.

2019-03-04 Thread Julio Faracco
The current logic of lxcNetworkParseData uses one single structure to record data over the network definitions inside config files. The logic consider the entry 'type' as a new network definition, every time that algorithm find this tag. This new structure was designed to consider network

[libvirt] [PATCH 0/6] lxc: Add suport to network indexes for LXC 3.X.

2019-03-04 Thread Julio Faracco
This series implement support for network syntax settings for LXC 3.X. Now, indexes are part of the settings to define network interfaces. Each interface has its own index. The old style uses 'type' tag to differentiate each interface. Old: lxc.network.type = veth lxc.network.flags = up

[libvirt] [PATCH 2/6] lxc: Rebase lxcNetworkParseData pointers to use new structures.

2019-03-04 Thread Julio Faracco
This commit refactor the code logic to introduce new array structures instead of single lxcNetworkParseData struct. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 94 +++- 1 file changed, 32 insertions(+), 62 deletions(-) diff --git

[libvirt] [PATCH 4/6] lxc: Introduce lxcNetworkGetParseData() for 'lxc.net.' entry.

2019-03-04 Thread Julio Faracco
This commit moves old lxcNetworkGetParseData() to lxcNetworkGetParseDataLegacy() and create a new method for LXC version 3.X called lxcNetworkGetParseData(). This is same idea of method lxcNetworkGetParseDataLegacy(). In the future, it can be easy to remove or rebase, in case of deprecate

[libvirt] [PATCH 3/6] lxc: Introduce lxcNetworkGetParseDataLegacy() method.

2019-03-04 Thread Julio Faracco
This function was introduced to fetch/alloc new data for legacy entries inside config file: 'lxc.network.foo'. Libvirt still need to support both versions. So, this function can be easy to remove in the future. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 37

Re: [libvirt] domXML modeling question

2019-03-04 Thread Jim Fehlig
Adding xen-devel to cc in case anyone there wants to comment on my latest proposal... On 2/20/19 5:20 PM, Jim Fehlig wrote: There have been a few requests [1][2] to support Xen's max_grant_frames setting in libvirt domXML, but I'm not quite sure how to model it. The documentation [3] on this

[libvirt] [PATCH] libxl: Add support for max_grant_frame setting

2019-03-04 Thread Jim Fehlig
Xen 4.10 introduced the max_grant_frames xl config setting, which can be set globally in xl.conf(5) or per-domain in xl.cfg(5). max_grant_frames specifies the maximum number of grant frames the domain is allowed to have, which in turn controls the number of pages the domain can share. This patch

Re: [libvirt] New Feature: Intel MKTME Support

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 07:54:30PM +, Mohammed, Karimullah wrote: > Hi Daniel, > QEMU/KVM work is in process of completion and would be published soon for > the community approval(somewhere in March). We are working closely with > development team of KVM/QEMU. Meanwhile, we wanted to start the

Re: [libvirt] [PATCH v2 2/3] qemu_domain: NVLink2 device tree functions for PPC64

2019-03-04 Thread Daniel Henrique Barboza
Just noticed that the functions signatures of the new functions created by this patch are mostly in one line, like: static int read_dt_phandle(...) While Libvirt code standard is the return value in the first line, then the function name after a line break: void

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 15:02:18 + Daniel P. Berrangé wrote: > On Mon, Mar 04, 2019 at 03:54:57PM +0100, Igor Mammedov wrote: > > On Mon, 4 Mar 2019 13:59:09 + > > Daniel P. Berrangé wrote: > > > > > On Mon, Mar 04, 2019 at 02:55:10PM +0100, Igor Mammedov wrote: > > > > On Mon, 4 Mar

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 05:20:13PM +0100, Michal Privoznik wrote: > On 3/4/19 3:24 PM, Daniel P. Berrangé wrote: > > On Mon, Mar 04, 2019 at 03:16:41PM +0100, Igor Mammedov wrote: > > > On Mon, 4 Mar 2019 12:39:08 + > > > Daniel P. Berrangé wrote: > > > > > > > On Mon, Mar 04, 2019 at

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Dr. David Alan Gilbert
* Michal Privoznik (mpriv...@redhat.com) wrote: > On 3/4/19 3:24 PM, Daniel P. Berrangé wrote: > > On Mon, Mar 04, 2019 at 03:16:41PM +0100, Igor Mammedov wrote: > > > On Mon, 4 Mar 2019 12:39:08 + > > > Daniel P. Berrangé wrote: > > > > > > > On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 05:12:40PM +0100, Michal Privoznik wrote: > On 3/4/19 4:19 PM, Igor Mammedov wrote: > > > Then I'd guess that most VMs end up with default '-numa node,mem' > > which by design can produce only fake NUMA without ability to manage > > guest RAM on host side. So such VMs

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Michal Privoznik
On 3/4/19 3:24 PM, Daniel P. Berrangé wrote: On Mon, Mar 04, 2019 at 03:16:41PM +0100, Igor Mammedov wrote: On Mon, 4 Mar 2019 12:39:08 + Daniel P. Berrangé wrote: On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: On Mon, 04 Mar 2019 08:13:53 +0100 Markus Armbruster wrote:

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Michal Privoznik
On 3/4/19 4:19 PM, Igor Mammedov wrote: Then I'd guess that most VMs end up with default '-numa node,mem' which by design can produce only fake NUMA without ability to manage guest RAM on host side. So such VMs aren't getting performance benefits or worse run with performance regression (due to

Re: [libvirt] [PATCH] virDomainDiskTranslateSourcePool: Don't set @mode of iscsi-direct

2019-03-04 Thread Michal Privoznik
On 3/4/19 4:17 PM, Erik Skultety wrote: On Mon, Mar 04, 2019 at 03:03:23PM +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1658504 Some description apart from the bug would be appreciated. D'oh! I intended to write some, this was just a placeholder commit message

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 15:28:11 + Daniel P. Berrangé wrote: > On Mon, Mar 04, 2019 at 12:45:14PM +0100, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: > > >> If we deprecate outdated NUMA configurations

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 12:45:14PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: > >> If we deprecate outdated NUMA configurations now, we can start rejecting > >> them with new machine types after a suitable

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 14:24:32 + Daniel P. Berrangé wrote: > On Mon, Mar 04, 2019 at 03:16:41PM +0100, Igor Mammedov wrote: > > On Mon, 4 Mar 2019 12:39:08 + > > Daniel P. Berrangé wrote: > > > > > On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: > > > > On Mon, 04 Mar

Re: [libvirt] [PATCH] virDomainDiskTranslateSourcePool: Don't set @mode of iscsi-direct

2019-03-04 Thread Erik Skultety
On Mon, Mar 04, 2019 at 03:03:23PM +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1658504 Some description apart from the bug would be appreciated. > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_conf.c | 2 -- > 1 file changed, 2 deletions(-) > > diff

Re: [libvirt] [PATCH v2 1/3] qemu_domain: simplify non-VFIO memLockLimit calc for PPC64

2019-03-04 Thread Erik Skultety
On Mon, Mar 04, 2019 at 11:49:54AM -0300, Daniel Henrique Barboza wrote: > > > On 3/4/19 10:10 AM, Erik Skultety wrote: > > On Sun, Mar 03, 2019 at 10:23:12AM -0300, Daniel Henrique Barboza wrote: > > > passthroughLimit is being calculated even if usesVFIO is false. > > > After that, a if/else

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 15:24:28 +0100 Michal Privoznik wrote: > [Thanks Igor for bringing this onto my radar. I don't follow qemu-devel > that close] > > On 3/4/19 11:19 AM, Daniel P. Berrangé wrote: > > On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: > >> Daniel P. Berrangé

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 03:54:57PM +0100, Igor Mammedov wrote: > On Mon, 4 Mar 2019 13:59:09 + > Daniel P. Berrangé wrote: > > > On Mon, Mar 04, 2019 at 02:55:10PM +0100, Igor Mammedov wrote: > > > On Mon, 4 Mar 2019 09:11:19 +0100 > > > Thomas Huth wrote: > > > > > > > On 01/03/2019

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 13:59:09 + Daniel P. Berrangé wrote: > On Mon, Mar 04, 2019 at 02:55:10PM +0100, Igor Mammedov wrote: > > On Mon, 4 Mar 2019 09:11:19 +0100 > > Thomas Huth wrote: > > > > > On 01/03/2019 18.48, Daniel P. Berrangé wrote: > > > [...] > > > > So I think this patch has

Re: [libvirt] [PATCH v2 0/3] PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough

2019-03-04 Thread Daniel Henrique Barboza
On 3/4/19 10:03 AM, Erik Skultety wrote: On Sun, Mar 03, 2019 at 10:23:11AM -0300, Daniel Henrique Barboza wrote: This series includes Libvirt support for a new QEMU feature for the spapr (PPC64) machine, NVIDIA V100 + P9 passthrough. Refer to [1] for the version 3 of this feature (same

Re: [libvirt] [PATCH v2 1/3] qemu_domain: simplify non-VFIO memLockLimit calc for PPC64

2019-03-04 Thread Daniel Henrique Barboza
On 3/4/19 10:10 AM, Erik Skultety wrote: On Sun, Mar 03, 2019 at 10:23:12AM -0300, Daniel Henrique Barboza wrote: passthroughLimit is being calculated even if usesVFIO is false. After that, a if/else conditional is used to check if we're going to sum it up with baseLimit. This patch

Re: [libvirt] [PATCH v3 10/10] conf: Rework virDomainKeyWrapDefParseXML

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:52AM -0500, John Ferlan wrote: Rewrite the code to make usage of some VIR_AUTOFREE logic. Suggested-by: Erik Skultety Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Michal Privoznik
On 3/4/19 3:16 PM, Igor Mammedov wrote: On Mon, 4 Mar 2019 12:39:08 + Daniel P. Berrangé wrote: On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: On Mon, 04 Mar 2019 08:13:53 +0100 Markus Armbruster wrote: Daniel P. Berrangé writes: On Fri, Mar 01, 2019 at

Re: [libvirt] [PATCH v3 09/10] conf: Merge with previous

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:51AM -0500, John Ferlan wrote: More path cleanup from code review from methods that I didn't touch as part of the original set of changes, but Erik called out. Plus now with the VIR_AUTOUNREF added that meant a couple more modules could be altered to clean up their

Re: [libvirt] [PATCH v3 08/10] conf: Clean up some unnecessary goto paths

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:50AM -0500, John Ferlan wrote: Now that we're using VIR_AUTOFREE there's quite a bit of clean up possible for now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 801

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 03:16:41PM +0100, Igor Mammedov wrote: > On Mon, 4 Mar 2019 12:39:08 + > Daniel P. Berrangé wrote: > > > On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: > > > On Mon, 04 Mar 2019 08:13:53 +0100 > > > Markus Armbruster wrote: > > > > > > > Daniel P.

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Michal Privoznik
[Thanks Igor for bringing this onto my radar. I don't follow qemu-devel that close] On 3/4/19 11:19 AM, Daniel P. Berrangé wrote: On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: Daniel P. Berrangé writes: On Fri, Mar 01, 2019 at 06:33:28PM +0100, Igor Mammedov wrote: On

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 12:39:08 + Daniel P. Berrangé wrote: > On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: > > On Mon, 04 Mar 2019 08:13:53 +0100 > > Markus Armbruster wrote: > > > > > Daniel P. Berrangé writes: > > > > > > > On Fri, Mar 01, 2019 at 06:33:28PM +0100,

Re: [libvirt] [PATCH v3 07/10] conf: Use VIR_AUTOUNREF in domain_conf

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:49AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities for virObjectUnref consumers. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) Reviewed-by: Ján

Re: [libvirt] [PATCH v3 05/10] conf: Use VIR_AUTOFREE in domain_conf

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:47AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities for VIR_FREE consumers. In some cases adding or removing blank lines for readability. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 1080

Re: [libvirt] [PATCH v3 06/10] conf: Merge with previous

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:48AM -0500, John Ferlan wrote: Seems I missed a few more VIR_AUTOFREE capable places. Once ACK'd I will merge with previous. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 20 1 file changed, 8 insertions(+), 12 deletions(-)

[libvirt] [PATCH] virDomainDiskTranslateSourcePool: Don't set @mode of iscsi-direct

2019-03-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1658504 Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 05c2c9f34e..3340f0b0ef 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 4/4] Revert "Separate out StateAutoStart from StateInitialize"

2019-03-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1685151 This reverts commit e4a969092bda5b3b952963fdf6658895165040b7. Now that drivers may call virConnectOpen() on secondary drivers, it doesn't make much sense to have autostart separated from driver initialization callback. In fact, it creates a

[libvirt] [PATCH 3/4] Revert "virStateDriver - Separate AutoStart from Initialize"

2019-03-04 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1685151 This reverts commit cefb97fb815c81fc882da752f45effd23bcb9b4b. The stateAutoStart callback will be removed in the next commit. Therefore move autostarting of domains, networks and storage pools back into stateInitialize callbacks.

[libvirt] [PATCH 1/4] daemon: Register secret driver before storage driver

2019-03-04 Thread Michal Privoznik
The order in which drivers are registered is important because their stateInitialize and stateAutoStart callback are called in that order. Well, stateAutoStart is going away and therefore if there is some dependency between two drivers (e.g. when initializing storage driver expects secret driver

[libvirt] [PATCH 2/4] bhyve: Move autostarting of domains into bhyveStateInitialize

2019-03-04 Thread Michal Privoznik
The stateAutoStart callback will go away shortly. Therefore, move the autostart call into state initialize callback. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/bhyve/bhyve_driver.c

[libvirt] [PATCH 0/4] Don't destroy domains on daemon restart and autostarted pools

2019-03-04 Thread Michal Privoznik
The reverts were not clean. A lot has changed since v1.1.1. Michal Prívozník (4): daemon: Register secret driver before storage driver bhyve: Move autostarting of domains into bhyveStateInitialize Revert "virStateDriver - Separate AutoStart from Initialize" Revert "Separate out

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 02:55:10PM +0100, Igor Mammedov wrote: > On Mon, 4 Mar 2019 09:11:19 +0100 > Thomas Huth wrote: > > > On 01/03/2019 18.48, Daniel P. Berrangé wrote: > > [...] > > > So I think this patch has to be dropped & replaced with one that > > > simply documents that memdev syntax

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 4 Mar 2019 09:11:19 +0100 Thomas Huth wrote: > On 01/03/2019 18.48, Daniel P. Berrangé wrote: > [...] > > So I think this patch has to be dropped & replaced with one that > > simply documents that memdev syntax is preferred. > > That's definitely not enough. I've had a couple of cases

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Fri, 1 Mar 2019 18:01:52 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Fri, 1 Mar 2019 15:49:47 + > > Daniel P. Berrangé wrote: > > > > > On Fri, Mar 01, 2019 at 04:42:15PM +0100, Igor Mammedov wrote: > > > > The parameter allows to

Re: [libvirt] [PATCH v2 00/17] Add support to list Storage Driver backend capabilities

2019-03-04 Thread Michal Privoznik
On 2/12/19 4:27 PM, John Ferlan wrote: v1: https://www.redhat.com/archives/libvir-list/2019-January/msg00479.html Changes since v1: * The first 4 patches were already R-by'd and pushed. * From v1, rework patch 5 & 6 into what now is patches 8 & 9. The format of the output for what

Re: [libvirt] [PATCH v2 16/17] virsh: Expose virConnectGetStoragePoolCapabilities

2019-03-04 Thread Michal Privoznik
On 2/12/19 4:28 PM, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1581670 Add a new storage pool command "poolcapabilities" to output the storage pool capabilities. This mimics the "domcapabilities" command with respect to naming. I think this should be named

Re: [libvirt] [PATCH v2 1/3] qemu_domain: simplify non-VFIO memLockLimit calc for PPC64

2019-03-04 Thread Erik Skultety
On Sun, Mar 03, 2019 at 10:23:12AM -0300, Daniel Henrique Barboza wrote: > passthroughLimit is being calculated even if usesVFIO is false. > After that, a if/else conditional is used to check if we're going > to sum it up with baseLimit. > > This patch initializes passthroughLimit to zero and

Re: [libvirt] New Feature: Intel MKTME Support

2019-03-04 Thread Kashyap Chamarthy
On Mon, Mar 04, 2019 at 10:33:04AM +, Daniel P. Berrangé wrote: > On Thu, Feb 28, 2019 at 11:16:30PM +, Carvalho, Larkins L wrote: > > Hello Team, > > > > Greetings. > > We want to add Intel MKTME support to the Libvirt. > > Intel MKTME is a capability to encrypt entirety of physical

Re: [libvirt] [PATCH v2 0/3] PPC64 support for NVIDIA V100 GPU with NVLink2 passthrough

2019-03-04 Thread Erik Skultety
On Sun, Mar 03, 2019 at 10:23:11AM -0300, Daniel Henrique Barboza wrote: > This series includes Libvirt support for a new QEMU feature for > the spapr (PPC64) machine, NVIDIA V100 + P9 passthrough. Refer to > [1] for the version 3 of this feature (same version used as a reference > for this

Re: [libvirt] [PATCH v3 03/10] conf: Clean up some unnecessary goto paths

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:45AM -0500, John Ferlan wrote: Now that we're using VIR_AUTOPTR(virBitmap) there's a couple of methods that we can clean up some now unnecessary goto paths. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 26

Re: [libvirt] [PATCH v3 04/10] conf: Remove a few unused variables in domain_conf

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:46AM -0500, John Ferlan wrote: In preparation for VIR_AUTOFREE usage, let's remove a couple of unused variables so that clang compilations won't fail. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 7 +-- 1 file changed, 1

Re: [libvirt] [PATCH v3 02/10] conf: Use VIR_AUTOPTR(virBitmap) in domain_conf

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:44AM -0500, John Ferlan wrote: Let's make use of the auto __cleanup capabilities for virBitmapPtr. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety --- src/conf/domain_conf.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-)

Re: [libvirt] [PATCH v3 01/10] conf: Rework virDomainEmulatorPinDefParseXML

2019-03-04 Thread Ján Tomko
On Fri, Mar 01, 2019 at 11:26:43AM -0500, John Ferlan wrote: In preparation for using auto free mechanism, change to using the VIR_STEAL_PTR on @def to @ret and of course be sure to properly clean up @def in cleanup. Signed-off-by: John Ferlan Reviewed-by: Erik Skultety ---

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 01:25:07PM +0100, Igor Mammedov wrote: > On Mon, 04 Mar 2019 08:13:53 +0100 > Markus Armbruster wrote: > > > Daniel P. Berrangé writes: > > > > > On Fri, Mar 01, 2019 at 06:33:28PM +0100, Igor Mammedov wrote: > > >> On Fri, 1 Mar 2019 15:49:47 + > > >> Daniel P.

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Igor Mammedov
On Mon, 04 Mar 2019 08:13:53 +0100 Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Fri, Mar 01, 2019 at 06:33:28PM +0100, Igor Mammedov wrote: > >> On Fri, 1 Mar 2019 15:49:47 + > >> Daniel P. Berrangé wrote: > >> > >> > On Fri, Mar 01, 2019 at 04:42:15PM +0100, Igor

[libvirt] [PATCH] maint: Post-release version bump to 5.1.0

2019-03-04 Thread Peter Krempa
Signed-off-by: Peter Krempa --- configure.ac | 2 +- docs/news.xml | 8 2 files changed, 9 insertions(+), 1 deletion(-) Pushed under the trivial rule. P.S.: I noticed I didn't fix the version in the summary I've copy-pasted after pushing ... diff --git a/configure.ac b/configure.ac

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Fri, Mar 01, 2019 at 06:33:28PM +0100, Igor Mammedov wrote: >> >> On Fri, 1 Mar 2019 15:49:47 + >> >> Daniel P. Berrangé wrote: >> >> >> >> > On Fri,

[libvirt] Release of libvirt-5.1.0

2019-03-04 Thread Daniel Veillard
A few days late after some travel, but everything is now pushed, freeze is over ! The release is tagged in git, signed tarball and rpms are available from the usual place: ftp://libvirt.org/libvirt/ I also pushed the Python bindings release at: ftp://libvirt.org/libvirt/python/ This

Re: [libvirt] [PATCH] security: apparmor: make vhost-net access a static rule

2019-03-04 Thread Christian Ehrhardt
On Fri, Mar 1, 2019 at 5:56 PM Jamie Strandboge wrote: > > On Mon, 18 Feb 2019, Christian Ehrhardt wrote: > > > So far we were detecting at guest start if any devices needed vhost net > > and only if that was true added a rule for /dev/vhost-net. > > > > It turns out that it is an absolutely

Re: [libvirt] New Feature: Intel MKTME Support

2019-03-04 Thread Daniel P . Berrangé
On Thu, Feb 28, 2019 at 11:16:30PM +, Carvalho, Larkins L wrote: > Hello Team, > > Greetings. > We want to add Intel MKTME support to the Libvirt. > Intel MKTME is a capability to encrypt entirety of physical memory of a > system similar to AMD SEV. > > Please let us know what are the

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Daniel P . Berrangé
On Mon, Mar 04, 2019 at 08:13:53AM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Fri, Mar 01, 2019 at 06:33:28PM +0100, Igor Mammedov wrote: > >> On Fri, 1 Mar 2019 15:49:47 + > >> Daniel P. Berrangé wrote: > >> > >> > On Fri, Mar 01, 2019 at 04:42:15PM +0100, Igor

Re: [libvirt] [PATCH v3 00/10] Alter domain_conf to make use of autofree

2019-03-04 Thread Erik Skultety
On Fri, Mar 01, 2019 at 11:26:42AM -0500, John Ferlan wrote: > v2: https://www.redhat.com/archives/libvir-list/2019-February/msg01201.html > > Changes since v2: > > Patches 1-5 are marked w/ reviewed-by > > Added patch 6 to add a few more VIR_AUTOFREE on char *'s that I missed > in the first

Re: [libvirt] [Qemu-ppc] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-04 Thread Thomas Huth
On 01/03/2019 18.48, Daniel P. Berrangé wrote: [...] > So I think this patch has to be dropped & replaced with one that > simply documents that memdev syntax is preferred. That's definitely not enough. I've had a couple of cases already where we documented that certain options should not be used